From f628095205d826f39f51684b2c000e76f412ed24 Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Fri, 10 Jul 2026 16:08:35 -0700 Subject: [PATCH] fix(dashboard): make selection Add-comment trigger clickable and label read-only previews The global .btn:active press-feedback transform (scale 0.97) overrode the selection-comment trigger's positioning translate, teleporting the fixed-position button mid-press so the click never landed and the composer silently never opened. The :active state now restates the translate alongside the scale on desktop and mobile offsets. Document previews also gain a subtle Read-only badge explaining select-to-comment. Co-Authored-By: Claude Fable 5 --- .../artifacts-add-comment-active-transform.md | 7 ++++ .../app/components/DocumentsView.css | 13 +++++++ .../app/components/DocumentsView.tsx | 10 +++++ .../components/SelectionCommentPopover.css | 28 +++++++++++++ .../__tests__/DocumentsView.test.tsx | 18 +++++++++ .../SelectionCommentPopover.test.tsx | 39 +++++++++++++++++++ packages/i18n/locales/en/app.json | 2 + packages/i18n/locales/es/app.json | 4 +- packages/i18n/locales/fr/app.json | 4 +- packages/i18n/locales/ko/app.json | 4 +- packages/i18n/locales/zh-CN/app.json | 4 +- packages/i18n/locales/zh-TW/app.json | 4 +- 12 files changed, 132 insertions(+), 5 deletions(-) create mode 100644 .changeset/artifacts-add-comment-active-transform.md diff --git a/.changeset/artifacts-add-comment-active-transform.md b/.changeset/artifacts-add-comment-active-transform.md new file mode 100644 index 0000000000..1b02672703 --- /dev/null +++ b/.changeset/artifacts-add-comment-active-transform.md @@ -0,0 +1,7 @@ +--- +"@runfusion/fusion": patch +--- + +summary: Fix the Artifacts preview "Add comment" button doing nothing when clicked, and label the preview as read-only. +category: fix +dev: The global `.btn:active { transform: scale(0.97) }` press feedback replaced the selection-comment trigger's positioning translate while the mouse was held, moving the button out from under the cursor so `click` never fired. `.selection-comment-trigger:active` now restates the translate (desktop and mobile), covering DocumentsView and FileEditor surfaces. The Artifacts project-file preview header also gains a `documents.readOnly` badge. diff --git a/packages/dashboard/app/components/DocumentsView.css b/packages/dashboard/app/components/DocumentsView.css index 3690df2c09..781950b547 100644 --- a/packages/dashboard/app/components/DocumentsView.css +++ b/packages/dashboard/app/components/DocumentsView.css @@ -318,6 +318,19 @@ Artifacts controls are the first page content below the shared header, so add a flex: 1; } +/* +FNXC:ArtifactsView 2026-07-10-16:10: +Subtle view-only indicator for the project-file preview header; muted so it informs without competing with the Plain/Markdown toggle. Shared markup serves desktop and mobile. +*/ +.documents-readonly-badge { + flex-shrink: 0; + color: var(--text-muted); + font-size: 11px; + text-transform: uppercase; + letter-spacing: 0.04em; + white-space: nowrap; +} + .documents-content-viewer-text { border: 1px solid var(--border); border-radius: var(--radius-md); diff --git a/packages/dashboard/app/components/DocumentsView.tsx b/packages/dashboard/app/components/DocumentsView.tsx index a7aaebf1c5..3ea4b70ce4 100644 --- a/packages/dashboard/app/components/DocumentsView.tsx +++ b/packages/dashboard/app/components/DocumentsView.tsx @@ -744,6 +744,16 @@ export function DocumentsView({ projectId, addToast, onOpenDetail, onOpenArtifac

{selectedFile.path}

+ {/* + FNXC:ArtifactsView 2026-07-10-16:10: + First-run review feedback: the Artifacts preview pane did not communicate whether documents are editable. This pane is view-only (there is no editor here — editing happens elsewhere, e.g. the workspace FileEditor), so a persistent Read-only badge states that explicitly on both desktop and mobile. Select-to-comment still works and is the intended interaction. + */} + + {t("documents.readOnly", "Read-only")} +