Skip to content

Put Chat on the ground and the document on a raised sheet - #465

Merged
MaggieAppleton merged 16 commits into
mainfrom
nested-documents-ia
Oct 11, 2026
Merged

MaggieAppleton merged 16 commits into
mainfrom
nested-documents-ia

Conversation

@MaggieAppleton

@MaggieAppleton MaggieAppleton commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

What changes

Chat stops looking like part of the document. In the split workspace, Chat and its top bar now sit directly on the app background, and the document is the only raised sheet, rising to the top margin.

  • No Chat header. An expand control at the left of the Document / Decisions / Build tabs replaces it. When the document is expanded, the same button becomes Chat (inward arrows) and restores Chat. The choice is persisted as before.
  • Presence moves into the document's tab row, at the right end, in split. Compact keeps it in the header.
  • Composer uses --color-inset with no shadow, in every mode.
  • Compact layout is otherwise unchanged.

This is the first slice of the nested-documents work. The next PR stacks Lift and Zoom transitions for child documents on top of this sheet.

Before and after

Before (main)

Before: Chat and document share one frame

After: Chat on the ground, document as a sheet, presence in the tab row

After: split view

Expanded document, with the Chat restore button

Expanded document

Expanded, Projects sidebar collapsed

Expanded with sidebar collapsed

A research child opened while the parent is expanded. The parent's top bar stays visible for the child's breadcrumb.

Child over expanded parent

Compact (600px)

Compact layout

Behaviour notes

  • Expanding hides the top bar (breadcrumb, title, actions). The wrapper is inert and aria-hidden, so Tab never lands in it. It stays visible while a research child is open, because the child relies on it.
  • The toggle is one persistent button, so keyboard focus stays on it across the change. "Show chat" moves focus into Chat, as before.
  • If focus is in the top bar or Chat when the Chat shortcut hides them, focus moves to the toggle rather than <body>.
  • Reduced motion turns off the top-bar fade and the toggle feedback.

Testing

  • New e2e/paper-layout.e2e.ts covers expand and restore, the header being gone, presence position, sheet geometry, persistence, reduced motion, sidebar-trigger clearance, the compact and split round trip, and shortcut focus.
  • Updated 16 existing e2e suites. "Hide chat" became "Expand document", and presence is now read from the tab row in split.
  • bun run types, bun test and oxlint on the changed files pass. The targeted e2e suites pass on the rebased head, and the full bun run e2e passed before the rebase.

Design-contract review

Renewed in "Renew design-contract review for the paper layout" after a data-flow review, with the maintainer's approval:

  • workspace.tsx: the SurfaceToggle feedback spans reuse the reviewed motionContract("feedback") class. The ChatToggle exception was removed.
  • line.tsx: ExpandIcon and CollapseIcon follow the existing LineIcon pattern.

The child panel's sheet hairline is scoped away rather than suppressed with outline: none, which focus.test.ts forbids.

🤖 Generated with Claude Code

MaggieAppleton and others added 16 commits October 11, 2026 09:16
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ayout spec

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…spec

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ators

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The top bar now spans only the Chat column, so clicking 600px into the
banner landed on the document sheet; click the banner's trailing padding.
Chat no longer has a header, so Tab from the resize handle reaches the
composer (exempt from the focus ring); walk on to the next non-text control.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… harden child CSS

The top bar now hides with Chat only when no child covers the document, so a
child keeps its breadcrumb and Return control. The Chat shortcut moves focus to
the toggle when pressed from the top bar. The expanded-frame sidebar gutter
skips the child surface, and child overrides no longer depend on stylesheet order.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reviewed data flow:
- workspace.tsx: SurfaceToggle replaces ChatToggle. Its feedback class is the
  same motionContract("feedback").className the reviewed ChatToggle used, now on
  two spans (icon wrapper and unread dot) instead of a span plus img. The
  forwarded className prop was removed, so its exception is dropped.
  chatPresence.className on the Chat aside is unchanged; the --chat-width style
  moved to the root with the same measured pane width.
- line.tsx: ExpandIcon and CollapseIcon forward props to LineIcon like their
  siblings; exact cases added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaggieAppleton
MaggieAppleton merged commit 66b1890 into main Oct 11, 2026
3 checks passed
@MaggieAppleton
MaggieAppleton deleted the nested-documents-ia branch October 11, 2026 08:31
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