Skip to content

fix(cms-tour): only anchor the submit step on the create-PR state - #5133

Merged
guitavano merged 1 commit into
mainfrom
fix/cms-tour-submit-anchor-gating
Jul 23, 2026
Merged

fix(cms-tour): only anchor the submit step on the create-PR state#5133
guitavano merged 1 commit into
mainfrom
fix/cms-tour-submit-anchor-gating

Conversation

@guitavano

@guitavano guitavano commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up fix for the CMS visual tour (shipped in #5055).

The "submit for review" step anchored tour-submit on the header's primary action button unconditionally. In neutral states — notably "Up to date" (disabled, no action) — the step highlighted that button, so the spotlight landed on a control whose label ("Atualizado") contradicts the step copy ("Enviar para revisão").

Fix

Gate the anchor on the button actually being in the submit state:

data-tour={button.action === "create-pr" ? TOUR_ANCHORS.submit : undefined}

When the branch is up-to-date (or in any non-submit state), the anchor is absent and driver.js skips the step via skipMissingElement. tour-publish was already state-gated (green Publish side button / merge-split only render when there's something to publish), so no change needed there.

Testing

  • bunx tsc — 0 errors
  • bun run lint — clean
  • Verified create-pr is the submit-for-review action in panel-state.ts.

🤖 Generated with Claude Code


Summary by cubic

Fixes the CMS visual tour so the “Submit for review” step only shows when the primary action is actually submit (create PR). Prevents highlighting the disabled “Up to date” button.

  • Bug Fixes
    • Set data-tour only when button.action === "create-pr"; otherwise omit the anchor so the tour skips the step.

Written for commit bedbc9c. Summary will update on new commits.

Review in cubic

The tour's "submit for review" step anchored `tour-submit` on the header's
primary action button unconditionally. In neutral states — notably "Up to
date" (disabled, no action) — the step highlighted an unrelated button whose
label contradicted the step copy. Gate the anchor on `button.action ===
"create-pr"` so the step only shows when submitting is the actual next action;
otherwise it's skipped via driver.js `skipMissingElement`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@guitavano
guitavano merged commit e42eef5 into main Jul 23, 2026
14 checks passed
@guitavano
guitavano deleted the fix/cms-tour-submit-anchor-gating branch July 23, 2026 20:43
decocms Bot pushed a commit that referenced this pull request Jul 23, 2026
PR: #5133 fix(cms-tour): only anchor the submit step on the create-PR state
Bump type: patch

- decocms (apps/mesh/package.json): 4.113.0 -> 4.113.1

Deploy-Scope: web
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