You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit deb93e9
Browse filesBrowse the repository at this point in the historyBrowse files
* fix(tui): per-route vertical reserve, required panel props (#1069 round-2 review)
Follow-up to the merged #1069, addressing the round-2 review.
- Split the vertical reserve per route: HOME_VERTICAL_RESERVE (10) and
SESSION_VERTICAL_RESERVE (7) accurately reflect each route's chrome (home has a
top spacer + footer; session doesn't), instead of one constant that fit only
session. Thresholds re-expressed in usable terms (MEDIUM_MIN_HEIGHT 13,
FULL_MIN_HEIGHT 34) so `full` still engages at a ~44-row terminal on home and
the classic 80x24 clears the medium floor with margin.
- Make WelcomePanel's availableWidth/availableHeight props REQUIRED (drop the
raw-terminal fallback + the component's own useTerminalDimensions), so a call
site that forgets to scale is a compile error, not a silent regression.
- Height now gets the same available-space treatment as width (terminal minus
the route's prompt/footer chrome), so a short window shrinks the panel instead
of crowding the prompt.
- Centralize PANEL_HORIZONTAL_PADDING (4) — was a bare `-4` in the home call site
and test helper.
Tests: add the sidebar-toggle transition (session 150x50 full -> medium when the
sidebar opens — the exact #1067 case), the classic 80x24 on both routes, and keep
the isolated-gate / boundary / degenerate coverage. tsgo clean; oxlint 0/0.
Reviewed by a 2-model consensus panel (both SOUND); the PANEL_HORIZONTAL_PADDING
and sidebar-toggle test came out of that review.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(tui): address welcome-panel round-3 review (reserves, overlay, tests)
- correct per-route vertical reserves to the real chrome: HOME 10->15,
SESSION 7->9, derived from PROMPT_REST_HEIGHT=6 plus the counted home_bottom
slot and footer (the prompt is 5-6 rows at rest, not ~4)
- retune height thresholds honestly: MEDIUM_MIN_HEIGHT 13->8 (the real medium
panel height, so 80x24 is a genuine medium fit, not a pinned margin),
FULL_MIN_HEIGHT 34->30 (a documented product breakpoint, not a fit minimum)
- centralize the route arithmetic: export homeAvailable/sessionAvailable and call
them from both the routes and the tests, so a wrong reserve/threshold fails a
test instead of being mirrored in a test-only copy
- centralize PANEL_HORIZONTAL_PADDING and add SIDEBAR_WIDTH (drop the duplicated 42)
- keep the panel on session's contentWidth basis (narrows with the sidebar, incl.
the dimmed overlay) so the panel stays aligned with the messages; documented
- tests: reserve-pinned-to-chrome, overlay narrowing, negative dimensions
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* test(tui): render-test the welcome panel variants (real component)
Mounts the real WelcomePanel through the app context stack at fixed available
sizes and asserts each variant renders its distinct content (full: "What is
Altimate Code"; medium: the condensed line, no what-is section; compact: the
single connect-CTA line). Covers the .tsx Switch that the pure
welcomePanelVariant unit test can't. Deliberately not a full Home/Session route
render — that drags in Prompt's ~28-context dependency graph; the route wiring
is now a shared one-liner through homeAvailable/sessionAvailable.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(tui): wrap panel-sizing memos in altimate_change markers; per-test renderer isolation; derive contentWidth from panelAvailable
- Marker Guard: home.tsx panelAvailable and session contentWidth/panelAvailable
are edits in upstream-shared files, now wrapped in altimate_change markers
- derive contentWidth from panelAvailable().width — one definition, can't drift
- render test: own the renderer per test (destroy + reset in finally) instead of
a shared module-level var, safe under parallel bun test
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments