openpencil/tests
Danila Poyarkov af18eec514
fix(ai): polish chat history and stabilize chat tests (#923)
* fix(ai): confirm deleting a conversation in the standard dialog

Deleting a conversation asked inside the chat panel's header, unlike every other destructive confirmation, which uses AppConfirmationDialog. It now opens that dialog, which names the conversation; Cancel keeps it and Delete removes it.

* feat(ai): dim a reverted reply's content

A reverted reply still showed its tool cards with their success marks and its text as if the edits were there; only the line below said otherwise. Its content is now dimmed, while the Changes reverted or Restore changes line and the other actions stay at full strength.

* ci: typecheck the test suites in Code quality

bun run check runs check:test-types, but PR CI did not, so tests that no longer type-checked could merge and break bun run check on master, as the grid fixtures from #866 did. It runs as a step of Code quality, which already builds the package declarations it needs; the check takes about two seconds, less than a separate job's setup.

* test(ai): time the reasoning auto-close with the fake clock

The test slept 1200 ms of real time past the 1000 ms auto-close to show that a manually opened block stays open, which was timing-dependent under load. It now advances Playwright's clock past the timer. With manual opening ignored, it fails.

* test(ai): skip file identity on Playwright's bundled Chromium on macOS

There, reading a FileSystemFileHandle back from IndexedDB closes the page before any app code runs, so the test always failed locally on a Mac. Installed Google Chrome on the same machine reads and compares the handle correctly, and the app's resolveFile returns one ID for twelve concurrent calls there. The skip is limited to the bundled build on macOS.

* fix(settings): keep a model picker open while the editor slides in

The models panel focused the editor's first field after its enter transition, even when focus had already moved into the editor, closing a picker opened during the animation. It now leaves focus alone once it has moved since the editor opened.

* test: serve a fixed model catalog and wait for the editor before Settings shortcuts

Chat tests fetched the live models.dev catalog, so the model list changed under them; they now get a small fixed one. The credentials test pressed the Settings shortcut before the editor was ready.

* fix(settings): move drill-in focus with Reka's FocusScope

The drill-in focused the detail's first field after its slide-in ended, found by querying the DOM, and restored focus by hand, so a picker opened during the slide closed. FocusScope now focuses the detail as it mounts and returns focus to what opened it. A caller can prevent open-auto-focus to focus its own field, which the models panel does for the profile name through the editor's exposed focus().

* test(ai): answer the Vision model's request in chat tests

A message with images is analyzed by the Vision model, which calls OpenRouter directly rather than the mocked chat transport. With the test key the request failed, and since #916 a failure before dispatch takes the message back, so the WebKit history test never got a reply. The chat fixture now answers that request with fixed findings.

* test(ai): check that deletion persists and reverted replies dim

The delete test passed even if the conversation stayed in storage, since the panel clears its messages before the store removes it; it now reloads and checks the history. The revert test checked only data-reverted; it now checks the rendered opacity too.
2026-10-07 09:53:05 +00:00
..
app refactor: read stored settings and external responses with Valibot (#937) 2026-10-07 09:28:42 +00:00
e2e fix(ai): polish chat history and stabilize chat tests (#923) 2026-10-07 09:53:05 +00:00
engine refactor: read stored settings and external responses with Valibot (#937) 2026-10-07 09:28:42 +00:00
figma
fixtures test(fig): pin override and variable precedence to what Figma renders (#912) 2026-10-06 09:08:51 +00:00
helpers fix(ai): polish chat history and stabilize chat tests (#923) 2026-10-07 09:53:05 +00:00
integration test: typecheck the test suites and fix what that found (#896) 2026-10-05 12:42:38 +00:00
AGENTS.md feat(ai): add guided AI setup for providers, coding agents, and Pi (#916) 2026-10-07 08:46:57 +00:00