Repository navigation
fix(app): open activity files and copy image contents - #4716
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
3 Skipped Deployments
|
Warden review summary — ClearNative findings: 0. Blocking policy matches before consolidation: 0. Full finding text remains in Warden's native checks and review threads. This comment retains only native IDs, severity, skill attribution, and safe locations. Analysis run Reported trigger coverage (not proof of complete repository or context coverage): diff-security-review (109070 ms), confidentiality-review (123517 ms), desktop-den-sync-review (147481 ms). Blockers
Advisories
Needs recheck
Observed review-thread metrics
Thread states are read-only collection snapshots. These metrics are neither lifetime totals nor exact resolution times, and this summary is not clearance authority. |
1bd968b to
3cf4002
Compare
848987a to
7004444
Compare
|
Passed · 12/12 tests · 18/18 assertions · 8 images Commit |
7004444 to
0029089
Compare
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (00290894550482cf19f2445420753ad30c1647fc). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
Explicit native file actions hand only workspace-contained paths to the default application. Paths outside the workspace root, including absolute paths with dot segments, are shown in the file manager and never passed to the shell opener, so a referenced path cannot start a program.
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (23710cd1bdb27cdcf1a2cb1ae6e64825ea96d7bd). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
Summary
Review Reconciliation
Addressed JJ9-N5M: relative native targets are checked for empty, dot, and parent components after URL decoding and before joining the workspace root. Both slash styles and encoded separators are covered. Invalid input is rejected rather than normalized into a different file. Safe literal filesystem names remain unchanged; explicit absolute local paths retain the intended outside-workspace action.
The chip also preserves the input path before validation. The former normalization could strip real
workspaces/...orworkspace/123/...directories and collapse a UNC prefix. Component assertions cover those cases as well as exact opening/copying without a cached-file substitution.Addressed VLC-7DN:
nativeFileActiondecides what an explicit native action may do. Only paths contained by the workspace root are passed toopenDesktopPath; any other local path, including an absolute path with a dot segment such as/workspace/../x, is routed torevealDesktopItemInDir, which shows the item in the file manager and never launches it. Containment is a comparison only: the literal path handed to the desktop is not rewritten. Remote workspaces and automatic preview requests are unchanged.Revisions
23710cd1bdb27cdcf1a2cb1ae6e64825ea96d7bd916c0ba5f31832d7bec2de5618e2dbb9d356e63400290894550482cf19f2445420753ad30c1647fc(rebase),7004444f0347d990b7234358d564f8b2d860f9ceon devdfbd2e0b27f9f975ce669aa567d48df49f782fb2Rebased onto freshly fetched dev to resolve the merge conflict; merge-base equals that exact base. The fourth commit adds the outside-workspace reveal boundary. All commits above dev carry verified signatures. The branch was updated with an exact expected-head force-with-lease.
Conflict resolution
The only conflict was in
apps/desktop/electron/context-menu.mjs. #4744 added dev-mode native popup observation (describeTemplate,findTemplateItem, andinspect/chooseon the controller) to the same region where this branch addscontentMenuTemplateand theclipboarddependency forcreateNativeContextMenus. Both sides are additive and were kept together; no product behavior from either side was changed.main.mjs,preload.mjs,context-menu.test.mjs, andsession-page.tsxauto-merged. The merged test file now runs both this branch's content-menu tests and #4744's observation tests.Testing
Checks below ran on the current head after the rebase:
pnpm --filter @openwork/desktop typecheck:electronnode --test apps/desktop/electron/context-menu.test.mjspnpm --filter @openwork/app exec bun test --isolate ./tests/resolve-open-target.test.ts ./tests/tool-aggregate-group.test.tsxpnpm --filter @openwork/app typecheckgit diff --check origin/dev...HEADThe app checks cover traversal/encoding rejection, safe path preservation, exact file-chip targets, workspace resolver behavior, copy-path without opening a file, and the new open/reveal decision: workspace-contained relative and absolute paths (including Windows drive-letter case) open, while
/tmp/..., sibling directories,.command/.shtargets,file:URLs outside the workspace, another drive, and/workspace/../...all reveal. The desktop menu checks run on the current head and are unchanged by the final commit. The desktop menu checks cover selection-gated decoded-pixel/address callbacks, existing native menu boundaries, and the dev-mode observation added on dev by #4744.Earlier CI failure on this branch
An earlier head failed
pnpm --filter @openwork/desktop typecheck:electronin build job 103090666303: three TS2339 errors accessedlabel/clickwithout narrowing the menu-item union, and one TS2345 error omitted the required clipboard fixture dependency. Thetest(desktop): satisfy native menu type contractcommit fixes onlycontext-menu.test.mjs: it narrows the union before accessing menu fields, asserts callable actions, and provides a clipboard fixture that rejects unexpected writes. The same command now exits 0 on the current head. Automatic CI validates the new head.Not covered
These checks do not exercise the operating system's file launcher, Chromium hit-testing, the system image clipboard, or the full SessionPage remote/local dispatch path. Real Electron file-launch/image-clipboard and remote/local dispatch journeys, and manual security review, have not been run for this change. The existing
artifact-code-browserjourney covers workspace previews but does not yet assert the native actions or the remote/local fallback boundary added here. No local E2E, cloud provisioning, or manual review run was performed. Normal automatic CI remains unchanged.Manual Reproduction
workspaces/photos/directory. Open and Copy path must retain that directory and the filename's case.../,./, backslash, and URL-encoded dot-segment targets with Open in default app. They must not reach the native opener. URL schemes and network shares must also be rejected.UI/UX impact: adds file-chip actions (Open file, Open in default app, Copy path) and native image/link copy menu items as described in the Summary. Open in default app on a file outside the workspace now reveals it in the file manager instead of launching it; workspace files, previews, and editing menus behave as before.
No merge or release is included.