Skip to content

docs(exploration): triage the open PR backlog, and stop it recurring (0410) - #658

Merged
crs48 merged 10 commits into
mainfrom
claude/0410-open-pr-triage-and-the-stranded-branch-problem
Jul 30, 2026
Merged

crs48 merged 10 commits into
mainfrom
claude/0410-open-pr-triage-and-the-stranded-branch-problem

Conversation

@crs48

@crs48 crs48 commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Implements exploration 0410_[_]_OPEN_PR_TRIAGE_AND_THE_STRANDED_BRANCH_PROBLEM.md, written in the previous turn.

What this closes out

Eight PRs were open, the oldest from March. Checking each one's actual diff against main (rather than its description) found that four described work already in main, re-derived and landed weeks later by another route.

PR Age Action taken
#400 24d Closed — fix landed on main in a better form; branch predates 0391 and would have deleted NodeLineRunner
#9 145d Closed — draft; apps/electron/src/renderer/workspace/ no longer exists
#595 11d Closed — byte-identical to main (fbc2965a2)
#463 20d Closed — main has a longer, [x] version of 0298
#13 141d Closed — both fixes on main verbatim
#505 17d Merged — exploration 0318 + scale bench
#389 25d Merged — exploration 0270
#449 20d Rebuilt here — see below

#400 was the load-bearing one: git diff origin/main pr400 -- packages/devkit/src/command-runner.ts showed ~150 lines of deletion covering the whole 0391 streaming agent seam. Only its CONFLICTING state had prevented that.

#505's build-and-smoke-test went green on a rebase, confirming it was branch staleness rather than the diff.

The #449 rebuild (0290 bugs #2 and #3)

The original patched apps/web/src/workbench/SyncStatus.tsx, which 0406 deleted; the component now lives in packages/workbench, so the rebuild lands on desktop and web at once.

  • WorkbenchHost gains a hub capability (configuredUrl / connect) so the shell can offer a way out of the disconnected state without importing either app's hub-url module. connect returns a reason string on rejection — never a silent no-op.
  • SyncStatus exports openSyncStatusPanel(); the desktop popover and mobile sheet both listen. The panel shows an inline hub-URL form while there is no hub.
  • ShareDialog's !ready branch explains why a hub is needed and offers Connect a hub…; private-hub links now confirm before copying.
  • Adds normalizeHubUrl to the electron renderer's hub-url mirror (+4 unit tests), so a malformed URL is rejected loudly rather than persisted.

Verified by driving the real app against a local hub — the CTA closes the dialog and opens the panel; an invalid URL shows an error and persists nothing; https://hub.xnet.fyi/ normalises to wss://hub.xnet.fyi; a localhost link's first Copy click asks "Copy local-only link?" and writes nothing, the second copies. No console errors. 0290 is now [-] at 11/20.

Stopping the recurrence

Time-to-merge for the last 20 merged PRs was 0 hours median, 1 hour max — there is no review queue, so a PR that outlives its session is abandoned, not pending.

  • .github/workflows/stale.yml — warns at 14d, closes at 21d, keep-open exempts. Named consumer (the maintainer, weekly) and a decidable pass condition, per AGENTS.md.
  • Fixed the /explore next-number command, which read only the working tree and so handed out numbers already claimed on branches. Seven explorations were found stranded that way.

🤖 Generated with Claude Code

xNet Test added 9 commits July 30, 2026 07:34
…blem

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

Signed-off-by: xNet Test <test@xnet.dev>
…, #13)

Signed-off-by: xNet Test <test@xnet.dev>
…ames its consumer

Signed-off-by: xNet Test <test@xnet.dev>
…nk copies

Rebuilds the two remaining 0290 UI items against today's surfaces. The
original #449 patched apps/web/src/workbench/SyncStatus.tsx, which 0406
deleted; the component now lives in packages/workbench, so the CTA lands
on desktop and web at once.

- WorkbenchHost gains a `hub` capability (configuredUrl/connect) so the
  shell can offer a way out of the disconnected state without importing
  either app's hub-url module.
- SyncStatus exports openSyncStatusPanel(); both the desktop popover and
  the mobile sheet listen, and the panel shows an inline connect form
  while there is no hub.
- ShareDialog's !ready branch explains why a hub is needed and offers
  "Connect a hub…"; private-hub links confirm before copying.
- Adds normalizeHubUrl to the electron renderer's hub-url mirror, so a
  malformed URL is rejected loudly rather than persisted.

Signed-off-by: xNet Test <test@xnet.dev>
…umbers

Signed-off-by: xNet Test <test@xnet.dev>
…modes (0290)

Signed-off-by: xNet Test <test@xnet.dev>
Signed-off-by: xNet Test <test@xnet.dev>
@crs48
crs48 temporarily deployed to pr-658 July 30, 2026 16:19 — with GitHub Actions Inactive
@crs48
crs48 temporarily deployed to pr-658 July 30, 2026 16:27 — with GitHub Actions Inactive
github-actions Bot added a commit that referenced this pull request Jul 30, 2026
@github-actions

github-actions Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Preview removed for PR #658.

github-actions Bot added a commit that referenced this pull request Jul 30, 2026
@crs48
crs48 merged commit 5678264 into main Jul 30, 2026
21 of 22 checks passed
@crs48
crs48 deleted the claude/0410-open-pr-triage-and-the-stranded-branch-problem branch July 30, 2026 16:38
github-actions Bot added a commit that referenced this pull request Jul 30, 2026
crs48 added a commit that referenced this pull request Jul 30, 2026
…shim check (#661)

## What broke

The `capture` job in `.github/workflows/visual-capture.yml` has failed
its **Build Storybook** step on every PR since #656. Pre-existing on
`main` (verified at `bcec607b1`), unrelated to the PR that surfaced it
(#658).

```
"writeModeFor" is not exported by ".storybook/shims/xnet-plugins-browser.ts",
  imported by "packages/workbench/src/views/ai-chat-write-tools.ts".
```

`.storybook/workspace-aliases.ts:29` aliases `@xnetjs/plugins` to the
browser shim, and 0394 phase-2 (#656) added a `writeModeFor` import the
shim never got a matching export for.

## Why the gate didn't catch it

`pnpm check:storybook-shim` stayed green the whole time — "873 modules
walked, 114 shim exports".

Its walker only knew the aliases parsed out of `workspace-aliases.ts`.
**`@xnetjs/workbench` has no entry there**, so the walker silently
dropped the specifier and never reached the importing module — while
rollup resolved it through the workspace link and kept bundling.
Everything past that point went unchecked.

Per AGENTS.md: *"A gate that cannot go green teaches everyone to ignore
red."* The inverse is worse — a gate that cannot go **red** on a live
breakage.

## What changed

**`.storybook/shims/xnet-plugins-browser.ts`** — adds `writeModeFor` /
`WriteMode`, matching `packages/plugins/src/ai/connectors/types.ts:101`,
plus the names the widened walk turned up.

**`scripts/check-storybook-shim.mjs`** — resolves `@xnetjs/*` the way
the build does rather than only via aliases:

- aliases first (Vite applies them first), then the package's own
`exports`/`main`;
- `dist` entries map back to the source they're built from, so the walk
doesn't stop at an artifact that may not be present;
- an `@xnetjs/*` specifier it *cannot* resolve is now a **hard
failure**, not a silent drop — the graph can't quietly shrink again;
- seeds `.storybook/preview.tsx` and `manager.tsx`, which the build
compiles too.

Coverage: **873 → 1177 modules walked**. That turned up a **second real
break** — `AgentAuditRecorder` in `views/ai-chat-ceremony.ts:32`, also a
value import — plus ten type-only names the shim should mirror anyway.

### On "walk the full module graph instead"

Rejected as framed. The story graph *was* nearly the whole build graph;
the defect was that the **resolver was weaker than Vite's**, not that
the seed set was too small. Matching resolution (plus the two extra
entry seeds) closes the class without needing to run rollup to find out.

## Verification

| Check | Result |
| --- | --- |
| `pnpm build:stories` (the capture job's exact command, after `turbo
run build --filter='./packages/*'`) | ✅ `Storybook build completed
successfully` |
| `pnpm check:storybook-shim` | ✅ 1177 modules walked, 128 shim exports
|
| Regression proof — remove `writeModeFor` from the shim again | ✅ now
**fails** with `· writeModeFor (…/ai-chat-write-tools.ts)`; the old
walker passed |
| Pre-push full suite | ✅ 11331 passed, 4 skipped |

Labelled `skip-changelog`: dev tooling, nothing a user notices.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

This branch was previously deployed

1 inactive deployment
pr-658 — f423ea5c Deployed Jul 30, 2026 by crs48 via deploy-preview #1295
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