Skip to content

feat(desktop): preview local file links with native open actions - #583

Merged
tianxiaochannel-oss88 merged 2 commits into
mainfrom
codex/local-file-preview
Oct 23, 2026
Merged

tianxiaochannel-oss88 merged 2 commits into
mainfrom
codex/local-file-preview

Conversation

@tianxiaochannel-oss88

@tianxiaochannel-oss88 tianxiaochannel-oss88 commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Desktop conversation paths now open in the existing right drawer: UTF-8 text/code with line numbers, raster images, and bounded folder browsing. Unsupported files such as ZIPs keep an actionable placeholder, while right-click and Open with expose native application choices, Save as, copy and file-manager actions.

Scope

  • One shared Timeline entry point serves normal conversations, channels and teammate private chats; Markdown labels and complete-path tooltips are retained.
  • The seven new preview messages are synchronized across all 55 locale catalogs, preserving existing translations.
  • A typed desktop bridge requires a matching one-use trusted gesture and the current packaged main frame. Host reads are bounded, special files and network shares are rejected, and late link responses cannot replace the latest selection in the mounted timeline.
  • Daemon file capabilities and tool permissions retain their existing authority checks. Browser prose paths remain display-only.
  • Contract: docs/design/conversation-shared-capabilities.md#desktop-local-file-viewing.

Validation

node --test packages/conversation-ui-core/test/*.test.mjs -> 193 passed
corepack pnpm --filter @ling-stack/localization test -> 55/55 catalogs, 15 tests passed
corepack pnpm --filter @ling-stack/remote-client test -> 9 passed
corepack pnpm --filter @ling-stack/web test:ci -> 575 passed
node --test apps/desktop/tests/local-files.test.mjs apps/desktop/tests/theme-package-preload.test.mjs apps/desktop/tests/main-window-contract.test.mjs apps/desktop/tests/ipc.test.mjs -> 27 passed
node apps/desktop/tests/run-local-file-smoke.mjs -> passed with real Electron sandbox/preload/IPC and native Menu
LING_PLAYWRIGHT_PORT=4197 corepack pnpm --filter @ling-stack/web exec playwright test e2e/local-file-preview.spec.ts e2e/ui2-conversation-file-diff.spec.ts e2e/terminal-report-privacy.spec.ts --reporter=line -> 20 passed
corepack pnpm --filter @ling-stack/web build:ci -> passed
corepack pnpm --filter @ling-stack/web typecheck:ci -> passed
corepack pnpm --filter @ling-stack/desktop typecheck:ci -> passed
corepack pnpm --filter @ling-stack/web lint -> passed
corepack pnpm --filter @ling-stack/web check:i18n -> passed
node scripts/check-markdown-links.mjs -> passed
node scripts/check-public-repo-safety.mjs -> passed
git diff --check -> passed

The selected-package runner additionally passed core (3608), contracts (90), API client (107), browser host (18), conversation React (26), providers (74), and remote protocol (40) tests. Its initial local remote-client step lacked dist outputs; the declared build-and-test command then passed all nine tests. Web was rerun afterward and passed 575/575.

The browser journey uses a desktop bridge fixture; a separate real Electron smoke verifies trusted clicks, synthetic-click rejection, ZIP inspection and native menu construction. macOS ZIP associations returned Archive Utility, Keka and WorkBuddy. No external application is launched by the smoke.

Product And Visual Evidence

Retained locally under output/playwright/local-files/: code-dark.png (highlighted line and complete code drawer) and zip-dark.png (unsupported placeholder and Open with). Final captures use the app's reduced-motion preference for stable layout. Normal-motion keyboard, directory, failure and latest-selection behavior passed the journey tests. Light-theme and actual Windows/Linux chooser acceptance were not run.

Risk And Compatibility

No storage migration, provider or public daemon API change; no new dependencies. Local viewing does not add file contents to AI context or authorize tools. Text previews cap content at 256 KiB and show a 300-line window; images cap at 10 MiB and folder listings at 500 entries. PDF/Office/archive/binary preview remains unsupported with external actions available. macOS is runtime-verified; Windows/Linux external-app chooser behavior still needs platform acceptance.

Native defensive and frontend/coverage reviews have no confirmed unresolved defect after the UNC-cwd rejection fix. Optional external Claude Code review was unavailable due to authentication; it is not counted as passing coverage. Gate scan: four test hunks listed, no eligible relaxations. Extra scenarios not directly asserted in new E2E include chat-switch invalidation, competing drawer navigation, parent-root boundaries and image rendering.

Documentation

Local-viewing limits and user actions are documented in shared capabilities and linked from the desktop-shell and right-dock contracts. The feature contracts were audited before the final locale-only completion; those original contract inputs are unchanged. The subsequent 53 catalog data files received structural review across all locales and linguistic sampling of eight locales. Standalone newcomer tutorial remains documentation debt; no affected diagram drift.

Checklist

  • The change is focused and follows existing module boundaries.
  • Tests cover the changed behavior or the missing coverage is explained.
  • Chinese and English product copy remain aligned when applicable.
  • Documentation and implementation status are updated when applicable.
  • No credentials, tokens, local databases, logs, artifacts, or private paths are committed.
  • No test, approval, security, or release gate was skipped or weakened to make this pass.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T11:12:40.585142Z 2436544 New commits
🔒 Security Review 🔄 Running since 2026-10-23T11:05:16.484004Z 2436544 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@tianxiaochannel-oss88
tianxiaochannel-oss88 enabled auto-merge (squash) October 23, 2026 11:49
@tianxiaochannel-oss88
tianxiaochannel-oss88 merged commit c786d99 into main Oct 23, 2026
15 checks passed
@tianxiaochannel-oss88
tianxiaochannel-oss88 deleted the codex/local-file-preview branch October 23, 2026 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant