Skip to content

fix(mobile): no two importable paths differ only in case, and CI checks for it - #1210

Merged
Jacksondr5 merged 1 commit into
j5/mainfrom
j5code/case-only-paths-1203
Nov 23, 2026
Merged

Jacksondr5 merged 1 commit into
j5/mainfrom
j5code/case-only-paths-1203

Conversation

@Jacksondr5

Copy link
Copy Markdown
Owner

Problem

apps/mobile/src/j5/agents/PersonaSheet.tsx (the component) and personaSheet.ts (its logic) differ only in case, and both are imported without an extension. On a case-insensitive filesystem (macOS, Windows), ./PersonaSheet can resolve to the wrong one. That's how the 0.0.53 nightly broke for InboxThreadPanel (#1202). Closes #1203.

What changed

  • Rename: personaSheet.ts and its test become personaSheetActions.ts and personaSheetActions.test.ts, named after the function they hold. The two imports follow.
  • CI check: a new J5 script, scripts/j5/check-case-paths.ts, runs as one step in J5's own j5-ci.yml "Format, lint, and typecheck" job.
    • It fails when two tracked files under apps/ or packages/ can be imported by extensionless stems that differ only in case.
    • Only script and module extensions count (.ts, .tsx, .js, .jsx, .mjs, .cjs, .mts, .cts). So PdfViewer.tsx with pdfViewer.css, and HorizonScene.astro with horizonScene.ts, are not collisions, as the issue asks.
    • Run against j5/main before this rename, it reports exactly this one pair. On this branch it reports none.
  • Upstream files: none. j5-ci.yml is J5-owned, so FORK.md needs no entry.

Tests: scripts/j5/check-case-paths.test.ts has one table covering the collision, the CSS and Astro pairs, a test file beside its module, and an .ios.tsx platform file.

Live testing

Not applicable. Nothing visible changes. The script was run against both j5/main and this branch, as described above.

Checklist

  • One concern: the description has no "also"
  • Tests cover the changed behavior
  • UI changes: none
  • Live testing: the section above says what ran and what did not
  • Upstream-owned files: none edited
  • Upstream product: unchanged
  • Surfaces: mobile (the rename) and CI. No runtime change.
  • Docs: none affected

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

🤖 Generated with Claude Code

…ks for it

PersonaSheet.tsx and personaSheet.ts could resolve to each other on a
case-insensitive filesystem; the logic module is now
personaSheetActions.ts. J5 CI now fails when two tracked importable
paths under apps/ or packages/ differ only in case.

Closes #1203

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

vercel Bot commented Nov 23, 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 23, 2026 7:24am UTC

Request Review

@github-actions github-actions Bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Nov 23, 2026
@Jacksondr5
Jacksondr5 enabled auto-merge (squash) November 23, 2026 07:24
@github-actions github-actions Bot added the size:M 30-99 effective changed lines (test files excluded in mixed PRs). label Nov 23, 2026
@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The mobile screen and test now import from personaSheetActions. A new script checks tracked files for importable stems that differ only by case. The CI checks job runs the script.

Changes: Case-collision prevention

Layer / File(s) Summary
Update mobile imports
apps/mobile/src/j5/agents/AgentLibrarySettingsScreen.tsx, apps/mobile/src/j5/agents/personaSheetActions.test.ts
Both files now import personaRowMarker and personaSheetActions from ./personaSheetActions.
Add and run the collision check
scripts/j5/check-case-paths.ts, scripts/j5/check-case-paths.test.ts, .github/workflows/j5-ci.yml
The script groups importable file stems without regard to case and reports groups with distinct stems that collide. The test checks that it reports the PersonaSheet/personaSheet pair and excludes the other supplied paths. CI runs the check after formatting and before linting.

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

Suggested reviewers: bryantderosier

Merge Risk: Minimal · up to 433f3

This change renames a mobile module to avoid case-only import path collisions and adds a CI check for such collisions. No concrete merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: a fix in mobile so no two importable paths differ only in case, plus a CI check for it. It matches the rename of personaSheet.ts to personaSheetActions.ts and the new …
Description check Passed The description follows the repository template. It covers Problem (with the issue link 'Closes #1203'), What changed (rename, CI check, upstream files), Live testing (marked not applicable with reaso…
Linked Issues check Passed Issue #1203 has two coding objectives. (1) Rename the logic module, its test, and imports so PersonaSheet and its logic no longer differ only in case: head contains apps/mobile/src/j5/agents/personaSh…
Out of Scope Changes check Passed All changed files map to the issue objectives: the rename of personaSheet.ts and its test, the two import updates, the new check script and its test, and the j5-ci.yml step that runs the check. The wo…
Full details: Title check

Explanation

The title names the main change: a fix in mobile so no two importable paths differ only in case, plus a CI check for it. It matches the rename of personaSheet.ts to personaSheetActions.ts and the new check-case-paths.ts script in j5-ci.yml. The title is long (78 characters, 14 words) but still specific and accurate.

Full details: Description check

Explanation

The description follows the repository template. It covers Problem (with the issue link 'Closes #1203'), What changed (rename, CI check, upstream files), Live testing (marked not applicable with reason), and a checklist. It omits the 'Upstream impact' heading and the template's required structure for that section. The checklist is filled in, and the description states that no upstream-owned files were edited, so the omission is minor. The 'Built by' line at the end matches the template's closing note. The UI changes section is removed, which the template allows when the section is not applicable.

Full details: Linked Issues check

Explanation

Issue #1203 has two coding objectives. (1) Rename the logic module, its test, and imports so PersonaSheet and its logic no longer differ only in case: head contains apps/mobile/src/j5/agents/personaSheetActions.ts and personaSheetActions.test.ts, and no personaSheet.ts remains in the directory listing. AgentLibrarySettingsScreen.tsx and the test import from ./personaSheetActions. (2) Add a CI check for importable tracked stems that differ only in case: scripts/j5/check-case-paths.ts groups importable paths (.ts, .tsx, .js, .jsx, .mjs, .cjs, .mts, .cts) under apps/ and packages/ by lowercased stem, and exits 1 on any group with more than one distinct stem. The check is wired into .github/workflows/j5-ci.yml as a step in the checks job. Non-importable siblings such as .css and .astro are excluded, as the issue requests. The CI runtime is Node 26.12.1 (.nvmrc), which supports import.meta.main and type stripping, so the script runs as intended. The test file covers the collision, CSS and Astro pairs, and related suffix cases. No unmet coding requirement was found.

Full details: Out of Scope Changes check

Explanation

All changed files map to the issue objectives: the rename of personaSheet.ts and its test, the two import updates, the new check script and its test, and the j5-ci.yml step that runs the check. The workflow diff adds only the check step (+3 lines). No unrelated file or behavior change was found in the reviewed changes. The FORK.md and upstream-file statements in the PR description are administrative and not coding requirements.

Finishing Touches

Generate unit tests (beta)

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

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 5411de3 and 433f39f.

Files selected for processing: 6

  • .github/workflows/j5-ci.yml
  • apps/mobile/src/j5/agents/AgentLibrarySettingsScreen.tsx
  • apps/mobile/src/j5/agents/personaSheetActions.test.ts
  • apps/mobile/src/j5/agents/personaSheetActions.ts
  • scripts/j5/check-case-paths.test.ts
  • scripts/j5/check-case-paths.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 1 review per hour.

@Jacksondr5
Jacksondr5 merged commit dd833db into j5/main Nov 23, 2026
31 checks passed
@Jacksondr5
Jacksondr5 deleted the j5code/case-only-paths-1203 branch November 23, 2026 07:40

This branch was successfully deployed

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

Labels

size:M 30-99 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: PersonaSheet.tsx and personaSheet.ts differ only in case; add a case-collision check

1 participant