Viewer: viewport-bounded frame; default to split layout + tree display - #67
Merged
Merged
Conversation
Two user-facing fixes to how the exploration trajectory reads:
- body now uses a fixed 100vh/100dvh height instead of min-height. With
only a minimum, a tall tree-mode node list handed the grid its content
height and the whole page grew (a 116-node artifact stretched the page
to ~7000px and scrolled the header away). A bounded frame lets the
existing `.panel { overflow: auto }` do its job: the node list scrolls
inside its own pane.
- LayoutMode now defaults to Split (map left, detail right) and
DisplayMode to Tree, so the trajectory reads top-to-bottom in a fixed,
independently scrollable left pane on first load. Stack and Graph stay
available from the toolbar; from_token falls back to the new defaults.
Bundle regenerated via scripts/embed-viewer.sh (--check passes);
cargo test -p ara-viewer: 172 passed. Version 0.1.13 + changelog entry.
Co-Authored-By: Claude Fable 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.
Problem
In tree mode, a long node list made the whole page grow instead of scrolling inside the left pane — a 116-node artifact stretched the page to ~7000 px, the header/toolbar scrolled away, and the trajectory could not be browsed "in a range".
Root cause:
bodyhad onlymin-height: 100vh. A minimum doesn't bound a column-flex page, so the tree list's intrinsic height handed the.app-maingrid its content height. Graph mode never triggered it because the SVG canvas has no intrinsic height.Changes
crates/ara-viewer/public/styles.css—bodynow uses a fixedheight: 100vh+height: 100dvh(dvh for mobile browser toolbars, vh fallback). The viewport bounds the app frame, so the existing.panel { overflow: auto }makes each pane its own scroll container.crates/ara-viewer/src/state.rs—LayoutModedefaultStack → Split,DisplayModedefaultGraph → Tree: on first load the exploration trajectory reads top-to-bottom in a fixed, independently scrollable left pane with the step detail beside it.stack/graphremain toolbar options;from_tokenfalls back to the new defaults. Tests updated.crates/ara-viewer/src/lib.rs— default-mode comments updated.crates/ara-cli/assets/viewer/+viewer.source-hash— bundle regenerated viascripts/embed-viewer.sh;--checkpasses.0.1.12 → 0.1.13+ changelog entry per AGENTS.md.Verification
cargo test -p ara-viewer: 172 passed.the-ara-of-ara(116 nodes) with a freshly built binary: fresh load opens in split + tree;body.scrollHeight == innerHeight(page bounded); left pane scrolls 6941 px of content inside a 901 px box; header/toolbar and detail pane stay fixed while scrolling.🤖 Generated with Claude Code