Skip to content

feat(herdr): show the Refactoria beard on the collapsed sidebar - #112

Merged
barbatdev merged 1 commit into
mainfrom
feat/herdr-collapsed-logo
Nov 1, 2026
Merged

barbatdev merged 1 commit into
mainfrom
feat/herdr-collapsed-logo

Conversation

@barbatdev

Copy link
Copy Markdown
Owner

Summary

  • On the collapsed macOS sidebar, refactoria-chrome draws the Refactoria beard alone (28px), centered under the traffic lights.
  • The mod resizes the layout's brand block to 84px while the sidebar is collapsed and back to 46px when it expands. It follows the rail whether it narrows through the toggle button or by dragging the edge, and asks for each resize once to avoid a render loop.
  • The expanded header is unchanged (beard + wordmark).

Verification

  • herdr-app check passes.
  • Live: collapsing and expanding the sidebar shows the beard alone and then the full logo again; hot reload picked up the change without a restart.

🤖 Generated with Claude Code

https://claude.ai/code/session_01A9D7phtHFYfszv6WKeXbiU

On the macOS rail the traffic lights fill the header row, so the logo was
hidden. The header now grows to 84px while collapsed and draws the beard
alone under the traffic lights, then returns to 46px when expanded.
@barbatdev
barbatdev merged commit a8cf11e into main Nov 1, 2026
1 check passed
@barbatdev
barbatdev deleted the feat/herdr-collapsed-logo branch November 1, 2026 15:04
@barbatdev

Copy link
Copy Markdown
Owner Author

Fleet review (glm)

Lens: requirements + adversarial. Small, self-contained mod change. Verified against the shipped layout herdr/desktop/layouts/refactoria.json on main: the 'brand' block exists (type block, content.mod refactoria-chrome, size.px 46), so find(layout(), "brand")?.size?.px resolves and the initial expanded height matches BRAND_PX. The once-per-change guard in syncBrandHeight holds under both synchronous and asynchronous layout updates (pendingBrandPx is cleared when current === want and short-circuits repeat asks), and the footer instance of the mod returns early before reaching the sync call, so only the header instance drives the resize. No linked issue; criteria taken from the PR body. Three non-blocking observations below; none produces wrong behavior on the paths I could verify.

Suggestion (2)

  • syncBrandHeight unconditionally forces brand px back to 46 on every render, overriding any custom expanded height (herdr/desktop/mods/refactoria-chrome/main.js:37): When not on the macOS rail, syncBrandHeight(BRAND_PX) resizes the brand block to 46 whenever its current px differs, on every platform and every render. The PR states 'The expanded header is unchanged', but a user who customizes the brand block's size.px in refactoria.json (e.g. to 64) will have it silently reset to 46 on first render by this mod. Consider whether the mod should own the expanded height at all, or only restore 46 after the rail grew it to 84.
  • Beard sits at the bottom of the 84px header, slightly below the visual center of the space under the traffic lights (herdr/desktop/mods/refactoria-chrome/main.js:67): The rail header uses justify_end().pb(10) with a 28px image: the beard's top edge lands at 84 - 10 - 28 = 46px from the header top. The free space under the traffic lights (~28px tall) extends to 84px, so its vertical center would put the beard top around 42px (pb(14)). The claim 'centered under the traffic lights' is approximately but not exactly satisfied; purely visual, confirm the offset is intentional.

Question (1)

  • PR claims the resize follows the rail 'by dragging the edge', but the sidebar is not resizable (herdr/desktop/mods/refactoria-chrome/main.js:33): The PR body states the mod follows the rail 'whether it narrows through the toggle button or by dragging the edge'. In herdr/desktop/layouts/refactoria.json the sidebar block is declared with "resizable": false (min 44, max 480), so the drag path cannot be exercised with the shipped layout. The syncBrandHeight code handles any narrowing mechanism generically, so behavior is safe either way, but the drag claim in the verification summary is unverifiable as written.

Verdict: ready to merge

@barbatdev

Copy link
Copy Markdown
Owner Author

Post-merge QA (glm)

Lens: requirements + adversarial. Small, self-contained mod change. Verified against the shipped layout herdr/desktop/layouts/refactoria.json on main: the 'brand' block exists (type block, content.mod refactoria-chrome, size.px 46), so find(layout(), "brand")?.size?.px resolves and the initial expanded height matches BRAND_PX. The once-per-change guard in syncBrandHeight holds under both synchronous and asynchronous layout updates (pendingBrandPx is cleared when current === want and short-circuits repeat asks), and the footer instance of the mod returns early before reaching the sync call, so only the header instance drives the resize. No linked issue; criteria taken from the PR body. Three non-blocking observations below; none produces wrong behavior on the paths I could verify.

Suggestion (2)

  • syncBrandHeight unconditionally forces brand px back to 46 on every render, overriding any custom expanded height (herdr/desktop/mods/refactoria-chrome/main.js:37): When not on the macOS rail, syncBrandHeight(BRAND_PX) resizes the brand block to 46 whenever its current px differs, on every platform and every render. The PR states 'The expanded header is unchanged', but a user who customizes the brand block's size.px in refactoria.json (e.g. to 64) will have it silently reset to 46 on first render by this mod. Consider whether the mod should own the expanded height at all, or only restore 46 after the rail grew it to 84.
  • Beard sits at the bottom of the 84px header, slightly below the visual center of the space under the traffic lights (herdr/desktop/mods/refactoria-chrome/main.js:67): The rail header uses justify_end().pb(10) with a 28px image: the beard's top edge lands at 84 - 10 - 28 = 46px from the header top. The free space under the traffic lights (~28px tall) extends to 84px, so its vertical center would put the beard top around 42px (pb(14)). The claim 'centered under the traffic lights' is approximately but not exactly satisfied; purely visual, confirm the offset is intentional.

Question (1)

  • PR claims the resize follows the rail 'by dragging the edge', but the sidebar is not resizable (herdr/desktop/mods/refactoria-chrome/main.js:33): The PR body states the mod follows the rail 'whether it narrows through the toggle button or by dragging the edge'. In herdr/desktop/layouts/refactoria.json the sidebar block is declared with "resizable": false (min 44, max 480), so the drag path cannot be exercised with the shipped layout. The syncBrandHeight code handles any narrowing mechanism generically, so behavior is safe either way, but the drag claim in the verification summary is unverifiable as written.

Verdict: clean

@barbatdev

Copy link
Copy Markdown
Owner Author

Post-merge QA (deepseek)

Lens: evidence + test design. PR #112 makes the collapsed macOS rail header draw the Refactoria beard alone (28 px, bottom-aligned under the traffic lights) and keeps the layout's brand block in step: 84 px on the rail, 46 px otherwise, driven by a module-level pendingBrandPx guard so the render-time resize is requested once per change. The merged file resolves correctly against its own dependencies — find() is the local helper defined at line 8, narrow() reads the sidebar width (so drag and toggle both count), and the resize-during-render pattern with a change guard already exists in this repository (herdr/desktop/mods/refactoria-spaces/main.js:462). No blocking defect found. The evidence gaps are the ones this kind of mod always has: the merge commit's only check is "Smoke checks" (completed/success), the PR's herdr-app check and live verification are not reproducible from the PR (no command, no output), and the brand-height transitions have no automated coverage at all.

Suggestion (1)

  • The brand-height transitions have no reproducible check behind them (herdr/desktop/mods/refactoria-chrome/main.js:64): The two states this PR introduces are decided by two predicates sampled at render time (collapsed from narrow() < 160 px and window()?.platform === 'macos') plus the syncBrandHeight guard. The PR verifies them only by hand ("herdr-app check passes" and a live collapse/expand), and the merge commit ran only "Smoke checks". The test conditions that would turn that into evidence, expressible against the mod API: (a) platform darwin with sidebar 76 px → brand 84 and the beard view returned; (b) platform darwin with sidebar 268 px → brand 46 and the full header with wordmark and toggle; (c) platform linux with sidebar 44 px → brand 46 and the header (no rail branch); (d) sidebar dragged between 159 and 160 px → the state flips once and syncBrandHeight issues exactly one resize per transition.

Question (1)

  • pendingBrandPx is module state shared by every render of the mod (herdr/desktop/mods/refactoria-chrome/main.js:35): The "asks once per change" guarantee depends on a single module-level variable rather than per-view state. That is fine for one chrome instance, but if two chrome headers ever render in the same JS context, the guard is shared: with window A collapsed (want 84) and window B expanded (want 46), each render sees pendingBrandPx from the other and would re-issue layout.resize every pass, and the resize target (find(layout(), 'brand')) is whatever layout() resolves in that context. The single-layout file (herdr/desktop/layouts/refactoria.json) suggests one window, so this is a question rather than a defect: please confirm the mod is never rendered for more than one window at a time, or scope the pending value per view.

Verdict: clean

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.

1 participant