Skip to content

fix(web): only check open modifier when an open action exists - #1

Merged
joshka merged 1 commit into
joshka:joshka/file-links-open-externallyfrom
Stegi56:stegi56/fix-file-link-click-guard
Oct 18, 2026
Merged

joshka merged 1 commit into
joshka:joshka/file-links-open-externallyfrom
Stegi56:stegi56/fix-file-link-click-guard

Conversation

@Stegi56

@Stegi56 Stegi56 commented Oct 17, 2026

Copy link
Copy Markdown

Fixes the one failing test on joshka/file-links-open-externally (ChatMarkdown.permissions.test.tsx > removes host actions after revocation while keeping file preview and copying).

The click handler now checks the open modifier only when an editor or external-open action exists, as it did before the branch. With host actions revoked, a plain click still falls through to the file preview.

Verified on Arch Linux, from apps/web:

vp test run src/components/ChatMarkdown.test.tsx src/components/ChatMarkdown.assets.test.tsx src/components/ChatMarkdown.permissions.test.tsx src/contextMenuFallback.test.ts src/localApi.test.ts

Result: 105/105 passed (it was 104/105 before this fix). vp fmt --check and the web typecheck pass. Lint shows only warnings that were already there.

Claude Opus 5.5 on behalf of Joel Staugaitis.

🤖 Generated with Claude Code

The file-link click handler read the modifier keys before checking that
an editor or external-open action was available. When host actions are
revoked, it still evaluated navigator.platform, which failed the existing
ChatMarkdown.permissions test. Check availability first, as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:S labels Oct 17, 2026
@joshka
joshka merged commit adbcc33 into joshka:joshka/file-links-open-externally Oct 18, 2026
7 of 22 checks passed
@joshka

joshka commented Oct 18, 2026

Copy link
Copy Markdown
Owner

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants