Skip to content

fix(insights): keep window controls last in toolbar - #124

Merged
GaganSD merged 4 commits into
GaganSD:mainfrom
edalicioh:fix/insights-toolbar-window-buttons
Nov 16, 2026
Merged

GaganSD merged 4 commits into
GaganSD:mainfrom
edalicioh:fix/insights-toolbar-window-buttons

Conversation

@edalicioh

@edalicioh edalicioh commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #123

Summary

  • Accept a tabs block backed by any mod, so a personal clone of the tab bar (tabs-graph, ...) can be wrapped instead of refused.
  • On Windows and Linux place the Insights button before the tab bar, so the bar's own minimize/maximize/close stay last. macOS keeps the button after the bar, clear of the traffic lights.
  • Cover both placements and a cloned tab bar in the layout unit test.
  • Document the placement in INSTALL.md and update the child-order spec in RECIPE.md.

Scope

The change is limited to withInsightsToolbar() in herdr-insights/scripts/toolbar.mjs, its unit test, and the two docs that define the layout (4 files). An earlier revision of this PR also edited the README and development guide and added an installer integration test with a new fixture; those were dropped as redundant.

Notes

  • Reinstall never rewrites the owned layout, so an existing install keeps its old placement. Uninstall and install again to move the button.
  • Placement is chosen from the installer's OS only.

Validation

  • npm run test:insights (310 passing, macOS)
  • npx eslint herdr-insights/scripts/toolbar.mjs tests/herdr-insights/toolbar-layout.test.mjs
  • The Windows/Linux ordering was loaded into a live Herdr window on macOS and rendered without errors. It has not been checked on a real Windows or Linux window since the scope-down.

edalicioh and others added 4 commits November 8, 2026 07:54
The installer refused any layout whose tab bar is a personal clone
(content.mod other than "tabs"), and when it did install it placed the
Insights button after the tab bar. On Windows and Linux the tab bar draws
minimize/maximize/close at its own end (window().buttons), so the button
landed after them and the window buttons were no longer last.

- accept any mod-backed "tabs" block, not just Herdr's own tabs mod
- place the button before the bar on Windows/Linux and after it on macOS,
  where a leading button would collide with the traffic lights
- inject the platform so both placements are covered by tests, and cover
  a cloned tab bar end to end
- update INSTALL.md, README.md and the development guide
Keep the approach from this PR (accept a cloned tab bar; lead with the
button off macOS so the bar's own minimize/maximize/close stay last) and
trim it to the composition function, its unit test, and the two docs that
specify the layout.

- reverse the two children instead of restructuring the row
- drop the installer integration test and fixture; the layout unit test
  covers both placements and a cloned bar
- move the docs to INSTALL.md and RECIPE.md, which define the layout; the
  README and development guide wording still holds
- update RECIPE.md, whose child-order spec was left stale

Refs GaganSD#123
@GaganSD
GaganSD merged commit 819ac53 into GaganSD:main Nov 16, 2026
1 check passed
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.

Insights toolbar button is placed after the window controls on Windows

2 participants