Skip to content

fix(media): open workspace media links in the file viewer

MacroscopeApp / Macroscope - Correctness Check completed Sep 1, 2026 in 8m 48s

2 issues identified (130 code objects reviewed).

• Merge Base: 73776d4
• Head: d84a531

Details

✅ File Path U3 Bytes Comments Posted Reason
❌ apps/server/src/assets/MediaFile.ts 3734 1
✅ apps/web/src/lib/videoFirstFrame.ts 791 0
✅ apps/mobile/src/lib/markdownMedia.ts 2492 0
➖ apps/web/src/lib/videoFirstFrame.test.ts 2441 Excluded by default ignore patterns
➖ apps/mobile/src/lib/markdownMedia.test.ts 1612 Excluded by default ignore patterns
✅ apps/mobile/src/lib/videoPreviewSource.ts 1754 0
✅ packages/client-runtime/src/markdownLinks.ts 4201 0
✅ packages/shared/src/video.ts 279 0
➖ packages/client-runtime/src/markdownLinks.test.ts 1274 Excluded by default ignore patterns
✅ apps/mobile/src/components/MediaVideoPlayer.tsx 7254 0
✅ apps/web/src/components/media/MediaVideoPlayer.tsx 6634 0
✅ apps/web/src/components/media/OpenOriginalMediaLink.tsx 740 0
✅ docs/user/composer.md 2590 0
✅ apps/mobile/src/components/MediaVideoPreviewModal.tsx 5032 0
➖ apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_video.png 0 Unreviewable file type
✅ docs/internals/environment-auth.md 2608 0
✅ apps/mobile/src/features/files/WorkspaceFileVideoPreview.tsx 1699 0
➖ apps/web/src/markdown-links.test.ts 282 Excluded by default ignore patterns
➖ packages/client-runtime/package.json 343 Excluded by default ignore patterns
✅ apps/web/src/pierre-icons.ts 1187 0
➖ apps/mobile/src/lib/markdownLinks.test.ts 906 Excluded by default ignore patterns
✅ apps/mobile/src/state/assets.ts 1568 0
➖ packages/shared/src/filePreview.test.ts 1217 Excluded by default ignore patterns
✅ packages/shared/src/filePreview.ts 2813 0
➖ apps/server/src/http.test.ts 9571 Excluded by default ignore patterns
➖ apps/mobile/src/lib/nativeMarkdownText.test.ts 1242 Excluded by default ignore patterns
➖ pnpm-lock.yaml 1811 Excluded by default ignore patterns
✅ apps/mobile/src/features/files/filePath.ts 470 0
➖ apps/mobile/modules/t3-markdown-text/package.json 231 Excluded by default ignore patterns
➖ apps/web/src/components/ChatView.logic.test.ts 1123 Excluded by default ignore patterns
➖ packages/client-runtime/src/markdownImages.ts 338 No code objects modified
✅ apps/web/src/assets/assetUrls.ts 1379 0
➖ apps/desktop/src/electron/ElectronProtocol.test.ts 312 Excluded by default ignore patterns
✅ apps/web/src/components/ChatView.logic.ts 1994 0
✅ apps/web/src/components/chat/ChatComposer.tsx 691 0
✅ apps/mobile/src/components/VideoThumbnailImage.tsx 485 0
➖ apps/web/src/components/chat/externalLinkContextMenu.test.ts 307 Excluded by default ignore patterns
✅ apps/web/src/components/chat/externalLinkContextMenu.ts 353 0
✅ apps/desktop/src/electron/ElectronProtocol.ts 650 0
✅ apps/web/src/components/chat/ExpandedImagePreview.tsx 3721 0
➖ packages/client-runtime/src/work-log/presentation.test.ts 184 Excluded by default ignore patterns
✅ apps/server/src/assets/AssetAccess.ts 4566 0
➖ apps/web/src/components/pullRequest/PullRequestMarkdown.tsx 754 No code objects modified
✅ apps/web/src/components/files/projectFilesQueryState.ts 1013 0
✅ packages/contracts/src/assets.ts 1234 0
✅ packages/client-runtime/src/work-log/presentation.ts 625 0
➖ apps/mobile/modules/t3-markdown-text/src/markdownFileIcons.generated.ts 430 Vendored or auto-generated code
✅ apps/mobile/src/features/files/preload-workspace-file.ts 847 0
➖ apps/server/src/assets/AssetAccess.test.ts 17894 Excluded by default ignore patterns
✅ apps/web/src/markdown-links.ts 5632 0
✅ apps/mobile/modules/t3-markdown-text/scripts/sync-pierre-file-icons.mjs 334 0
✅ apps/mobile/src/components/FilePreviewModal.tsx 1118 0
✅ apps/web/src/state/use-atom-query-runner.ts 1297 0
✅ apps/mobile/modules/t3-markdown-text/src/nativeMarkdownText.ts 1281 0
✅ apps/mobile/src/state/use-atom-query-runner.ts 1297 0
✅ apps/mobile/src/components/VideoPreviewModal.ios.tsx 1176 0
✅ apps/mobile/src/components/VideoPreviewModal.tsx 2003 0
❌ apps/mobile/modules/t3-markdown-text/src/markdownLinks.ts 2402 1
✅ apps/mobile/src/features/files/workspaceFileAssetUrl.ts 1511 0
✅ apps/server/src/http.ts 3953 0
➖ apps/web/src/components/ChatMarkdown.workspace-images.test.tsx 1476 Excluded by default ignore patterns
✅ apps/web/src/components/files/FilePreviewPanel.tsx 6264 0
✅ apps/web/src/components/ChatView.tsx 5558 0
✅ apps/web/src/components/chat/ExpandedImageDialog.tsx 5077 0
✅ apps/mobile/src/features/files/ThreadFilesRouteScreen.tsx 8231 0
✅ apps/mobile/src/features/threads/ThreadFeed.tsx 13879 0
✅ apps/web/src/components/ChatMarkdown.tsx 19060 0

Billed Total: 114.99KB of diff | $5.75
Saved $1.42 vs. the upper-bound estimate of $7.17 — cached code objects from prior reviews on this PR were not re-billed.

Filtered Issues Details

apps/web/src/components/ChatMarkdown.tsx
  • line 1598: handleOpenInFilePreview gives onOpenInPanel precedence over onOpenMedia. For a workspace-relative image/video link, the visible caller supplies both callbacks whenever threadRef is present, so an ordinary click opens the regular file panel (which treats the file as a file view) rather than invoking the newly supplied media preview callback. onOpenMedia is then reachable only through the context-menu item, defeating media-link primary preview for workspace files. [ Already posted ]
apps/web/src/components/ChatView.tsx
  • line 2552: openFileAttachment calls resolveFileAttachmentUrl through createAttachmentAssetUrl, but the runner at line 1330 is not configured with refresh: true. assetEnvironment.createUrl is query-cached, so reopening the same attachment after its signed URL expires reuses the old capability and the video/download fails rather than obtaining a new URL. The new useAssetUrlRefresh and Markdown media callers explicitly use refresh: true for this exact re-minting path. [ Already posted ]
packages/client-runtime/src/markdownLinks.ts
  • line 115: looksLikeHostname treats every country-code hostname as a local file whenever it ends in :digits. Thus inline code such as example.uk:8080 has hasPosition === true, returns false here, and is passed to the file resolver as a workspace-relative example.uk:8080 path. This turns a common host-and-port reference into a file chip instead of leaving the code span unchanged. [ Out of scope (post-validation triage) ]
  • line 132: The whitespace rejection drops otherwise unambiguous inline-code paths containing a space, for example /Users/Alice Smith/video.mp4 or ./my media/image.png. These are valid path spellings and the downstream web resolver accepts spaces, but this early return prevents the newly added inline-code file/media linking entirely. [ Already posted ]