Skip to content

fix(mobile): Metro doesn't watch a worktree's .j5code folder - #984

Merged
Jacksondr5 merged 2 commits into
j5/mainfrom
j5code/mobile-metro-block-j5code
Nov 9, 2026
Merged

Jacksondr5 merged 2 commits into
j5/mainfrom
j5code/mobile-metro-block-j5code

Conversation

@Jacksondr5

@Jacksondr5 Jacksondr5 commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Problem

In a dev build, toggling a persona flashed React Native's blue "Refreshing…" banner. Jackson saw it at Checkpoint 3. apps/mobile/metro.config.js watches the whole workspace and blocks only upstream's .t3 state folder. J5's dev and test homes live in .j5code, so every server write there reached Metro's watcher. Closes #964.

What changed

One more Metro blockList entry, beside upstream's .t3 one, blocks .j5code. Release bundles also go through Metro, but nothing the app imports lives in .j5code, so only the dev watcher changes. It's recorded as FORK.md case 113 and in upstreamSeams.test.ts.

UI changes

Android 16 dev build, same persona and home, six toggles on each side: before on j5/main (067d732e1a), after on f15cf371ad.

Before After
A persona toggle while the list rereads Refreshing banner while the persona list rereads, Android, before Persona list rereading with no Refreshing banner, Android, after

Six toggles on j5/main:

base-toggles.mp4

The same six toggles with this PR:

head-toggles.mp4

Live testing

Android: PASS for the banner (crew tester, report test-reports/issue-964/f15cf371ad.md).

  • Before: the banner appeared in a brief burst during the six toggles. It wasn't on every toggle.
  • After: it appeared in none of the 133 recorded frames across six toggles.
  • Metro's log showed no reload line per toggle on either side, so this PR claims only the banner, not a logged rebuild.

Not fixed here: every toggle still empties the list to "Loading personas" while it rereads. That's the page's own loading state, not Metro, and it's #960's item 3, which gets its own PR. iOS and release builds weren't tested.

Upstream impact

  • apps/mobile/metro.config.js: one blockList entry, recorded in FORK.md case 113 (case text and file-table row) and upstreamSeams.test.ts.

Checklist

  • One concern: the description has no "also"
  • Tests cover the changed behavior: the seams test pins the entry. The tester's recordings are the proof.
  • UI changes: before/after above, with videos
  • Live testing: the section above says what ran live and what did not
  • Upstream-owned files: metro.config.js is recorded in FORK.md (case text and file-table row)
  • Upstream product: no change. Dev tooling only.
  • Surfaces: dev Metro for every mobile platform
  • Docs: none

Built by Claude Opus 5.5 in Claude Code (J5 Code crew seat builder-composer).

🤖 Generated with Claude Code

Metro watched the whole workspace and blocked only upstream's .t3 state folder,
so every write to J5's dev and test home reached its watcher and showed React
Native's "Refreshing…" banner. Dev only: release builds have no Metro.

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

vercel Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
j5-code Ready Ready Preview Nov 9, 2026 4:58am UTC

Request Review

@Jacksondr5 Jacksondr5 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Combined panel review (reviewer-opus + reviewer-sol) at f15cf37

Verdict: no code findings, and the panel approves the source. One record fix is needed before both PRs merge: FORK.md case 113 collides with #983, which also claims 113. Whichever merges second renumbers its case, the code comment, the ledger row, the seams-test record and the PR body.

  • The rule. It adds one blockList entry, scoped to the workspace root like upstream's .t3 rule beside it, and keeps upstream's inherited blockList.
    • reviewer-sol loaded the real Metro config: .j5code/userdata/statev2.sqlite and .j5code/live-test/metro.log are blocked, .t3 stays blocked, and apps/mobile/src/App.tsx and .j5code-other/a.ts stay visible.
    • reviewer-opus checked the regex separately: .j5code/… is blocked, while source files and lookalike names like .j5code-not are not.
  • Record. It's an edit to upstream's metro.config.js (zone 2), recorded in FORK.md and upstreamSeams.test.ts.
  • Evidence. The Android before/after screenshots return 200 image/png, and both GitHub videos return 200 video/mp4 (reviewer-sol). Neither reviewer ran a device.
  • Reviewer-run: upstreamSeams.test.ts passes (51). Lint and git diff --check are clean.

Reviewed by Claude Opus 5.5 (reviewer-opus) and Sol 6.1 (reviewer-sol) in J5 Code.

Jacksondr5 added a commit that referenced this pull request Nov 9, 2026
…ffers Retry

J5's composer rows mount once (J5ComposerControls), so the adjudication dock
joins without another seam. A Crew proposal screen whose read failed showed
"Loading" forever; it now shows the error and Retry. The FORK case is 114,
since #984 takes 113.

Refs #836

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

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Explain Change →

Walkthrough

Metro’s resolver block list now excludes workspace-root .j5code directories. FORK.md records the change as contract 113, and an upstream seam test checks for the configuration pattern.

Changes: Metro watcher exclusion

Layer / File(s) Summary
Add and validate the Metro exclusion
FORK.md, apps/mobile/metro.config.js, apps/mobile/src/j5/upstreamSeams.test.ts
Metro’s block list excludes workspace-root .j5code directories. FORK.md records the seam as contract 113, and the seam test checks for the pattern.

Estimated code review effort: 2 (Simple) | ~8 minutes

Possibly related issues

  • Issue 960 describes the “Refreshing…” banner during persona toggles. This change adds the .j5code block-list entry that the issue identifies as a possible fix.

Suggested reviewers: bryantderosier

Merge Risk: Minimal · up to f15cf

The change excludes worktree state from Metro processing. No actionable merge-blocking risk is established.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "fix(mobile): Metro doesn't watch a worktree's .j5code folder" matches the main change. The diff adds .j5code to Metro's blockList in apps/mobile/metro.config.js, so Metro stops watchi…
Linked Issues check Passed Issue #964 (direct, open) has two coding requirements: add a .j5code entry to the Metro blockList in apps/mobile/metro.config.js, and record the seam in FORK.md. Both are present at the reviewed…
Out of Scope Changes check Passed The PR changes three files. apps/mobile/metro.config.js (+2 lines) adds the .j5code blockList entry that #964 requires. apps/mobile/src/j5/upstreamSeams.test.ts (+6 lines) adds the SEAMS row tha…
Description check Passed The description follows the repository template closely. It states the problem and links issue #964 with "Closes #964". It explains the change: a .j5code entry added to Metro's blockList beside up…
Full details: Title check

Explanation

The title "fix(mobile): Metro doesn't watch a worktree's .j5code folder" matches the main change. The diff adds .j5code to Metro's blockList in apps/mobile/metro.config.js, so Metro stops watching that folder. The title is specific, short, and in conventional-commit form. It names the mobile scope and the affected folder. The wording "doesn't watch" describes the intent of the block-list entry, and the PR objectives confirm the same change. Nothing in the title is unrelated to the changeset.

Full details: Linked Issues check

Explanation

Issue #964 (direct, open) has two coding requirements: add a .j5code entry to the Metro blockList in apps/mobile/metro.config.js, and record the seam in FORK.md. Both are present at the reviewed head. (1) metro.config.js adds new RegExp(${escapedWorkspaceRoot}[/\].j5code[/\].*) beside the existing .t3 entry, with a comment citing FORK.md case 113. It uses the same pattern as the .t3 entry and matches paths under &lt;root&gt;/.j5code/. (2) apps/mobile/src/j5/upstreamSeams.test.ts adds a SEAMS row for ../metro.config.js (record: case 113) that checks the source contains \.j5code[. The head source contains that substring, so the row is satisfied. The FORK.md case 113 text and file-table row could not be read directly. The full file exceeds the 16000-byte read limit, and the diff read failed because changed blobs were unavailable. Their presence rests on the PR description and the change summary (+3 lines in FORK.md), which are consistent with the requirement. The Android Metro-log and banner check in #964 is manual and non-coding. Its result comes from the author's tester report and was not verified in the repository. The dev-only scope matches the issue, since Metro exists only in dev builds.

Full details: Out of Scope Changes check

Explanation

The PR changes three files. apps/mobile/metro.config.js (+2 lines) adds the .j5code blockList entry that #964 requires. apps/mobile/src/j5/upstreamSeams.test.ts (+6 lines) adds the SEAMS row that pins that entry, which supports the requirement's upstream-seam record. FORK.md (+3 lines per the change summary) adds case 113 and its file-table row, which the issue requires. Each change connects directly to #964. No unrelated change appears in the files read. The metro file and the test file were read in full at head, and neither contains other J5 edits. The FORK.md file could not be fully compared with the base, so the three-line count from the change summary is the only evidence that no other FORK.md text changed. The persona list's 'Loading personas' state is not changed here, and the PR identifies it as #960 work. No code for it appears in the change set.

Full details: Description check

Explanation

The description follows the repository template closely. It states the problem and links issue #964 with "Closes #964". It explains the change: a .j5code entry added to Metro's blockList beside upstream's .t3 entry, recorded as FORK.md case 113 and in upstreamSeams.test.ts. It includes the UI changes section with before/after images and videos, and a Live testing section that states what ran on Android, what did not (iOS, release builds, the separate loading-state issue #960), and the limits of the banner claim. The Upstream impact section lists the one upstream-owned file edited and its FORK.md case. The checklist is filled in, and the description ends with the model and harness. Minor gaps: the Upstream impact section does not confirm that the FORK.md file-table row was added in the same way as case text, though the checklist claims it, and the Live testing section does not give the full tester steps. These gaps are not critical.

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional comments: 1

FORK.md-550-550: 1

550-550: Minor · Functional Correctness · Quick win

Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

Correct the release-build scope.

Release apps do not run a Metro dev server, but Expo uses Metro to create production bundles. The blockList is configured without a development guard. The current wording can cause maintainers to overlook this exclusion when diagnosing release bundle failures. Distinguish build time from runtime here. (docs.expo.dev)

Review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 067d732 and f15cf37.

Files selected for processing: 3

  • FORK.md
  • apps/mobile/metro.config.js
  • apps/mobile/src/j5/upstreamSeams.test.ts

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

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

Copy link
Copy Markdown
Owner Author

CodeRabbit is right that release bundles also go through Metro. Fixed in FORK.md case 113 and the description: nothing the app imports lives in .j5code, so the entry only changes what the dev watcher reacts to.

— Claude Opus 5.5

@github-actions github-actions Bot added size:XS 0-9 effective changed lines (test files excluded in mixed PRs). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Nov 9, 2026
@Jacksondr5
Jacksondr5 merged commit bfee80d into j5/main Nov 9, 2026
34 checks passed
@Jacksondr5
Jacksondr5 deleted the j5code/mobile-metro-block-j5code branch November 9, 2026 05:32

This branch was successfully deployed

1 active deployment
Preview — 0f810bae Deployed Nov 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 effective changed lines (test files excluded in mixed PRs). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mobile dev rig: Metro watches the J5 test home, so server writes flash "Refreshing…"

1 participant