Skip to content

Integrate #36 and #37 with review follow-ups - #38

Merged
b451c merged 8 commits into
mainfrom
integrate/pr-36-37
Oct 22, 2026
Merged

b451c merged 8 commits into
mainfrom
integrate/pr-36-37

Conversation

@b451c

@b451c b451c commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

CI gate for the local --no-ff merges of #36 and #37 plus follow-ups. main will be fast-forwarded to this branch once CI is green, so GitHub marks #36 and #37 as merged.

  • Merge Reload the document from disk on demand (⌘R) #37 (@rinh): Reload from disk on demand (⌘R, View ▸ Reload, ↻ pill)
    • follow-up 77c98cf: "Couldn't read the file" toast on a read failure; watcher restarted in every branch (also for a missing file); watch before read
    • 7c325f5: TextEdit display-name test pinned to English only under English (failed on a Chinese locale)
  • Merge fix(tabs): open files as tabs in full screen and Split View #36 (@onemannoplan): tabs in full screen and Split View (AppKit tabbing via the argument-domain AppleWindowTabbingMode=always, no late merge in full screen, no full-screen size memory)
    • follow-up 26fa99b: fallback host chosen from registered document windows, not by tabbingIdentifier; FakeWindow records merges; new negative-control test
  • afac0c8: Support pill never takes keyboard focus (blue ring with keyboard navigation on)

Local: 702 tests, Release + Release-APPSTORE builds; E2E on separate .proto builds (sandboxed and unsandboxed): reload toasts (unchanged / changed / unreadable / deleted + recreated), Source Edit and Reading Mode gating, ⌘R; full screen second file (old main: second full-screen Space, fixed: tab in place), Settings not tabbed, two tab groups; Support pill focus refused.

onemannoplan and others added 8 commits October 18, 2026 16:00
Opening a file while QuickMD was in full screen or Split View gave the
tab group a full-screen Space of its own: the Split View broke, half the
screen was black and the menu bar could not be revealed.

WindowConfigurator's callback runs only after the new window is on
screen (and, in full screen, already in a Space of its own), so its late
addTabbedWindow moved a window mid-transition. It also renamed every
window's tabbingIdentifier, so AppKit's own tabbing (on by default in
full screen) never matched the new window to the existing one.

- Keep SwiftUI's shared tabbingIdentifier and set AppleWindowTabbingMode
  to "always" in the argument domain at launch (QuickMD only, not
  persisted): AppKit tabs each new window as it is ordered in.
- Manual merge is a fallback for ordinary windows only; a window AppKit
  already tabbed is not resized.
- WindowSizeMemory ignores full-screen windows, so a Split View half is
  no longer remembered as the size for new windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Auto-reload relies on file-system events, which some network volumes and
editors' save strategies never deliver; the only way back to the current
text was closing and reopening the document. View ▸ Reload (⌘R) and a ↻ pill
in the top-right cluster re-read the file now and restart the watcher, so a
watcher that lost track of the file recovers too.

A toast says whether anything changed ("Reloaded" / "Reloaded · no
changes"); a missing file shows the existing "File no longer exists" banner.
Disabled while Source Edit shows: the session already follows the disk and
owns the conflict banner, so a second path to the same file would race it.

Routed through @focusedvalue like every other per-document command, so ⌘R
acts on the frontmost tab only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Follow-up to #37.

- A failed read (network volume error, chmod 000, sandbox denial) toasted
  "Reloaded · no changes": decoding never fails (Latin-1 fallback), so
  `reloadFromDisk` returned silently and the text compared equal. It now
  reports what it found and ⌘R says "Couldn't read the file".
- ⌘R on a missing file set the banner but skipped `startWatching`, so the
  old watcher stayed armed on a dead descriptor with no missing-file poll.
  The watcher is restarted in every branch; for a missing file it shows the
  banner itself and polls for the file's return.
- Watch first, then read: a write landing between the two is caught by the
  new watcher instead of being dropped with the old one's debounce.
- Pill cluster comment lists Reload (and no longer the removed
  "Open in editor" pill).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`appDisplayName` returns the localized name, as the toast should; on a Mac
set to Chinese it is "文本编辑" and the test failed (reported in #37). The
".app"-suffix and fallback checks still run in every language.

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

Follow-up to #36.

- The fallback merge matched hosts by `tabbingIdentifier`, which is now
  SwiftUI's own value. Shared across document windows on macOS 26, but not
  documented, and unverified on 13-15: if it differed per window, a second
  file would open standalone outside full screen, a regression from 1.12.
  Hosts now come from the windows WindowConfigurator registered (it lives in
  MarkdownView only), so the fallback works whatever SwiftUI picks, and the
  Settings or Tip Jar window can never become a document's host.
- Tests: FakeWindow records `addTabbedWindow` instead of performing it (the
  hidden-host assertion read an override that was never set); a test that a
  visible document host merges with a different identifier (fails on the
  identifier match); the full-screen tests also assert no merge happened.
- CHANGELOG: Fixed entry for #36, credit for #37.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With keyboard navigation on (System Settings > Keyboard), the Support
`Menu` (an NSPopUpButton underneath) kept first responder after a click
and AppKit drew a focus ring around it over the document. The other pills
already opt out through ChromePill's `.focusable(false)`; the Menu did not.

Verified on a .proto build with AppleKeyboardUIMode = 2: before, AX could
focus the pill (AXFocused settable, became the focused element); after,
it refuses focus, a click still opens the menu, and after Esc the focus is
back on the document table with no ring.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BhzVb6aPQs2FF1bHdkcYys
@b451c
b451c merged commit afac0c8 into main Oct 22, 2026
3 checks passed
@b451c
b451c deleted the integrate/pr-36-37 branch October 22, 2026 11:09
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.

3 participants