Skip to content

Inbox: thread title always in the header bar (visible change for all users) + "Open beside" behind a hidden switch - #3477

Draft
backnotprop wants to merge 9 commits into
mainfrom
refactor/inbox-pane-address
Draft

backnotprop wants to merge 9 commits into
mainfrom
refactor/inbox-pane-address

Conversation

@backnotprop

@backnotprop backnotprop commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

This PR has two parts.

  1. A visible change for every user (not behind any switch): the thread's title is always in the pane's header bar.
  2. The first slice of the multi-thread view, "Open beside", behind a hidden switch that is off by default. Follows Inbox: each pane opens and reads its own thread #3464.

1. The thread title always sits in the header bar (all users)

Before. A short thread (one message, or a thread that does not fill the pane) showed its title as a large heading inside the body and left the header bar empty. A long thread showed the title in the bar only once the body heading had scrolled away.

Now. Every thread pane works the same way: one pane or two, desktop, stacked window, full screen, beside a file, and phone.

  • The title always sits in the bar, in the form a scrolled long thread showed: the thread's name by the list's rule (threadChipName), else its heading (the subject, or a review's title in Reviews).
  • The large heading inside the body is gone.
  • A long title is cut with "…" and shows whole in its tooltip on hover. Under a name, the tooltip always shows the whole subject.

What changed in the code:

  • The heading. The bar's title is now the pane's h2.ib-subject, so focus fallbacks and screen readers still find "the thread's heading". Under a name, its aria-label adds the subject. The hidden "Thread name: …" line is gone.
  • Removed (the old two-mode header).
    • the scroll measuring that switched the bar title on and off (chrome.subject, data-on);
    • the empty-bar branch for one-message threads;
    • the body's hero mark for the "dot" mark style: HeadMark now draws the bar mark for every style;
    • .ib-subject as a place candidate in threadPlace.ts.
  • Not changed. Renaming in place: a thread title is not editable in place today. The "New since you looked" divider and the new-message pill never measured the heading. The tour's own fixture thread and the scheduled-message editor keep their own large .ib-subject type.
  • Thread.tsx: 6061 → 6046 lines (ceiling lowered).

2. "Open beside" (hidden switch inboxSplitView)

The switch. inboxSplitView: true in config.json. It has no Settings row and is not in the public docs. Every settings read checks the file, and the read carries split_view: { on: true } only while the key is on. When the key is off, the menu item does not exist and nothing else changes.

What it does. A thread row's menu offers "Open beside" while another thread is open. Choosing it opens that thread in a second pane.

  • Layout. The thread list stays on the left, and the two panes share the rest of the width at 50/50, with one draggable divider (30–70% of the panes' room).
  • Each pane. A real ThreadSlot with its own header, scroll, reply box and ✕.
  • The sidebar behaves as in the one-pane view, except when it leaves too little room for two threads (see below).
  • Active pane. The person is in the new pane. A click or focus in the other pane makes it active. The other pane's header is quieter (surface tokens only: no border, outline, accent or new label).
  • Only the active pane marks seen. Messages that arrive in the other pane stay unread until the person clicks into it.
  • Closing. Closing either pane returns to today's single pane. The only words on screen are "Open beside" and the existing close label.

Hiding and showing the list. This reuses the existing controls and their state; nothing new was added.

  • The list's edge ("Click to hide the list") hides the list and the sidebar, and the two threads get the whole window.
  • To bring them back, use the first pane's "‹ Inbox", the same control as one-pane full screen, or Escape.
  • The sidebar's own toggle works as it does today.
  • If a pair loses its room (the person opens the sidebar, or the window is narrowed), it covers the list the way one thread does in a stacked window. The first pane then shows the stacked window's "‹ Inbox". Both panes keep their ✕.

New width minimum. The item is offered whenever the list and two readable thread columns fit with the sidebar folded:

Width
Room needed (Soft look) 380 px list + 2 × 440 px threads + 4 gutters = 1292 px window
Room needed (flat look) 1260 px window

The 440 px is the narrowest thread column the window already draws (beside a file, stack.ts). A pair goes back to one pane below 904 px (two threads and nothing else).

The sidebar folds for room. At 1440 px with the default 232 px sidebar docked, the item is offered. Choosing it folds the sidebar on screen, using the same on-screen fold that "‹ Inbox" from a file already uses (sidebarHeld, now panes/sidebarHold.ts, moved out of App.tsx). The person's stored sidebar choice is not written. Closing the second pane brings the sidebar back. A sidebar the person folded stays folded, and if the person opens or folds the sidebar while the two are open, their choice wins.

Address-based pieces. Record pause, catch-up, machine frames and held writes, launched deliveries, useStaleOpenRead, Shift+R (active pane), pick saves (own pane) and Try again are done. Still address-based, because they mean "the thread the person is in": the look after a restart that adopts a read, and the notification threadOnScreen.

Fixed while taking screenshots. The pane the person left showed "Opening the thread…". useHeldThread now takes onScreen, which keeps a thread that is already drawn on screen (useActiveHeld does the same for App).

Tests

  • Header.
    • threadHeader.test.tsx and threadNameMeta.test.tsx are rewritten for one behavior: the title is in the bar from the first draw, also on one-message and unnamed threads; there is no heading in the body; the name's label carries the subject.
    • The e2e specs that asserted the old two-mode header are updated: inbox-thread-header, inbox-thread-folding, inbox-phone-thread-header and inbox-replaced.
    • On a named thread the bar shows the name, so specs that read the heading's text for the subject now read its accessible name (name: subject): inbox-thread-panel, inbox-links-in-place.
  • Panes.
    • openBeside.test.tsx covers: offered at 1440 with the sidebar docked, and choosing it folds the sidebar; closing the second pane restores it; no fold when the sidebar fits too; the person's own fold kept, also after they open and fold it again while two are open; no item below 1292 px.
    • twoSlots.test.tsx adds: with the list hidden or covered, "‹ Inbox" appears in the first pane only and both panes keep their ✕; the pane the person leaves keeps its thread.
    • stack.test.ts adds the two-pane stacking edge and the extra gutter.
  • Browser spec. inbox-open-beside.spec.ts covers:
    • at 1600, the list visible beside two panes;
    • unread state in the other pane;
    • hiding the list with its edge and bringing it back with "‹ Inbox";
    • closing one pane;
    • at 1440 with the sidebar docked: offered, the sidebar folds (not written), and closing the pane restores it;
    • at 1240, no item;
    • with the switch off, no item.
  • Also passing locally: the ThreadPane DOM suite, inbox-structure, the pane tests, headFit, letterMarks, toast, threadFolding, threadTagsStep2.
  • Not run locally because they start an Inbox: leakedSubject.test.tsx, tour.test.tsx, threadReadRetry.test.tsx and packages/server/inbox-split-view.test.ts. CI runs them.

e2e: inbox-open-beside.spec.ts, inbox-thread-panel.spec.ts, inbox-links-in-place.spec.ts, inbox-thread-header.spec.ts, inbox-phone-thread-header.spec.ts, inbox-thread-folding.spec.ts, inbox-replaced.spec.ts, inbox-mobile.spec.ts, inbox-seen-on-sight.spec.ts, inbox-open-stays-put.spec.ts, inbox-mark-read.spec.ts, inbox-machines.spec.ts, inbox-keyboard-journeys.spec.ts, inbox.spec.ts

Records, catch-up, a linked machine's frames and held writes, a launched
session, the inbox refresh, the person's own writes and the stale-copy
re-read now read each thread a pane shows (panes/shownReads.ts), not only
the address's. Pick saves name the pane's own thread; Shift+R on a thread
refreshes the active pane's. App.tsx 6600 -> 6564 lines.
A hidden config.json key (inboxSplitView, default off, no Settings row)
lets a row's menu open its thread in a second pane beside the open one.
The two panes share the window as full screen does, each a ThreadSlot
with its own header, scroll, reply box and close. Only the active pane
counts what it shows as seen; a click or focus in the other makes it
active. Closing either pane is one pane again. A fixed 50/50 split with
one draggable divider. Offered only from 904 px wide (two 440 px thread
columns and the gutters); a narrower window collapses to one pane.

A pane the person leaves keeps showing its thread: useHeldThread takes
onScreen, so a copy already drawn is not hidden as an opening would.
@backnotprop backnotprop added the ci:e2e Run the full browser suite (Inbox window e2e) on this PR label Nov 16, 2026
- The thread title always sits in the pane's header bar (all users): the
  large in-body heading and the scroll-switched two-mode header are gone.
- Open beside: the list stays on the left and the two panes share the rest;
  offered only when the list and two 440 px threads fit beside the docked
  sidebar. The list's edge hides the list and the first pane's Inbox
  button brings it back; a pair that loses room covers the list.
@backnotprop backnotprop changed the title Inbox: "Open beside", a second thread pane behind a hidden switch Inbox: thread title always in the header bar (visible change for all users) + "Open beside" behind a hidden switch Nov 16, 2026
…le name; Open beside's narrow check seeds its own rows
…for room

The item is offered whenever the list and two 440 px threads fit with the
sidebar folded (1292 px). Choosing it folds a docked sidebar that leaves too
little room, on screen only (the person's choice is not written), and
closing the second pane brings it back. A sidebar the person folded stays
folded. The on-screen fold moves out of App.tsx into panes/sidebarHold.ts.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:e2e Run the full browser suite (Inbox window e2e) on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant