Skip to content

Tool window: tabs across the four views, maximize, one rail - #123

Merged
thethinkmachine merged 1 commit into
mainfrom
claude/beautiful-volta-ub4nfc
Oct 1, 2026
Merged

thethinkmachine merged 1 commit into
mainfrom
claude/beautiful-volta-ub4nfc

Conversation

@thethinkmachine

Copy link
Copy Markdown
Owner

The window that Library, Algorithms, Grammar and Reference share had a title bar that only named the open view and offered a close button. To get from one view to another you had to close the window and reopen it from the More menu. This PR turns the window's bar into a tab strip and makes the four views look like parts of one window.

What changed

Tab strip in the bar. The bar now holds four tabs, in this order: Library, Algorithms, Grammar, Reference.

  • The tabs are built from AUX_META, so each view's name and icon are defined in one place.
  • Only the selected tab is a Tab stop (roving tabindex), and Arrow/Home/End move between tabs.
  • Each view's old subtitle is now that tab's tooltip, along with its shortcut key.
  • None of the bar's controls are added to bridge.js.

Shortcut keys follow the tab order. AUX_VIEWS sets the order for the strip, the More menu's Explore group and the number-key shortcuts. auxViewKey() works out each view's key from its position. Because Library moved to the front, the keys change: Library is now 2, Algorithms 3, Grammar 4, Reference 5. Before, they were Algorithms 2, Grammar 3, Reference 4, Library 5.

Maximize.

  • A new button toggles the window between its normal size and nearly the full screen, with a 12px margin. It reports its state with aria-pressed.
  • Double-clicking an empty part of the bar does the same.
  • The choice is remembered per reader in automata-aux-max. It is desktop only, since below 900px the window is already full-screen.
  • There is no minimize button: every view already keeps its place when you close the window.

Which machine Algorithms will use. While Algorithms is open, the bar shows the machine on the canvas, for example DFA · 5 states · 7 transitions. The canvas is hidden behind the window, so this was otherwise only visible after closing it.

One shape for the four side menus. They were 200, 208, 190 and 190px wide (two set with inline styles) and used two different fonts, so the menu's edge jumped when switching between views. They now share one width (--aux-rail-w), one row style in sans, and one group-heading style.

Smaller fixes

  • The close button no longer turns red on hover. Its tooltip now says "Back to canvas — this view keeps its place".
  • The "Reference" tab drops the word "Automata".
  • Messages telling you to "build an automaton first in the Build tab" pointed at a tab that no longer exists. They now say "Draw … on the canvas first" and offer a Back to canvas button.
  • On phones, the tabs show icons only, plus the name of the active tab.

Testing

  • npm test: 2621 passed, 0 failed. This includes the new tests/aux-window.test.js, which covers the tab order and selection, the arrow keys, Library being first with the More menu and keys in the same order, maximize being remembered, the machine label, and the single menu width.
  • npm run build succeeds.
  • Checked in Chromium at 1440×900 and 390×844: no page errors, the 2 key opens Library, and maximize persists across reloads.

Worth trying by hand: switching between tabs on a machine you've built, maximize on a large monitor, and the new number keys. If you'd rather keep the old key numbers, I can revert that part.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HPVKDwzQWjyqE1nApBQt6s


Generated by Claude Code

The window Library, Algorithms, Grammar and Reference share had a title
bar that named the open view and offered only a close button, so moving
between views meant closing the window and reopening it from the More
menu. Its bar is now a tab strip across the four, Library first, built
from AUX_META so a view is named and iconed in one place.

- Tabs: roving tabindex, Arrow/Home/End, the old subtitle as each tab's
  tooltip with its shortcut. AUX_VIEWS is the order of the strip, the
  More menu and the digits; auxViewKey() derives the digit from the
  position, so Library is now 2 and the tools 3-5.
- Maximize: a toggle (aria-pressed), remembered per reader, desktop
  only; double-clicking the bar does the same. No minimize - every view
  already keeps its place when closed.
- The canvas machine is named in the bar while Algorithms is open.
- The four rails share one width and one row face (they were 200, 208,
  190 and 190px, two of them inline, in two different fonts).
- Close hovers neutral rather than red.
- Empty-canvas messages pointed at a Build tab that no longer exists;
  they now offer a Back to canvas button.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HPVKDwzQWjyqE1nApBQt6s
Copilot AI balanced review requested due to automatic review settings October 1, 2026 02:44
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@thethinkmachine
thethinkmachine merged commit 86fb693 into main Oct 1, 2026
18 checks passed
@thethinkmachine
thethinkmachine deleted the claude/beautiful-volta-ub4nfc branch October 1, 2026 02:50
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.

3 participants