Skip to content

Viewer: viewport-bounded frame; default to split layout + tree display - #67

Merged
AmberLJC merged 1 commit into
mainfrom
fix/viewer-bounded-frame-split-tree-default
Jul 29, 2026
Merged

Viewer: viewport-bounded frame; default to split layout + tree display#67
AmberLJC merged 1 commit into
mainfrom
fix/viewer-bounded-frame-split-tree-default

Conversation

@AmberLJC

Copy link
Copy Markdown
Contributor

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: body had only min-height: 100vh. A minimum doesn't bound a column-flex page, so the tree list's intrinsic height handed the .app-main grid its content height. Graph mode never triggered it because the SVG canvas has no intrinsic height.

Changes

  • crates/ara-viewer/public/styles.cssbody now uses a fixed height: 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.rsLayoutMode default Stack → Split, DisplayMode default Graph → 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/graph remain toolbar options; from_token falls 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 via scripts/embed-viewer.sh; --check passes.
  • Version 0.1.12 → 0.1.13 + changelog entry per AGENTS.md.

Verification

  • cargo test -p ara-viewer: 172 passed.
  • Manual, against 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

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>
@AmberLJC
AmberLJC merged commit b4f01d9 into main Jul 29, 2026
13 of 14 checks 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.

1 participant