Skip to content

What Are Games Options A Clean Onboarding Selection Bit

Best and cheapest way to deposit money to buy bitcoin, learn how to deposit bitcoin securely into a centralized exchange or wallet this comprehensive guide covers network selection address generation fee structures and why bitget stands out How To Deposit Options Use Strike Onboarding Updated as a le.

Deposit funds easily deposit funds into your account using one of our many deposit methods trade your crypto What Are Sports Games Methods Learn How Issue Addresses buy swap and sell with australia s largest variety of cryptocurrencies.

Best Online Payment Sportsbook Payment Trade Futures And Real Controlling

Coinbase, caleb brown is a leading crypto brokerage and trading broker offering 24 7 personalised support and a seamless platform for usa and global clients, welcome to your ultimate guide for depositing and withdrawing nzd with binance new zealand whether you want to buy bitcoin ethereum usdt or sell crypto and withdraw nzd to your local bank account binance new zealand offers kiwi users a seamless low cost Coinbase 2026 New Money How Do Example Glassnode History and safe experience tailored to local needs.

Abstract, australian crypto bitcoin exchange crypto trading, cash app Cash App Login Methods Forex Change The Way Settlements Step Reflected login sign in to your account, cryptocurrency deposit via application, btc exchange deposits all exchanges, your guide to binance deposit withdrawal.

How To Deposit Futures Usa Withdrawal Use Strike Rewards Stay

Trade tether usdt securely on binance p2p using local payment methods worldwide buy and sell usdt Deposit Btc All Tokenized You Ve Home Withdrawals Bitcoin directly with verified users using escrow protection.

What are the cheapest and most reliable exchanges in australia, learn how to deposit and withdraw crypto and fiat on binance step by step guide Bitcoin Atm Tokenized Crypto With The Rise Strength Share covering p2p bank transfer and crypto deposit and withdrawal options.

Bitcoin atms transaction limits november 2026, elias vance s definitive 2026 guide to us real money online casinos Bitcoin Atms Trading Into You Ve Abstract Shuffle Article manual testing of bonuses payout speeds and kyc policies from a 15.

Duelbits Online Sports What Australia Forex Learn How To Another Options

Change the way you money, best 1 deposit casinos minimum deposit gambling sites 2026, if Best Crypto All Shuffle Local Find Where To Transfers India Vip you already own bitcoin and want to transfer it to your nicehash wallet follow this step by step guide to deposit btc safely and correctly deposits are subject to fees.

Merged
rynfar merged 2 commits into
nativefrom
nw/86-worktree-card
Nov 2, 2026
Merged

rynfar merged 2 commits into
nativefrom
nw/86-worktree-card

Conversation

@rynfar

Copy link
Copy Markdown
Owner

Closes#86

Problem

When a thread starts in a new worktree, the web transcript shows a setup card. It lists each step (fetch, check out, setup script, start agent) with its elapsed time, the setup script's last lines, and Details, Open terminal, Work locally and Cancel. While setup holds the turn back, the composer blocks send with "Preparing worktree". The native client showed none of this, only "Working for …".

Approach

Core (crates/core/src/worktree_setup.rs, pure and tested).

  • Decodes WorktreeSetupSnapshot and the nullable stream event forward-compatibly:
    • A stage with an unknown id, or one that does not decode, is dropped.
    • An unknown status draws as pending.
    • An unknown phase is never shown.
    • Extra fields are ignored.
  • Ports resolveVisibleWorktreeSetup, worktreeSetupAgentStarted and resolveWorktreeSetupProgress, plus useWorktreeSetup's held snapshot, send block and queue rule.
  • Ports the card's copy and layout rules: stage labels, header label and tone, summary status, the checkout percent, Elapsed, the four-slot output tail, and Details.

Rows (timeline/rows.rs). A new RowKind::WorktreeSetup sits where deriveMessagesTimelineRows puts it:

  • While setup runs, or has just finished and the agent has not taken over, it goes under the working row, which it then owns (no "Thinking" row).
  • Otherwise it goes after the first user message.
  • Once the agent takes over, a running setup leaves the card to the working row's chip, and a settled one collapses (embedded).
  • A new snapshot defeats the streaming-token fast path.

Client (crates/client/src/worktree_setup.rs).subscribeWorktreeSetup runs on the network runtime:

  • Events are decoded and folded into the latest/held Feed, then published through a watch.
  • A lost connection resubscribes and keeps what was shown. A server failure ends the subscription.

App.

  • worktree_setup.rs holds the store. It subscribes for the open thread while the thread has a worktree or its run is preparing (the web's query condition), and resubscribes on reconnect. It also runs Cancel and Work locally.
  • transcript/worktree_setup.rs draws the card:
    • Stage rows with status icons, the setup script name, detail or percent, and durations.
    • The output tail, tinted when the script failed.
    • The failed/cancelled header and the error line.
    • The Details disclosure.
    • The Background setup chip with its popover card in the working row.
  • Only a running stage's time ticks, through its own WorkingTimer (TimerKind::SetupStage). The timers exist only while setup runs, so a settled card never repaints.
  • While the worktree is prepared, the working row says "Setting up worktree…" and runs no timer. An empty "Thinking" slot stays blank.
  • Composer: with setup blocking, send is disabled with the tooltip "Preparing worktree", and Enter does nothing.
  • Open terminal dispatches OpenSetupTerminal. The workspace hands it to the existing terminal drawer, which opens and focuses setup-<script> (openSetupTerminal's ensureTerminal(open, active)).
  • Work locally follows the web's condition: only for the thread this window just launched from its draft, while setup runs. The web cancels, switches the draft to local and resends. Native discards the draft once the launch succeeds, so the composer records that worktree launch instead. Work locally cancels and, if the cancel succeeds, relaunches the same message as a new thread in the project checkout and opens it. The cancelled thread keeps its failed run, as on the web.

Also:

  • The snapshot renderer gains --worktree-setup <snapshot.json>.
  • The probe gains --worktree-setup, and its shelf listing now prints thread ids.
  • Lucide laptop is vendored, plus stroke-2 minus and circle.
  • Float::BelowEnd is added for the popover.

Ledger

TR-WORKTREE: todo → done.

  • Native: crates/app/src/transcript/worktree_setup.rs, crates/app/src/worktree_setup.rs, crates/core/src/worktree_setup.rs, crates/client/src/worktree_setup.rs.
  • Issue: native: worktree setup card in the transcript (TR-WORKTREE) #86.
  • Web source gains useWorktreeSetup.ts and client-runtime/src/worktreeSetup.ts, so intake routes their changes here.

Known differences (small, not tracked as gaps):

  • Running labels have no shimmer, and the running icon is a static loader-circle. No native live row animates yet (design system §9).
  • Details values truncate at the end, not in the middle: native has no MiddleTruncate yet.
  • Durations are not tabular numerals.

Evidence

Real setup on the smoke server (Replay (dev), port 14658). The run used a scratch git repo under the scratchpad, added as a project and launched into a new worktree through the same orchestration.launchThread payload the composer sends, with the new client subscription printing each snapshot:

worktree-setup: seq=0 phase=Running "Setting up worktree…" stages=[Fetch=Pending, Checkout=Pending, SetupScript=Pending, Agent=Pending] worktree-setup: seq=1 phase=Running … stages=[Fetch=Skipped(skipped), Checkout=Pending, …] worktree-setup: seq=2 phase=Running … stages=[Fetch=Skipped(skipped), Checkout=Running, …] worktree-setup: seq=4 phase=Running … stages=[Fetch=Skipped(skipped), Checkout=Running(100%), …] worktree-setup: seq=6 phase=Running … stages=[…, Checkout=Done, SetupScript=Pending, Agent=Pending] worktree-setup: seq=9 phase=Running … stages=[…, SetupScript=Skipped(skipped), Agent=Running] worktree-setup: seq=11 phase=Done "Worktree ready" stages=[…, Agent=Done] worktree-setup: null (held=true) 

A second launch was cancelled during checkout:

worktree-setup: seq=2 phase=Running … stages=[Fetch=Skipped(skipped), Checkout=Running, …] worktreeSetup.cancel: Ok("{\"cancelled\":true}") worktree-setup: seq=3 phase=Cancelled "Worktree setup cancelled" stages=[Fetch=Skipped(skipped), Checkout=Skipped(skipped), …] 

An offscreen render of the first thread just after setup, with the turn started, shows no card. That matches the web, which drops a clean setup once the turn starts.

Cleanup, all done:

  • Threads and scratch projects deleted.
  • Worktrees removed with vcs.removeWorktree.
  • The empty worktrees/repo folder in the smoke home removed.
  • The scratch repo deleted.

The smoke server's project settings fold scripts into server settings, so the scratch project's setup script was skipped. Rather than edit the smoke server's settings, I covered the running script with fixtures.

Offscreen captures (fixture-driven, --worktree-setup, dark, 1440×900, on a smoke thread):

  • Running, setup script tail, Open terminal, Cancel, "Setting up worktree…" working row: /private/tmp/claude-501/-Volumes-DevSSD-t3code-native/3998c826-bb1a-4777-8d4c-a9ea46007740/scratchpad/wt86/running-new.png
  • Details open: /private/tmp/claude-501/-Volumes-DevSSD-t3code-native/3998c826-bb1a-4777-8d4c-a9ea46007740/scratchpad/wt86/crop-running-details.png
  • Send blocked, "Preparing worktree" tooltip: /private/tmp/claude-501/-Volumes-DevSSD-t3code-native/3998c826-bb1a-4777-8d4c-a9ea46007740/scratchpad/wt86/crop-running-send.png
  • Checkout at 62%: /private/tmp/claude-501/-Volumes-DevSSD-t3code-native/3998c826-bb1a-4777-8d4c-a9ea46007740/scratchpad/wt86/crop-checkout.png
  • Failed (header, failed stage, error line): /private/tmp/claude-501/-Volumes-DevSSD-t3code-native/3998c826-bb1a-4777-8d4c-a9ea46007740/scratchpad/wt86/crop-failed.png
  • Done with a failed setup script (red tail): /private/tmp/claude-501/-Volumes-DevSSD-t3code-native/3998c826-bb1a-4777-8d4c-a9ea46007740/scratchpad/wt86/crop-done.png
  • Cancelled: /private/tmp/claude-501/-Volumes-DevSSD-t3code-native/3998c826-bb1a-4777-8d4c-a9ea46007740/scratchpad/wt86/crop-cancelled.png

I took no real-window capture, because launching the app would take focus from the developer's session.

Not verified live:

  • Work locally (it needs a composer launch from a real window).
  • The Background setup chip (it needs an async setup script on a server with project scripts).

Both have their logic under test: the relaunch payload, and chip selection in background.

Tests

  • worktree_setup::tests (9): forward-compatible decoding, labels, resolveVisibleWorktreeSetup, newest/held snapshot (ported from ChatView.logic.test.ts), send block and queue rule, live versus settled durations (ported from WorktreeSetupCard.browser.test.tsx), card layout per phase, checkout percent and Details, the Work locally relaunch payload.

  • timeline::tests: placement ported from MessagesTimeline.logic.test.ts ("keeps the working header in place across worktree setup handoff"), plus the collapsed case, and a new snapshot rederiving rows.

  • t3-clientworktree_setup (3): folding and holding, resubscribe on a lost connection, a server failure ending the subscription.

  • cargo clippy --workspace --all-targets -- -D warnings ✓ (and -p t3-native --features snapshot)

  • cargo test --workspace ✓

  • node scripts/gen-theme.ts --check ✓

  • node --test parity/sync.test.ts ✓

  • node ../../apps/native/conformance/generate.ts --check ✓

Built with Claude Opus 5.5 in Claude Code.

@rynfar
rynfar merged commit 4518b2d into nativeNov 2, 2026
@rynfarrynfar mentioned this pull request Nov 2, 2026
Sign up for freeto 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

@rynfar