Repository navigation
Conversation
📝 WalkthroughWalkthroughA new 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: e81cbec7-42c1-456c-876b-4c7923c57ef1
📒 Files selected for processing (3)
mobile/app/h/[hostId]/session/[worktreeId].tsxmobile/src/session/mobile-terminal-file-tap-target.test.tsmobile/src/session/mobile-terminal-file-tap-target.ts
|
thx for the PR |
|
Hey @Jinwoo-H @AmethystLiang 👋 It's been 6 days since this PR was opened and marked ready for review. Just checking in — is there anything blocking the review, or any feedback I should address to help move this forward? Also noting CodeRabbit flagged two items:
Let me know how I can help get this merged! |
Closes #6539
Summary
artifacts/screenshot.png, and the mock server resolves/serves that image throughfiles.resolveTerminalPath+files.readPreview.Screenshots
No screenshot attached: this is a mobile routing change and local iOS/Android simulator tooling is unavailable on this machine. Manual-ish protocol validation is listed below.
AI Review Report
Addressed CodeRabbit inline feedback by:
handleCreateBrowserRef.current?.(...)to avoid stale browser opener closures.file://${absolutePath}construction with the sharedfilesystemPathToFileUrihelper.Security Audit
files.resolveTerminalPathremains the worktree-boundary gate; this PR does not expand file read permissions.files.readPreview/files.readRPCs.Test plan
cd mobile && pnpm test -- src/session/mobile-terminal-file-tap-target.test.ts src/session/mobile-mock-file-preview-data.test.ts src/files/mobile-file-preview-request.test.ts src/files/mobile-file-preview-navigation.test.ts src/terminal/terminal-path-tap.test.tscd mobile && pnpm format:checkcd mobile && pnpm lintcd mobile && pnpm exec tsc --noEmitpnpm exec vitest run --config config/vitest.config.ts src/main/runtime/rpc/methods/files.test.tsgit diff --checkManual-ish validation
PORT=7678 pnpm mock-server.mock-device-token.files.resolveTerminalPathforartifacts/screenshot.pngand verified it resolved to a worktree-relative file.files.readPreviewfor the resolved path and verified it returned a PNG image preview payload.Notes
xcrun simctlis unavailable). Android emulator tooling is also not installed.pnpm test -- src/main/runtime/rpc/methods/files.test.ts, but the root script expanded to the full suite and timed out in unrelatedsrc/shared/feature-interactions.test.ts; the narrower file RPC command above passed.ELI5
On mobile, tapping a file path in the terminal opens it in the mobile file preview (images, source, etc.) instead of only handling special HTML cases.