Skip to content

✅ fix: Wave 2 Integration, Verification Fixes and Schema Coverage Guarantees - #170

Merged
danny-avila merged 81 commits into
mainfrom
feat/config-w2-7-integration
Oct 23, 2026
Merged

danny-avila merged 81 commits into
mainfrom
feat/config-w2-7-integration

Conversation

@danny-avila

Copy link
Copy Markdown
Contributor

Stack 7/7 of the Wave 2 Configuration-page editors. Based on the previous PR in the stack (feat/config-w2-6-filesys). Merge the stack bottom-up, or all at once with the GitHub stack merge.

Summary

Integration, verification fixes and the schema-dynamism guarantee for the Wave 2 editors.

Integration

  • Pickers in every editor now read the providers editor's shared option sources (endpoints, models per endpoint, MCP servers, spec groups, tools).
  • Duplicated helpers written in parallel are consolidated into @/utils and src/types.
  • There is now one profile-override pattern ("Override for Role: USER", Cancel until something changes) across endpoints, MCP and specs.
  • Count, copy and US-spelling consistency.

Verification fixes. Three rounds of three-lens live verification (functional journeys with DB checks, UX/visual/axe at 1440/1024/390 in light and dark, and adversarial code review) found 36 → 24 → 25 issues and drove ~90 fix commits. The medium-or-higher count fell 20 → 13 → 7 → 0. Highlights:

  • Key/value editors: a rename commits on blur/Enter, and a blank or duplicate key is refused at its row.
  • Create MCP server: it lists missing user-variable fields, shows inline name errors, and refuses blank, repeated or dotted header keys.
  • Create dialogs: a second Escape no longer discards a draft.
  • Import preview: Back and Import stay pinned.
  • Narrow screens: on a phone, rows with chips stack their label, chips and control.
  • Focus: it returns to the tab after Save or Revert, and row menus, deletes, Undo and reorders keep focus where it belongs.
  • Validation: an invalid MCP URL no longer crashes it (parseSafely).
  • Terms gate: saves refused by LibreChat's terms-acceptance gate explain it and link there.
  • Model specs: the preset picker offers only fields the spec's endpoint reads, and switching endpoint offers to drop parameters the new one doesn't take.

Schema dynamism guarantee. The page is still generated from LibreChat's configSchema, and purpose-built editors can no longer hide fields. Every purpose-built section has a coverage test that renders through the real tab harness and checks:

  1. Every schema leaf is rendered somewhere reachable, or is on an allowlist with a reason. A stale allowlist entry fails the test.
  2. For every object, list item and record entry, a synthetic zzNewSetting string plus a zzNewGroup.zzNewFlag boolean render with usable controls, and Save writes both paths.
  3. A key no schema knows is listed read-only.

These tests found 15 places where editors were hiding fields, all now fixed with a shared OtherSettings fallback:

  • Memory agent
  • Content filters
  • Azure group details
  • MCP auth-method objects
  • Model-spec subagent and prompt keys
  • Custom-endpoint token-pricing rates and parameter-definition fields
  • Per-type storage
  • Balance/transactions
  • Rate limits
  • OpenID discovery
  • GitHub skill sync
  • A new top-level section under providers, endpoints and specs

Known follow-ups (low). These are left to keep scope:

  • The three collection lists (endpoints, MCP, specs) still use slightly different row layouts.
  • MCP settings' two allowlists use different add patterns.
  • Two near-duplicate domain-list fields and three focus-after-Undo implementations should be consolidated.

Change Type

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)

Testing

  • At this stack level: npx tsc --noEmit (clean), npx vitest run (2400 tests pass) and npx eslint src/ e2e/ (clean).
  • Built in a dedicated worktree and verified live against a real LibreChat backend and MongoDB with a production-like librechat.yaml: acceptance criteria at 1440 and 390 px, light and dark, with screenshots.
  • The full stack was integrated and passed three rounds of independent live verification (functional with DB checks, UX/visual/axe, code review) plus the schema-coverage suite. At the top of the stack: 2400 tests, bun run test:lint-rules and vite build pass.

Test Configuration:

  • Bun 1.4.0; LibreChat dev (data-provider 0.8.527) with MongoDB 8.2

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • My changes do not introduce new warnings
  • I have written tests demonstrating that my changes are effective or that my feature works
  • Local unit tests pass with my changes

…rantees

Integration, verification fixes and the schema-dynamism guarantee for the Wave 2 editors.
Purpose-built AI providers editor (WS9, AP-1…AP-10).
## MCP servers: purpose-built editor (WS12, MCP-1…MCP-14)
Custom endpoints editor (Wave 2, WS10).
Model specs editor (WS11, Wave 2)
Purpose-built Features tab editors (WS13).
Purpose-built editors for the Files & storage and System tabs (WS14: FX-6 to FX-13, FX-15).
@danny-avila
danny-avila added this pull request to stack #171 October 20, 2026 07:38
The schema-coverage tests render an entire configuration tab; they take
about 2s locally but over 5s on CI runners, exceeding Vitest's default
timeout. Set a shared 30s per-test timeout for these files.
@danny-avila

Copy link
Copy Markdown
Contributor Author

@codex review

Pass 1. Head: 28da139

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-22T16:12:26.888489Z c4967a8 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 28da1396bf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/components/configuration/ConfigPage.tsx Outdated
Comment thread src/components/configuration/sections/endpoints/Fields.tsx Outdated
Comment thread src/components/configuration/sections/mcp/Create.tsx
Comment thread src/components/configuration/SettingsRow.tsx
The configured-only filter now treats a path holding an unsaved value as set: provider groups, generic rows, sections and table-of-contents entries stay shown, so a pending edit of an unset setting never disappears behind the filter. isPathSet moves to counts.ts as the single rule.
- An inherited requiresOAuth: false no longer locks the API key and On-behalf-of methods.
- Deleting a server renamed in this session lists the saved server as pending deletion, with Undo bringing the rename back.
- The review pairs a removed and an added server as a rename only when the panel recorded the rename (or the values are identical), not because they share a URL or command.
- Duplicate skips masked secret previews, notes which stored secrets must be entered again, and Save requires a key for an admin-provided API key.
- A transport switch waiting for confirmation is planned from the current entry and dropped when the edit session ends.
# Conflicts:
#	src/components/configuration/ConfigTabContent.tsx
- Switching the memory agent back to an existing agent unhides a saved librechat.yaml ID tombstone, so the restored ID applies again.
- Enable memory defaults to On once a pending edit adds the first memory setting, and reads inverted when shown read-only.
- The domain list gives its row id to the text input, so the row label focuses it.
# Conflicts:
#	src/components/configuration/ConfigTabContent.tsx
…imit Editors

- Skill files inherit the image and document backends, so moving them off either backend is confirmed, naming both.
- Social sign-in providers are read from librechat.yaml (else LibreChat's default list), never from a stale Base override.
- Resetting a sign-up domain restriction to a layer without one warns that registration opens.
- Credits lists balance and transactions settings the card does not place (schema rows, then unknown keys).
- "Set values only" leaves out unset skill sync sources and keeps rows that hold an unsaved value.
- Rate limits say which number librechat.yaml sets when it sets only one of the pair.
…tion

# Conflicts:
#	src/components/configuration/ConfigPage.tsx
#	src/components/configuration/ConfigTabContent.tsx
#	src/components/configuration/sections/mcp/Servers.tsx
#	src/components/configuration/sections/mcp/auth.ts
#	src/components/configuration/sections/providers/Card.tsx
#	src/components/configuration/sections/providers/ProvidersRenderer.tsx
#	src/components/configuration/sections/system/RegistrationRenderer.tsx
#	src/hooks/config/save.ts
…nputs

- YAML import checks only the shape of mcpServers before a target is chosen; the preview validates each server merged onto the chosen target's servers, so a sparse override of a server only a profile defines is accepted for that profile and refused for Base.
- A custom endpoint's endpoint pickers leave out the endpoint itself by the name LibreChat serves it under (Ollama is served as ollama).
- Creating an MCP server with a URL that can't be parsed marks the URL invalid with a message; any other failure of the draft as a whole is named in the footer.
- A row error no longer strips aria-invalid from a control whose own error replaces it.
@danny-avila

Copy link
Copy Markdown
Contributor Author

@codex review

Pass 2. Head: eed760d

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: eed760d182

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Collapsed provider cards and groups summarized a pending API key as plain text. Secret fields (as the field renderer detects them) now show the masked placeholder; environment references stay visible.
Undo inserted a removed endpoint at its loaded position in the shortened pending list, so undoing B after deleting A and B from [A, B, C] gave [C, B]. It now goes back before the first surviving endpoint that was loaded after it.
…ues Only

In a profile, the first pending edit of an inherited endpoint is not yet a stored override, so the set-values-only filter hid the row as soon as its drawer closed. Edited rows now stay listed.
Override a built-in parameter appended only { key, default }. LibreChat expands librechat.yaml definitions at startup but serves an override's as stored, and its client replaces the built-in definition with it whole, so the parameter lost its type, component and label. The full built-in definition is now stored (optionType custom, as LibreChat expands it), and a definition that differs from its built-in only in its default still opens as a default override.
…tion

# Conflicts:
#	src/components/configuration/sections/mcp/Field.tsx
# Conflicts:
#	src/components/configuration/review/review.test.ts
…tion

# Conflicts:
#	src/components/configuration/sections/files/StorageRenderer.tsx
#	src/components/configuration/sections/mcp/Servers.tsx
#	src/components/configuration/sections/specs/Editor.tsx
#	src/components/configuration/sections/specs/Fields.tsx
#	src/components/configuration/sections/specs/PresetEditor.tsx
#	src/components/configuration/sections/specs/__tests__/ModelSpecsRenderer.test.tsx
#	src/components/configuration/sections/system/RateLimitsRenderer.tsx
#	src/components/configuration/sections/system/Yaml.tsx
#	src/hooks/config/draft.test.tsx
#	src/hooks/config/keys.ts
@danny-avila

Copy link
Copy Markdown
Contributor Author

@codex review

Pass 3. Head: c4967a8

@danny-avila
danny-avila removed this pull request from stack #171 October 23, 2026 04:44
@danny-avila
danny-avila changed the base branch from feat/config-w2-6-filesys to main October 23, 2026 05:04
@danny-avila
danny-avila merged commit 24c0670 into main Oct 23, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant