Skip to content

suite: a library with extension surfaces, and tabs that tear off into a window (#1865) - #1866

Closed
yeroo wants to merge 2 commits into
mainfrom
issue-1865-suite-extension-surfaces-tear-off
Closed

yeroo wants to merge 2 commits into
mainfrom
issue-1865-suite-extension-surfaces-tear-off

Conversation

@yeroo

@yeroo yeroo commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Closes #1865.

What changed

  • The suite is a library. Package docxy-suite, lib docxy_suite, with pub fn run(ext::Extensions). The suite binary (src/bin/suite.rs) calls run(Extensions::default()), so the public build behaves as before.
  • Extension surfaces (ext.rs). Extensions::mail is an optional factory for a Mail tab's body (Surface::Ext, a TabSurface view). While it is active, it has the keys, the suite draws no ribbon row over it, keys it doesn't stop still reach the suite's routing (Ctrl+Tab, Ctrl+W…), ext::ShowBackstage opens File, and the theme's light/dark reaches it. It saves as nothing, as the placeholder did. With no factory, Mail is the placeholder, unchanged.
  • Tabs tear off (tab_tear.rs). A tab chip dragged more than 36 px above or below the strip (or out of the window) and released moves that tab into a new window near the release, through View › Window › New Window (now new_window_at). The tab keeps its surface, so its state comes along. A release on the strip still reorders. This works for every tab kind.
  • CLAUDE.md documents the library and extension seam.

Tests

  • tab_tear unit tests for the drop-zone decision.
  • The change was first written and checked in another session on Linux (Xvfb + Openbox): suite unit tests 2731/2731 passed, clippy -D warnings was clean, and an xdotool drag of a tab chip produced a second window while the source kept its other tab. On this machine the patch applies cleanly to main at 3ca6955, but there is no gpui build environment here, so CI is the build and test check for this push.

Not in this PR (follow-ups)

  • Dropping a torn-off tab back onto another window's strip (gpui drags don't cross windows; View › Window moves tabs meanwhile).
  • A harness verb and .uit case for the tear.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HSDL3oQAMuX4msSFzPJBq6

@codecov-commenter

codecov-commenter commented Nov 4, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

yeroo and others added 2 commits November 4, 2026 18:53
… a window (#1865)

- The suite is a library (`docxy-suite`, lib `docxy_suite`, `src/lib.rs`)
  with `run(ext::Extensions)`; the `suite` binary passes none, so the
  public build is unchanged.
- `ext::Extensions::mail` makes a Mail tab's body (`Surface::Ext`, a
  `TabSurface` view): it has the keys while active, no suite ribbon row
  is drawn over it, `ext::ShowBackstage` opens File, and the theme's
  light/dark reaches it. It saves as nothing, as the placeholder did.
- A tab chip dragged away from the strip (or out of the window) and let go
  moves the tab to a new window near the release, through New Window
  (`tab_tear.rs`, `new_window_at`); a release on the strip still reorders.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HSDL3miYqxJVj2XRCvBfPf
@yeroo
yeroo force-pushed the issue-1865-suite-extension-surfaces-tear-off branch from 92a0a99 to 0fc697c Compare November 4, 2026 14:53
@yeroo

yeroo commented Nov 4, 2026

Copy link
Copy Markdown
Owner Author

[boriskudriashov] Duplicate of #1867 (same tree, 75d03b72), which was opened first for #1864. Closing this one.

@yeroo yeroo closed this Nov 4, 2026
@yeroo
yeroo deleted the issue-1865-suite-extension-surfaces-tear-off branch November 4, 2026 15:16
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.

Suite: a library with extension surfaces, and tabs that tear off into a window

2 participants