Skip to content

Generate landing and App Store screenshots from the real app - #834

Merged
pondorasti merged 9 commits into
mainfrom
codevisor/peanut
Oct 26, 2026
Merged

pondorasti merged 9 commits into
mainfrom
codevisor/peanut

Conversation

@pondorasti

Copy link
Copy Markdown
Member

Adds the tooling that produced the landing page's bento renders and the App Store / landing screenshots, all from the real app UI on a fixture "demo world" instead of HTML recreations. Everything new is DEBUG-only and runs only in screenshot or render mode; release builds are unchanged.

What it adds

Demo world. apps/shared/Screenshots/DemoWorld.swift is the single source of fixture data: three machines (This Mac, Mac Studio, VPS), five projects with one chat per workspace, two accounts, Linear / Notion / Sentry MCPs, harness versions with pending updates, machine stats, usage limits, context, and a clock pinned to Wednesday, August 8, 2001, 14:05 (24-hour). DemoServerClient answers the app's server calls from it, including a navigation snapshot, so the screenshots render the real Mac SidebarView and iOS HomeView sidebars (grouped by machine) instead of hand-built copies, which are deleted.

Direct capture scripts (no XCUITest automation-mode approval, no simulator owner):

  • Mac: window, fullscreen (14" MacBook Pro), worktree picker, inspector, and full-desktop shots.
  • iOS: a throwaway headless simulator per run with 24-hour time and the status bar pinned to 14:05; adds iPhone 18 Pro and a landscape iPad Pro 11 (rotated by one UI test, resize grabber erased afterwards).

Bento renderer. A DEBUG-only render mode in the Mac app renders real views at 2x, light and dark: MCP / harness / accounts / sounds / updates / usage-limit / Chrome extension / Computer Use / simulator settings sections, full Settings windows, the workspace inspector's Machine / Usage / Context, a Ghostty terminal running a real bun run dev, and the Simulator pane on a throwaway simulator showing the emojis page in Safari. Separate scripts capture the real macOS notification banners and the real Linux installer in a Ghostty window.

Regenerate everything

bun run bento:render                                      # all bento cards → tmp/bento-shots
bun run bento:notifications                               # banners (needs notification permission for com.851labs.Codevisor.Screenshots)
bun run bento:linux-install                               # real installer in a throwaway Ubuntu container, in a new Ghostty window
bun run screenshots:macos:direct                          # App Store Mac set (window)
bun run screenshots:macos:direct --fullscreen             # landing, 14" MacBook Pro
bun run screenshots:macos:direct --worktree-picker        # Run in menu crop
bun run screenshots:macos:direct --inspector              # inspector window crop (also run by bento:render)
bun run screenshots:macos:direct --desktop --inspector --appearance light|dark   # whole display; system appearance must match
bun run screenshots:ios:direct --device iphone            # App Store iPhone
bun run screenshots:ios:direct --device iphone-18-pro     # landing iPhone
bun run screenshots:ios:direct --device ipad-pro-11       # landing iPad (landscape)

Each script takes --output and, where it applies, --appearance and --skip-build; see --help.

Production files that changed, and why

All default to today's behavior:

  • UsageLimitNotice takes an optional now:, so its "Resumes at…" text can use the pinned clock.
  • UpdateCenter.now is an injectable clock, so "Last checked" is deterministic.
  • WorkspaceInspectorUsageSection reads an optional inspectorNow environment value for its pace captions, and formats "Resets in …" against that same clock. The output is unchanged when the value is nil.
  • RunPickerMenu takes an optional isPresented binding, and New Chat passes its own state, so screenshot mode can open the Run in menu.
  • SimulatorSettingsView is now public, for the bento card. SimulatorPaneModel gains a DEBUG-only preview factory.
  • ChatNotificationManager.authorizationStatus() reports .authorized while AppPreview.isRunning, so previews and renders show the granted state.
  • CodevisorGhosttyApp skips loading the user's Ghostty config files in DEBUG screenshot and render modes.
  • SidebarView hides the development-worktree row while AppPreview.isRunning.
  • AppDelegate skips the client runtime in screenshot mode (DEBUG only).
  • HomeSidebarSampleData stops serving the old App Store entries; its own QA sample is unchanged.

Not covered yet

  • Mac App Store screenshot UI test: testCaptureScreenshots on macOS needs automation-mode approval, so it wasn't run here. The iOS landscape test runs as part of screenshots:ios:direct. The direct scripts replace the XCUITest capture path for the published shots, but the UI tests are updated to the new demo data.
  • Appearance-dependent captures: bento:linux-install captures only Ghostty's default dark theme. The --desktop and bento:notifications captures need the system appearance switched between runs, and the desktop shot needs the menu bar extras hidden by hand.
  • Ghostty card: it's the terminal pane only. A titled window doesn't redraw the embedded Ghostty surface. bento:linux-install covers the full-window case with the standalone Ghostty app.
  • Simulator pane: its screen is a still screenshot of the throwaway simulator, not a live stream.

Checks

  • macOS and iOS Debug builds pass, on the first commit alone and on the full branch.
  • format:check, lint, comments:check, ratchet:check and typecheck:configs pass, as does swift-format lint --strict on the changed Swift files.
  • dev:scripts:test: 132 of 133 pass. The one failure, swift-lint-baseline.test.mjs, fails identically on main.
  • swift:lint: 202 function_body_length errors, the same set as on main, so no new violations. This is the known baseline issue.

🤖 Generated with Claude Code

pondorasti and others added 9 commits October 23, 2026 21:51
App Store and landing screenshots now come from one fixture world,
DemoWorld: three machines (This Mac, Mac Studio, VPS), five projects with
single-chat workspaces, accounts, MCP servers, harness versions and
pending updates, machine stats, usage limits, context, and a clock pinned
to Wednesday, August 8, 2001, 14:05. DemoServerClient answers the app's
server calls from it, including a navigation snapshot, so the Mac and iOS
screenshots render the real SidebarView and HomeView sidebars grouped by
machine instead of hand-built copies.

Screenshot-mode hooks stay behind DEBUG: opening the Run in menu or New
Chat on launch, the inspector's width, skipping the client runtime, and
hiding the development worktree row. UpdateCenter takes an injectable
clock, the usage window captions take one from the environment, and the
Run in menu takes an optional isPresented binding; all default to today's
behavior.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
screenshots:macos:direct launches the Debug app on the demo world and
captures its window with screencapture, so it needs no automation-mode
approval: --fullscreen fills a 14-inch MacBook Pro, --worktree-picker
crops New Chat with the Run in menu open, --inspector opens the workspace
inspector, and --desktop captures the whole display (window inset over the
wallpaper, real menu bar, other apps hidden and shown again afterwards).

screenshots:ios:direct captures each scene on a throwaway headless
simulator with 24-hour time and the status bar pinned to 14:05, waiting for
the app to report ready instead of sleeping. It adds the iPhone 18 Pro and
a landscape iPad Pro 11, rotated through one UI test and cleaned up by
screenshots-ipad-cleanup.swift, which erases the windowed-app resize
grabber.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
bun run bento:render opens the Debug app in a DEBUG-only render mode that
shows real views on the demo world and captures them at 2x in light and
dark: MCP, harness, account, sound, update, usage-limit, Chrome extension,
Computer Use, and simulator settings sections; full Settings windows on
Updates, Notifications, MCPs, and Harnesses › Accounts; the workspace
inspector's Machine, Usage, and Context sections; a Ghostty terminal
running a real "bun run dev" from a local shell; and the Simulator pane
on a throwaway simulator showing the emojis page in Safari.

bento:notifications posts the two chat notifications through
ChatNotificationManager from a separately identified copy of the Debug app
and captures the banners over the wallpaper. bento:linux-install runs the
real Codevisor installer in a throwaway Ubuntu container inside a new
Ghostty window and captures that window.

Production code gains only defaulted hooks: UsageLimitNotice takes an
optional clock, SimulatorSettingsView is public, SimulatorPaneModel gets a
DEBUG-only preview factory, notification permission reads as granted while
previews or renders run, and render modes skip loading the user's Ghostty
config.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
AppPreview.rendersFixtures covers App Store screenshots, bento renders, and
bento notifications. The App Store screenshot app no longer takes the
instance lease, so it can't activate or block another Codevisor, and the
Ghostty config check uses the same predicate.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
AppEnvironment.now replaces UpdateCenter.now, the inspectorNow environment
value, and UsageLimitNotice's now parameter. It defaults to the real clock,
and the demo environment pins it. The screenshot root passes the inspector's
ideal width instead of the presentation reading the environment.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
ScreenshotOtherApps hides and restores other apps for both the desktop
capture and the notification banners, restores on SIGINT as well as SIGTERM,
and records the hidden PIDs so the capture scripts restore them from finally
and exit handlers too. The simulator page server binds a free port and fails
fast if it can't listen, the ghostty-terminal card checks that port 3000 is
free, and the scripts share run(), delay(), simctl(), and the throwaway
simulator setup.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The crop reports a missing section when the image is narrower than the
rounded-corner inset. The terminal closes its PTY master only in the read
source's cancel handler and reaps the shell after SIGKILL off the main thread,
since the exiting shell waits for the master to close.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
--device all could never match the single worktree simulator once the list
had more than one device, and the UI-test path ignored the iPad's landscape
scene list. The command now takes one device and sends landscape devices to
screenshots:ios:direct.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@pondorasti
pondorasti merged commit f2cf3bd into main Oct 26, 2026
@pondorasti
pondorasti deleted the codevisor/peanut branch October 26, 2026 22:22
pondorasti added a commit that referenced this pull request Oct 28, 2026
Hovering a Code sidebar workspace row now cross-fades its trailing
properties (PR badge, machine icon) into its hover actions in the same
spot: Pin or Unpin, then Archive, for active workspaces, and Restore for
archived ones. A hidden copy of the actions reserves their width, so the
title no longer shifts or re-truncates on hover. The actions are still
inserted only while hovered, so the accessibility tree is unchanged.

Also delete SidebarWorkspaceTabRow, which has had no callers since #834.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
pondorasti added a commit that referenced this pull request Oct 28, 2026
…7) (#853)

Hovering a Code sidebar workspace row now cross-fades its trailing
properties (PR badge, machine icon) into its hover actions in the same
spot: Pin or Unpin, then Archive, for active rows, and Restore for archived
ones. The trailing slot reserves the actions' width, so the title doesn't
shift or re-truncate on hover. Stale hover after a row moves under a
resting pointer is tracked in 851-3459.

Also delete SidebarWorkspaceTabRow, which has had no callers since #834.

Fixes 851-3417

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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