Skip to content

📜 chore: Bump deps, fix TOC navigation, add Click UI tooling, code splitting#4

Merged
danny-avila merged 11 commits intomainfrom
chore/bump-provider-skills
Apr 4, 2026
Merged

📜 chore: Bump deps, fix TOC navigation, add Click UI tooling, code splitting#4
danny-avila merged 11 commits intomainfrom
chore/bump-provider-skills

Conversation

@danny-avila
Copy link
Copy Markdown
Contributor

Summary

  • Bump librechat-data-provider and update bun.lock
  • Fix TOC navigation — parent-level sections in accordion groups now scroll and track correctly (id + data-section-id on MultiAccordion.Item)
  • Fix tab-switch lag — add staleTime to profileMapOptions and resolvedConfigOptions to prevent unnecessary API refetches on tab change
  • Add Click UI tooling.claude/skills/click-ui.md for AI guidance, eslint-plugin-click-ui (v1.1.1) with recommended rules, patched for ESLint 10 compatibility
  • Add Rolldown code splitting — isolate Click UI icons (~706 kB) and vendor-ui (~290 kB) into cache-friendly chunks; main chunk reduced from 438 kB → 362 kB
  • UI improvements — sidebar, accordion, and help page styling; Windows path fix; CI workflow and PR template

Test plan

  • Verify TOC parent-level items scroll correctly on all tabs (Features, System, etc.)
  • Verify TOC active indicator tracks the correct section while scrolling
  • Switch tabs and confirm no network requests fire (check DevTools Network tab)
  • Run bun run build and confirm no chunks exceed 500 kB (except icons)
  • Run bun run lint — should pass clean

- Bump librechat-data-provider to version 0.8.407
- Update axios to version 1.13.6
Accordion sections rendered via MultiAccordion.Item had no id attribute
on the DOM, so document.getElementById returned null for parent-level
TOC items — preventing scroll navigation. Pass the id prop directly to
MultiAccordion.Item which spreads it onto the underlying Radix element.
- Add .claude/skills/click-ui.md for AI assistant guidance
- Add eslint-plugin-click-ui (v1.1.1) in tools/ with recommended config
- Patch plugin rules for ESLint 10 compatibility (context.filename)
- Fix Button children→label prop in GroupsTab and RolesTab
- Disable require-provider and select-requires-options (false positives)
- Exclude tools/ from tsconfig
Split @clickhouse/click-ui icons and UI library into dedicated chunks
for better caching. Icon SVG data (~700 kB) rarely changes and now
caches independently. Main chunk reduced from 438 kB to 362 kB.
Add staleTime (60s) to profileMapOptions and resolvedConfigOptions so
React Query doesn't refetch on every re-render caused by tab changes.
Neither query depends on the active tab — they cover all field paths
and the selected scope respectively.

Add data-section-id to MultiAccordion.Item so useActiveSection can
detect accordion section headers. Previously only child section headers
(from FieldRenderer) had this attribute, causing the active TOC item
to snap to the last visible child instead of the correct parent section.
@danny-avila danny-avila changed the title Bump deps, fix TOC navigation, add Click UI tooling, code splitting 📜 chore: Bump deps, fix TOC navigation, add Click UI tooling, code splitting Apr 3, 2026
The eslint-plugin-click-ui test uses eslintrc-format parserOptions
incompatible with ESLint 10's RuleTester. Exclude tools/ from vitest.

Four test files require SESSION_SECRET to import server modules — add
it to the CI workflow env so all 489 tests pass.
MultiAccordion.Item (Radix accordion) uses data-state="closed" and a
button trigger, unlike ConfigSection/ObjectEntryCard which use
config:expand events and .config-section-grid-closed. Add
expandAccordionItem() to detect and click the Radix trigger so
providers on the AI Providers tab expand when clicked in the TOC.
@danny-avila danny-avila force-pushed the chore/bump-provider-skills branch 2 times, most recently from 15e33c7 to c346b93 Compare April 4, 2026 01:17
addParams and similar record fields accept nested objects/arrays in the
schema but the UI only supported primitive types. The allowed value
types are now derived from the schema:

- headers (Record<string, string>) → string only, type selector hidden
- addParams (Record<string, union>) → string/number/boolean/json

Add inferRecordKVTypes() to extract allowed KV types from the Zod
schema's record value type. Fields with a single allowed type hide
the type dropdown entirely. The JSON type renders a resizable textarea
for raw JSON input, parsed on save.
@danny-avila danny-avila force-pushed the chore/bump-provider-skills branch 5 times, most recently from f2cbcf2 to f9895db Compare April 4, 2026 03:04
When editing a single custom endpoint, changes are now tracked at the
individual entry level (endpoints.custom.2) instead of replacing the
entire array. This makes the save dialog show only the changed entry's
before/after diff instead of all 20+ endpoints.

On the server side, mergeIndexedArrayEntries() detects indexed paths,
fetches the current base config, merges updated entries into the
existing array, and sends the complete array to the API.

The confirm dialog resolves indexed paths to entry names
(e.g., "endpoints.custom[2] (Moonshot)") for clarity.

Structural changes (add/remove entries) still use full-array replacement
via the existing onChange path.
@danny-avila danny-avila force-pushed the chore/bump-provider-skills branch from f9895db to ec4daad Compare April 4, 2026 03:13
Add tests for:
- Schema extraction of addParams (json KV types), headers (string-only),
  and dropParams (array)
- resolveSubSchema for endpoints.custom, numeric indices, and named
  provider paths
- validateFieldValue for custom endpoint entries with addParams,
  headers, dropParams, and nested objects
- serializeKVPairs for all value types including json with fallback
- deepSerializeKVPairs for full endpoint objects with nested KV pairs,
  mixed arrays, and headers
Every keystroke in KeyValueField propagated up through onChange →
onEntryChange → setEditedValues, causing full re-renders that reset
cursor position. Apply the same local-state pattern used by TextField:
inputs maintain local state and only commit to parent on blur/Enter.

Applies to all inputs in KeyValueField: key inputs, value inputs, and
the JSON textarea (react-textarea-autosize).
@danny-avila danny-avila merged commit 97d06de into main Apr 4, 2026
4 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.

2 participants