Skip to content

fix(docs): keep the gallery's sharing error from the reader's last action when a link update fails - #489

Merged
vite-hub[bot] merged 2 commits into
mainfrom
fix/gallery-sharing-error-guard
Nov 25, 2026
Merged

vite-hub[bot] merged 2 commits into
mainfrom
fix/gallery-sharing-error-guard

Conversation

@onmax

@onmax onmax commented Nov 25, 2026

Copy link
Copy Markdown
Owner

In the docs gallery, a failed background link update replaces the error from the reader's last action. "Could not open the playground." turns into "Could not create a sharing link." a moment later, and the reader no longer sees what went wrong with what they clicked.

#348 fixed this in reportSharing: a call without a message returns early while an error is showing. #351 was built on a copy of docs/gallery.ts from before #348, and its merge with main kept that copy, so the guard went away.

This puts the guard back as #348 wrote it.

Tested: format, lint and both typechecks (root and comark-ui-docs) pass. Nothing tests the gallery since #351 removed its e2e files, and I did not try the guard in a browser. As in #348, the error is never hidden again, so once one shows, later link-update failures stay silent for the rest of the page's life.

…tion when a link update fails

#348 (0ad268e) made reportSharing skip a debounced link update's failure while an error is already showing. #351 (b99eb9e) merged an older copy of docs/gallery.ts over it and the guard went away, so a failed background link update replaced the error from opening the playground, copying the gallery link or loading a link's edits with "Could not create a sharing link."
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

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

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-25T10:42:59.067762Z
We couldn’t complete this review. Comment @codex review to try again.
8112fa7 PR opened
ℹ️ 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@vite-hub

vite-hub Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor
Session Status Started Duration
Pending Completed Not started —
View session Starting Not started —

Latest result

Pull request merged.

Final answers

Session

Pull request merged.

Session

Pull request evidence changed.

Session

Pull request evidence changed.

Session

Pull request evidence changed.

Session

Pull request evidence changed.

Session

Pull request evidence changed.

Session

Pull request evidence changed.

Session

Pull request evidence changed.

@pkg-pr-new

pkg-pr-new Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

comark-annotate

pnpm add https://pkg.pr.new/comark-annotate@489

comark-badge

pnpm add https://pkg.pr.new/comark-badge@489

comark-bundle

pnpm add https://pkg.pr.new/comark-bundle@489

comark-cards

pnpm add https://pkg.pr.new/comark-cards@489

comark-carousel

pnpm add https://pkg.pr.new/comark-carousel@489

comark-cast

pnpm add https://pkg.pr.new/comark-cast@489

comark-charts

pnpm add https://pkg.pr.new/comark-charts@489

comark-chat

pnpm add https://pkg.pr.new/comark-chat@489

comark-chips

pnpm add https://pkg.pr.new/comark-chips@489

comark-cjk

pnpm add https://pkg.pr.new/comark-cjk@489

comark-code

pnpm add https://pkg.pr.new/comark-code@489

comark-code-notes

pnpm add https://pkg.pr.new/comark-code-notes@489

comark-colors

pnpm add https://pkg.pr.new/comark-colors@489

comark-comments

pnpm add https://pkg.pr.new/comark-comments@489

comark-critic

pnpm add https://pkg.pr.new/comark-critic@489

comark-deflist

pnpm add https://pkg.pr.new/comark-deflist@489

comark-details

pnpm add https://pkg.pr.new/comark-details@489

comark-diagrams

pnpm add https://pkg.pr.new/comark-diagrams@489

comark-diff

pnpm add https://pkg.pr.new/comark-diff@489

comark-embed

pnpm add https://pkg.pr.new/comark-embed@489

comark-fields

pnpm add https://pkg.pr.new/comark-fields@489

comark-figure

pnpm add https://pkg.pr.new/comark-figure@489

comark-file-tree

pnpm add https://pkg.pr.new/comark-file-tree@489

comark-footnotes

pnpm add https://pkg.pr.new/comark-footnotes@489

comark-git-graph

pnpm add https://pkg.pr.new/comark-git-graph@489

comark-github

pnpm add https://pkg.pr.new/comark-github@489

comark-icon

pnpm add https://pkg.pr.new/comark-icon@489

comark-include

pnpm add https://pkg.pr.new/comark-include@489

comark-keys

pnpm add https://pkg.pr.new/comark-keys@489

comark-links

pnpm add https://pkg.pr.new/comark-links@489

comark-linter

pnpm add https://pkg.pr.new/comark-linter@489

comark-magic-move

pnpm add https://pkg.pr.new/comark-magic-move@489

comark-mark

pnpm add https://pkg.pr.new/comark-mark@489

markdown-it-to-comark

pnpm add https://pkg.pr.new/markdown-it-to-comark@489

marked-to-comark

pnpm add https://pkg.pr.new/marked-to-comark@489

comark-mathml

pnpm add https://pkg.pr.new/comark-mathml@489

comark-media

pnpm add https://pkg.pr.new/comark-media@489

comark-metrics

pnpm add https://pkg.pr.new/comark-metrics@489

migrate-to-comark

pnpm add https://pkg.pr.new/migrate-to-comark@489

comark-motion

pnpm add https://pkg.pr.new/comark-motion@489

comark-outline

pnpm add https://pkg.pr.new/comark-outline@489

comark-properties

pnpm add https://pkg.pr.new/comark-properties@489

comark-qr

pnpm add https://pkg.pr.new/comark-qr@489

comark-quiz

pnpm add https://pkg.pr.new/comark-quiz@489

comark-reading-time

pnpm add https://pkg.pr.new/comark-reading-time@489

remark-to-comark

pnpm add https://pkg.pr.new/remark-to-comark@489

comark-sources

pnpm add https://pkg.pr.new/comark-sources@489

comark-steps

pnpm add https://pkg.pr.new/comark-steps@489

comark-table

pnpm add https://pkg.pr.new/comark-table@489

comark-tabs

pnpm add https://pkg.pr.new/comark-tabs@489

comark-tests

pnpm add https://pkg.pr.new/comark-tests@489

comark-time

pnpm add https://pkg.pr.new/comark-time@489

comark-ui

pnpm add https://pkg.pr.new/comark-ui@489

comark-xref

pnpm add https://pkg.pr.new/comark-xref@489

comark-zoom

pnpm add https://pkg.pr.new/comark-zoom@489

commit: 622f6c7

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Important

Preserve the action error for an overlapping update, but let a later edit report that the address bar still points to an older revision.

Approach: Centralizing error precedence in reportSharing() makes sense, but alert visibility is not a reliable way to tell whether an update belongs to the same action.

Reviewed changes — I traced all seven reportSharing() call sites and checked the failure sequence in a local Chromium fixture.

  • Gallery error precedence: Explicit playground, copy, and shared-link load errors can still replace the alert; automatic link-update errors now show only while it is hidden.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6.2-sol(high) | 𝕏

Comment thread docs/gallery.ts Resolved

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ℹ️ No P0 or P1 findings remain; one edge case is noted inline.

Approach: Tracking pending updates rather than alert visibility preserves the action error without silencing failures from later edits.

Reviewed changes — I re-reviewed 622f6c7f and checked both error paths in a local Chromium fixture running startGallery() with the installed codec.

  • Scoped error precedence: Kept overlapping background failures from replacing an explicit action error, while letting later edits report their own failures.
  • Separated background saves from Copy link retries: Dropped superseded background writes and their errors, while letting Copy link retry against the latest edit.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6.2-sol(high) | 𝕏

Comment thread docs/gallery.ts Resolved
@vite-hub
vite-hub Bot merged commit 6c10eec into main Nov 25, 2026
7 checks passed
@vite-hub
vite-hub Bot deleted the fix/gallery-sharing-error-guard branch November 25, 2026 11:16
@github-actions github-actions Bot mentioned this pull request Nov 25, 2026
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