Skip to content

fix(web): keep readonly comment creation available - #6278

Open
lefarcen wants to merge 2 commits into
feat/workspace-teamfrom
fix/cloud-login-outage-state
Open

fix(web): keep readonly comment creation available#6278
lefarcen wants to merge 2 commits into
feat/workspace-teamfrom
fix/cloud-login-outage-state

Conversation

@lefarcen

Copy link
Copy Markdown
Contributor

Why

While dogfooding team workspaces, members and admins could select an element in a readonly shared project, but the annotation popover hid the Comment button. A newly-created draft was being treated as a persisted legacy comment with no author, incorrectly restricting it to the workspace owner.

This regression blocked normal review collaboration in readonly projects even though commenting is an explicitly allowed capability.

What users will see

Members and admins can select an element in a readonly team project, type an annotation, and click Comment in the element popover. Readonly restrictions still prevent edit/export and the send-to-Chat action remains unavailable.

Surface area

  • UI — new page / dialog / panel / menu item / setting / empty state in apps/web or apps/desktop (including Electron menu bar)
  • Keyboard shortcut — new or changed
  • CLI / env var — new od subcommand or flag, new tools-dev / tools-pack flag, or new OD_* env var
  • API / contract — new /api/* endpoint, new SSE event, or changed shape in packages/contracts
  • Extension point — new entry under skills/, design-systems/, design-templates/, or craft/, or change to the skills protocol
  • i18n keys — added new translation keys (see TRANSLATIONS.md for the locale workflow)
  • New top-level dependency — adding any new entry to the root package.json (dependencies or devDependencies); workspace-package package.json files are out of scope. Include a paragraph on what we get vs. what bytes we ship (see CONTRIBUTING.md → Code style)
  • Default behavior change — changes what existing users experience without opting in (default model, default setting, file/SQLite schema, auto-network on startup, auto-install)
  • None — internal refactor, docs, tests, or translation update only

Screenshots

Not attached for this focused hotfix. The interaction path and the presence of the popover Comment CTA are covered by the regression test below.

Bug fix verification

  • Test path that reproduces the bug: apps/web/tests/components/FileViewer.test.tsxkeeps the Comment CTA for a new element annotation in a viewer-only team project
  • Red/green result: yes. Before the source fix, the textarea unexpectedly had readonly=""; the identical test passes after the fix.

Validation

  • Focused regression test: red before the source fix, green after it.
  • pnpm --filter @open-design/web test -- tests/components/FileViewer.test.tsx tests/components/BoardComposerPopover.actions-visible.test.tsx — 225 passed.
  • git diff --check — passed.
  • pnpm --filter @open-design/web typecheck — blocked by a pre-existing unrelated error in EntryNavRail.tsx:761: workspaceName is missing from WorkspaceCollabContext.

@lefarcen
lefarcen requested a review from PerishCode July 30, 2026 08:53
@lefarcen lefarcen added size/M PR changes 100-300 lines risk/medium Medium risk: regular code changes type/bugfix Bug fix labels Jul 30, 2026

@PerishCode PerishCode left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The readonly annotation fix is focused and preserves the intended distinction between a new draft and a persisted authorless legacy comment. One independent behavior change is bundled into this hotfix and needs to be split before merge.

🔁 Powered by Looper · runner=reviewer · agent=codex · An autonomous AI dev team for your GitHub repos.

Comment thread apps/web/src/App.tsx
defaultDesignSystemId={config.designSystemId}
agents={agents}
agentsLoading={agentsLoading}
amrLoggedIn={amrLoginStatus?.loggedIn ?? null}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Split the Cloud sign-in outage change out of this readonly-comment hotfix. This line starts an independent account-state behavior change that also modifies EntryShell.tsx, EntryView.tsx, adds entry-rail-account-state.ts, and adds two unrelated test groups (180 changed lines in the separate preserve Cloud sign-in during outages commit). The PR body scopes and validates only the annotation Comment CTA regression, so reviewers cannot evaluate the account-state change against a stated user problem or its own complete validation, and merging this focused bugfix would also silently change outage/sign-in behavior. Please remove that first commit from this branch and submit it as a separate PR with its own rationale and validation; keep this PR limited to FileViewer.tsx and its regression test.

🔁 Powered by Looper · runner=reviewer · agent=codex · An autonomous AI dev team for your GitHub repos.

@github-actions

Copy link
Copy Markdown
Contributor

Visual regression review

Head: c0a1dc1 · Base: 391da2c

Baseline unavailable; PR screenshots are new visual cases and need baseline review.

0 changed · 0 unchanged · 47 new without baseline · 0 failed

New cases without baselines

PR PR PR
visual-avatar-local-agent-list
pr
visual-avatar-local-agent-list-panel
pr
visual-avatar-menu
pr
visual-avatar-menu-panel
pr
visual-avatar-open-design-model-picker
pr
visual-critical-settings
pr
visual-critical-workspace
pr
visual-critical-workspace-preview
pr
visual-design-system-detail
pr
visual-design-systems
pr
visual-home
pr
visual-home-catalog
pr
visual-home-context-picker
pr
visual-home-context-picker-popover
pr
visual-home-plugin-filter
pr
visual-home-plugin-use-staged
pr
visual-home-plugin-use-with-query
pr
visual-home-staged-attachment
pr
visual-integrations-use-everywhere
pr
visual-new-project-modal
pr

27 additional new case(s) omitted from this comment.

Visual diff is advisory only and does not block merging.

@PerishCode PerishCode closed this Jul 30, 2026
@PerishCode PerishCode reopened this Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk/medium Medium risk: regular code changes size/M PR changes 100-300 lines type/bugfix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants