Repository navigation
Add Save and Save As buttons to the tab bar - #22
Merged
Merged
Conversation
Saving was only reachable through File → Save or the shortcut, and the only sign of unsaved edits was passive (tab dot, status bar). The tab bar now has a Save button next to Compare. It runs the same command as Cmd/Ctrl+S, so Inspector drafts are committed first and the malformed-XML check still applies, and it is enabled only while the active document has unsaved changes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: deeaeeb671
ℹ️ 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".
The Save button is now a split button; its arrow opens a menu with Save and Save As… (with their shortcuts). Save As… stays enabled when the document has no unsaved changes, so a clean file can still be copied. The menu reuses the context menu, which gained an optional anchor position so it opens under the arrow, and opts out of the tab bar's window-drag region. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The demo found the Compare button with '.tabbar-actions .btn-ghost', which now matches the Save buttons too and fails Playwright's strict locator; select it by role and name like the other e2e scripts. Also quit explicitly once the window has closed: closing goes through the renderer, which cancels app.quit(), and on macOS the app then outlives its last window, so app.close() never returned and the recording timed out. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a Save split button to the tab bar, next to Compare.
⌘S/Ctrl+S(dispatchCommand(COMMANDS.save.id)), so Inspector drafts are committed first and the malformed-XML confirmation still applies. It is enabled only while the active document has unsaved changes (including an uncommitted Inspector draft); otherwise it is dimmed with the tooltip "No unsaved changes".dev:web) Save behaves like⌘Sthere: it downloads the file.Why
Saving was only reachable through the native File menu or the keyboard shortcut. The only on-screen hint of unsaved edits was passive (the dot on the tab, the count in the status bar).
Notes for review
TabBar.tsx(newSaveButton), a small optionalatanchor onuseContextMenu().openinContextMenu.tsx, and styles inapp.css(split button;.ctxopts out of the tab bar's window-drag region because the menu overlaps it by a few pixels).e2e/demo.mjs: the Compare button is now selected by role and name (the old.tabbar-actions .btn-ghostmatched the new buttons too — thanks to the Codex review). I also made the script quit explicitly after the window closes: since Preserve Inspector drafts across save and close commands #19 closing always goes through the renderer, which cancels Playwright'sapp.quit(), and on macOS the app then outlives its last window, sonpm run demohung and timed out. This was independent of this PR but blocked regeneratingdocs/demo.gif.docs/screenshots/*anddocs/demo.gif(every image with a document open includes the tab bar). It can be skipped when reviewing the code.anatomy.pngthe tab-bar buttons take a bit more room, so the last visible tab is cut off slightly earlier.Testing
npm run typecheckandnpm test(185 tests) pass.npm run screenshotsandnpm run demorun end to end on macOS (Electron + Playwright).🤖 Generated with Claude Code