Skip to content

fix(save): keep the save window open on the saved state, quiet tab messages (E-05, E-06, E-03) - #57

Merged
navidshad merged 3 commits into
devfrom
ml/e2e-extension-fixes
Oct 16, 2026
Merged

navidshad merged 3 commits into
devfrom
ml/e2e-extension-fixes

Conversation

@navidshad

Copy link
Copy Markdown
Collaborator

What

Fixes from the end-to-end run of multilingual round 1.

  1. The save window closed right after "Save to German" (E-05). The phrase was saved, but the saved state (X6) never showed. Clicking anywhere inside the window while the bundle list was open also closed the whole window.
    • Cause: the bundle list closes itself by sending a fake Escape key to its trigger (pilotui's Select has no close method). The window's Esc handler (added in 154ee7b) listens on window in the capture phase, so it read that fake key as "close the window". closeDropdown() runs after every save and on every outside click of the list, so both closed the window.
    • Fix: our own Escape is marked (dispatchInternalEscape in escape.ts) and the window lets it through. A real Esc with the list open now closes only the list. The window closes only on X, Back to my video, Esc, or a click outside the window.
  2. Saved state (X6): a normal save now shows "Saved to Dark S1 · German", Back to my video and Practise it now (no Undo) in place of the form, as in the design. Without language profiles (dark launch) nothing changes.
  3. X8 with no bundle ready (E-06): "Save to English" shows the bundle picker, but the Save after it was treated as a plain save, so Undo was lost. It now keeps the choice and shows Undo back to the two choices.
  4. Popup error (E-03): telling tabs without our content scripts about a language switch logged an uncaught "Receiving end does not exist". That error is now ignored; other errors are logged as warnings.

Rows

E-05, E-06, E-03.

How it was tested

  • yarn test (358 passed, new tests in console-escape.test.ts, save-language.test.ts, tab-broadcast.test.ts), yarn typecheck clean, yarn build, yarn test:e2e (22 passed).
  • Live: the built extension in Chromium against a local server and local MongoDB (only translateWithContext stubbed, no AI key locally). Passed: popup switch with no errors; inside click and Esc with the list open close only the list; X6 saved state, and the window stays open; Back to my video closes it; X5 Change to English saves to an English bundle and the active language stays; X4 and X8 "Save to English" both ways (saved at once, and through the picker), and Undo goes back to the two choices. The same script on the old build fails on the popup errors and on the inside click.

🤖 Generated with Claude Code

navidshad and others added 3 commits October 16, 2026 03:47
…E-06)

The bundle list closes itself with a fake Escape key on its trigger
(pilotui's Select has no close method). The window's own Esc handler
listens on window in the capture phase, so it read that fake key as
"close the window". After "Save to German" (closeDropdown runs after a
save) and on any click inside the window while the list was open, the
whole window closed. Our own Escape is now marked and let through, and
a real Esc with the list open closes only the list.

A normal save now shows the saved state of design X6 ("Saved to Dark S1
· German", Back to my video, Practise it now, no Undo) in place of the
form. Without language profiles nothing changes.

"Save to English" for a language not added, when no bundle is ready,
shows the picker; the Save that follows is still that choice, so the
result keeps Undo back to the two choices (X8).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… (E-03)

After a language switch the popup tells every open tab. A tab without
our content scripts rejects with "Receiving end does not exist", which
showed up as an uncaught error in the popup. That one error is now
ignored; any other error is logged as a warning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@navidshad
navidshad merged commit 40cf417 into dev Oct 16, 2026
2 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.17.0-dev.7 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant