* 📱 fix: Fit the Tool Library and Skills Pickers to Small Screens The Tool Library dialog assumed a viewport wide enough for its 224px navigation rail: below `md` the rail took more than half of a 390px screen and the card grid was squeezed into the remainder. The rail is now `md`-only, and the same kind and view navigation renders as a horizontally scrollable chip row under the search field. Card and row actions were hover-only, so Configure, Favorite and Remove were unreachable on a touch screen. They stay hidden until hover only where hover exists (`@media (hover: hover)`), and are always visible otherwise. The Skills picker header put the create button, the filter field and the view radio on one row, where the field collapsed to 50px beside a `shrink-0` radio. The view radio and the create button now sit on the title row, the create button flush right, and the filter field owns the row below them. The dialogs fill the viewport below `md` and switch `vh` to `dvh`, so mobile browser chrome no longer cuts off the bottom of the panel. * ♿ fix: Gate Hidden Tool Actions on Touch, Not on Hover Hiding an action until hover has to ask whether a finger can reach it, and `(hover: hover)` does not answer that: on a 2-in-1 it is true because it describes the trackpad, while the touchscreen sits right next to it. Tool cards and tool rows gated their Configure, Favorite and Remove controls on that query, so a finger user of such a device saw no actions at all. `packages/client/tailwind.preset.cjs` already carries `touch` for this exact distinction, `(any-pointer: coarse)` rather than `(pointer: coarse)`. This adds its inverse, `no-touch`, and gates the hidden state on it, so the hide applies only where no coarse pointer exists at all and hover no longer takes part in the decision. * 📐 fix: Split the Skills Header Onto Two Rows Below md The Skills header put the create button, the filter field and the view radio on one row. The radio's segments are `whitespace-nowrap`, so the group never narrows below 261px, and the field — `flex-1`, basis 0 — absorbed the shortfall and measured 50px on a 390px screen. Below md the radio and the create button now take the first line, the create button flush right, and the field takes the second. From md the row is exactly what it was: create button, field, category, radio. One DOM order serves both through `order-*`, so the radio and the create button each exist once. * 🧷 fix: Let the Skills View Radio Wrap Instead of Clipping The three view segments carry `whitespace-nowrap` and `px-4`, so the group has a hard 261px minimum in English and more in longer locales. On a 360px phone that group and the 42px create button exceed the dialog, which is `overflow-hidden`, and the trailing option becomes unreachable. The group now uses the primitive's `wrap` variant and may shrink, so the segments flow onto a second row; at 390px they still occupy one. `wrap` reproduced `inset-y-1` by assuming the group had no vertical padding, so turning it on for a `p-1` group shrank the moving indicator by 8px and left it floating inside its segment. It now measures that padding from the first row's offset, which leaves an unpadded group's geometry unchanged. * 🧪 test: Cover the Small-Screen Tool Library and Skills Header Ten mock-harness scenarios for the behaviour this branch changes, one per acceptance scenario id, asserting rendered geometry and computed styles rather than class strings. The tool library file covers a phone viewport (the dialog fills it, the rail is gone, the chip row filters, and no card crosses the viewport edge — the 744px grid-column overflow), the action gate on all three pointer profiles (visible with a coarse pointer, hover-gated with a mouse, revealed by keyboard focus), the selected tool row, and the unchanged desktop rail. The skills file covers the two-row header below md, the wrapped view radio at 320 and 280 CSS px with every option inside the dialog and the indicator on its checked segment, and the single desktop row. * 🧪 test: Pin the Scenario Contexts and Settle Their Geometry The verifier runs every tagged test in three projects, one of which is a touch phone, so the mouse scenarios asserted a mouse on a device that reports a coarse pointer, and the desktop rail on a 412px screen. They now pin their own viewport and pointer instead of inheriting the project. Geometry and opacity were also read mid-animation: the dialog scales as it opens, which put its left edge at 1.5px rather than 0, and the actions fade over the shared motion duration, which caught keyboard focus at 0.84. Both now poll for the resting value. With nothing selected the skills section offers only the dashed empty-state card, whose accessible name carries the hint line, so the exact-name locator for Add skill never matched. * 📏 fix: Keep the Tool Library Shell and Its Body the Same Height Giving the shell an explicit `md:h-[88vh]` while the body kept its 840px ceiling let the two disagree: on a viewport taller than about 955px the difference became dead space below the catalog, 216px at 1280x1200, and below `md` the full-height sheet left 293px on a 744x1133 tablet. The body carries the height from `md` again, the way it did before this change, so the shell wraps it. Below `md` the shell stays the full-bleed sheet and the body is capped to the same `100dvh`, which it needs because its `h-full` resolves against a grid area sized to the whole catalog. Measured shell and body heights now agree exactly: 840 at 1280x1200, 757 at 1280x860, 1133 at 744x1133 and 844 at 390x844, with the catalog still scrolling inside its own container. * 🎯 fix: Keep the Search Field Clear of the Dialog Close Button `md:px-6` on the search row is a responsive variant, so it is emitted after the base utilities and reset the `pr-12` that reserves room for the close button: on desktop the row's right padding dropped from 48px to 24px and the field ran 16px underneath the button. It now sets only the left side at `md`. Measured gap between the field's right edge and the button: 8px at 1280x860 and at 390x844, with no vertical overlap. Asserted inside the phone-viewport and desktop-rail scenarios rather than as a new id, since it is the same surface. * ⌨️ fix: Read the Skills Header in Tab Order and Keep the Chip Row Draggable Two defects with the same shape: a control that the eye can reach and the keyboard or the mouse cannot. The Skills header used `order-*` to serve both layouts from one DOM order, which left tab order disagreeing with the visual order from `md`: focus went from the rightmost radio group back to the create button and then into the middle. The breakpoint now selects the DOM order instead, the way the marketplace dialog already selects its rail, so each layout reads in the order it renders. Every control is still built once, so there is one radio group and one create button at any width. The mobile chip row hid its scrollbar unconditionally. A narrow desktop window is below `md` as well, and there a wheel scrolls the page rather than the row, so Made by you and Favorites could not be reached with a mouse at all. The hiding is now gated on `touch`, the same `(any-pointer: coarse)` query the rest of this branch uses. Measured: desktop DOM order create, field, radio and mobile radio, create, field, each matching its layout; `scrollbar-width` resolves to `auto` in a 520px mouse window whose row overflows, and to `none` on a touch phone. * 👆 fix: Give the Touch Layout Touch Geometry Two findings with one cause: the coarse-pointer layout inherited the mouse layout's geometry after this branch changed what it shows and in what order. Card actions no longer fade out where a finger can reach them, but they are absolutely positioned over the card's content, so on touch they covered the last line of a three-line description for as long as the card was on screen - an overlap that used to be transient. The card now reserves a strip for them there, `touch:h-36` with `touch:pb-9` on the content, which keeps all three lines. The chip row is that layout's primary navigation and exists only where a finger is what reaches it, yet its chips were about 30px tall and its create control 32px, while the repository already exposes the 44px `theme-control-touch` size for this. Both now carry that floor through `touch:`, and the mouse layout keeps its compact sizing. Measured on a 390x844 touch profile: all eight chips 44px, the card 144px, and the description's box clear of the action cluster. Both are asserted in the phone-viewport and touch-action scenarios. |
||
|---|---|---|
| .. | ||
| benchmarks | ||
| benchmarks-mobile-chat | ||
| benchmarks-navigation | ||
| benchmarks-reasoning | ||
| benchmarks-tree | ||
| bombadil | ||
| byom | ||
| config | ||
| fixtures | ||
| lighthouse | ||
| perf | ||
| recordings | ||
| setup | ||
| specs | ||
| client-build.test.mjs | ||
| config.local.example.ts | ||
| jestSetup.js | ||
| playwright.config.a11y.ts | ||
| playwright.config.benchmark.ts | ||
| playwright.config.bombadil.ts | ||
| playwright.config.lighthouse.ts | ||
| playwright.config.local.ts | ||
| playwright.config.mermaid.ts | ||
| playwright.config.mobile-chat-perf.ts | ||
| playwright.config.mock.ts | ||
| playwright.config.navigation-perf.ts | ||
| playwright.config.real.ts | ||
| playwright.config.reasoning-perf.ts | ||
| playwright.config.redis.ts | ||
| playwright.config.tree-parity.ts | ||
| playwright.config.tree-perf-prod.ts | ||
| playwright.config.tree-perf.ts | ||
| playwright.config.ts | ||
| README.md | ||
| types.ts | ||
LibreChat e2e
The mock e2e profile is the safest default for generated tests. It starts LibreChat with e2e/config/librechat.e2e.yaml, injects an in-process fake LLM (via LIBRECHAT_TEST_RUN_HOOK), creates an authenticated e2e user, and avoids real provider credentials.
Stream Stores and Shards
The mock profile uses the in-memory generation stream store by default. To exercise the same browser scenarios through a real Redis job store and pub/sub transport, start Redis on port 6379 and run:
npm run e2e:mock:redis
Memory mode explicitly disables Redis. Redis mode defaults to database 15 with a LibreChatE2E key prefix, and fails closed: the test server pings Redis and verifies that the generation job manager did not silently fall back to memory. Override REDIS_URI or E2E_REDIS_KEY_PREFIX when needed.
Pull request CI runs the complete mock suite in memory mode across three shards, plus a focused Redis transport suite. The Redis suite covers streaming fidelity, steering, interrupts, resumptions, HITL approvals, completion, thread folding, model icons, and usage:
npx playwright test --config=e2e/playwright.config.mock.ts --shard=1/3
npm run e2e:mock:redis:transport
The nightly schedule and manual workflow dispatch run the complete mock suite in both stream modes across two shards per mode. Every shard keeps one worker so tests do not contend for its authenticated user and database.
Property-based browser testing
Bombadil explores randomized sequences across the core chat loop, message branches, parallel multi-conversation responses, model changes, reloads, and sidebar conversation lifecycle operations:
npm run e2e:bombadil
Set BOMBADIL_TIME_LIMIT for longer local or scheduled runs. Failures leave a
reproducible trace under e2e/.generated/bombadil-output; rerun it with:
BOMBADIL_REPRODUCE=e2e/.generated/bombadil-output npm run e2e:bombadil:run
Reproducing a real violation is expected to fail the Playwright test. Before a
new run overwrites the active output, the harness archives it under
e2e/.generated/bombadil-history/. Reproduction can diverge when streaming
timing changes; Bombadil reports that explicitly.
The harness uses the credential-free mock-LLM profile, so exploration never sends billable provider requests.
CI runs the broad property exploration for five minutes in the non-blocking
Bombadil Property Exploration workflow. If a property fails, download the
bombadil-reproduction-* artifact into
e2e/.generated/bombadil-output/, then reproduce it locally:
BOMBADIL_REPRODUCE=e2e/.generated/bombadil-output npm run e2e:bombadil:run
The accompanying bombadil-diagnostics-* artifact contains the captured CI log,
Playwright HTML report, and Playwright test results. A Bombadil failure produces
a workflow warning but does not block merge.
The default instruments inline JavaScript only because instrumenting LibreChat's
full Vite bundle can exceed Bombadil's driver timeout during stateful runs. Set
BOMBADIL_INSTRUMENT_JAVASCRIPT=files,inline for shorter coverage-guided
experiments.
The branch reload, fork submission, model/conversation, HITL pause/resume, and mid-run steering lifecycle properties can be run independently:
npm run e2e:bombadil:branch-reload
npm run e2e:bombadil:fork-lifecycle
npm run e2e:bombadil:model-lifecycle
npm run e2e:bombadil:hitl
npm run e2e:bombadil:steering
These focused commands are diagnostic properties: they exit nonzero when they
reproduce a product invariant violation. Reproduce a focused trace with its
matching :run script and output directory, for example:
BOMBADIL_REPRODUCE=e2e/.generated/bombadil-output-hitl npm run e2e:bombadil:hitl:run
HITL drives a real ask_user_question checkpoint through the answer/resume
controller, reloads while the question is paused, answers it once, and reloads
the completed conversation. Steering submits an in-flight steer during a slow
MCP-backed run, checks that it moves exactly once from the composer anchor into
the response at the tool boundary, and reloads the applied state. The model
lifecycle property is the passing control. The branch reload and fork
properties preserve their minimal failing traces.
Recording Tests
Use Playwright codegen when you want to turn an exploratory browser session into a draft test:
npm run e2e:record
That command builds the app, starts the LibreChat test server (with an in-process fake LLM) when needed, writes e2e/storageState.json, and opens Playwright codegen at /c/new. The npm script uses http://localhost:3333 so it does not collide with a normal dev server on 3080. Raw recordings are written to e2e/recordings/ and ignored by git.
For a real local LibreChat config instead of the mock profile:
npm run e2e:record:local
Useful direct options:
node e2e/setup/record.js --url=http://localhost:3080/c/new
node e2e/setup/record.js --profile=local --no-output
node e2e/setup/record.js --auth-only
node e2e/setup/record.js --output=e2e/recordings/settings-draft.spec.ts
LLM-Assisted Loop
- Start
npm run e2e:record. - Let the LLM use Computer Use to operate the headed Playwright browser.
- Stop codegen after the workflow is captured.
- Move the useful parts from
e2e/recordings/into a committed spec undere2e/specs/mock/. - Replace brittle generated selectors with role, label, text, or
data-testidlocators. - Add assertions that prove the behavior, not just the clicked path.
- Run the finished spec with
npm run e2e:mock -- <spec name>.
Generated recordings are a draft, not the final test. The committed version should use the shared helpers in e2e/specs/mock/helpers.ts where possible, wait on network or visible UI state instead of fixed sleeps, and keep test data deterministic.