Repository navigation
Conversation
| expect(parseAppLink("t3nitro://unknown/env/run")).toBeNull(); | ||
| expect(parseAppLink("t3nitro://workflows/env")).toBeNull(); | ||
| expect(parseAppLink("t3nitro://pull-requests/env/proj/repo/abc")).toBeNull(); | ||
| expect(parseAppLink("t3code://issues/env/proj/github/acme%2Fapp/42/comments")).toBeNull(); |
There was a problem hiding this comment.
This checks a one-off guard for a malformed issue link; valid links are unaffected, so it doesn't meet the permanent-test bar. Could you remove this assertion and retain the repro as verification?
| expect(parseAppLink("t3code://issues/env/proj/github/acme%2Fapp/42/comments")).toBeNull(); |
Posted via Macroscope — Test Signal
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Issue deep links with trailing path segments are now rejected instead of opening the issue identified by their prefix. Valid links remain unchanged, with effects limited to malformed-link navigation. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Problem
When an issue deep link has extra trailing path segments (for example,
t3code://issues/env/proj/github/acme%2Fapp/42/comments),parseAppLinksilently discards them and returns anissuelink instead ofnullbecausecase "issues":slicessegments.slice(1, 6)without checkingsegments.length === 6.Change
Guard
case "issues":inapps/mobile-nitro/src/navigation/appLinks.tswithif (segments.length !== 6) return null;, matching sibling exact-length routes. Add one invalid-path assertion for trailing issue segments to the existing test inapps/mobile-nitro/src/navigation/appLinks.test.ts.Scope
Small bug fix for malformed issue deep-link parsing in
apps/mobile-nitro; a narrow fix for an obvious parser omission needs no tracking issue.Verification
Found by reading
parseAppLink: its other fixed-length routes check the segment count andcase "issues":did not.Setup: Linux, Node 26.13.1, no UI change.
Steps: Run
vp env exec --node 26.13.1 node --input-type=module -e 'import { parseAppLink } from "./apps/mobile-nitro/src/navigation/appLinks.ts"; console.log("trailing:", JSON.stringify(parseAppLink("t3code://issues/env/proj/github/acme%2Fapp/42/comments"))); console.log("valid:", JSON.stringify(parseAppLink("t3code://issues/env/proj/github/acme%2Fapp/42")));'→ compare stdout on base and head.Before (
8ae23c521d83):After (
b7487ecc0b83):On
b7487ecc0b83(Node 26.13.1):vp test run apps/mobile-nitro/src/navigation/passed (3 files, 25 tests); the new assertion uses the same URL that returns an issue link on8ae23c521d83above;vp run check:changed 8ae23c521d8361c60e419abf1737879ee4eef7adpassed (format, lint, knip, typecheck,appLinks.test.ts).Links:
8ae23c521d83· Candidate:b7487ecc0b83apps/mobile-nitro/src/navigation/appLinks.ts,apps/mobile-nitro/src/navigation/appLinks.test.tsNot shown:
parseAppLinkdirectly in Node.Generated with Gemini 4 Neon in T3 Code Nightly