Skip to content

fix(content): cross out a step the agent took in Next's path - #1566

Merged
gkhngyk merged 1 commit into
ansvisor:mainfrom
cihan-gyk:fix/next-step-passed-strike
Oct 27, 2026
Merged

gkhngyk merged 1 commit into
ansvisor:mainfrom
cihan-gyk:fix/next-step-passed-strike

Conversation

@cihan-gyk

Copy link
Copy Markdown
Collaborator

Summary

From the user's live test on a draft: Next now moves past step 3 once the agent took it (#1550, #1556), and step 4 shows. But in the basket's path, step 3 wasn't crossed out as a done step is, so it read as still open.

A passed step's name is now crossed out, like a done one. Its note ("yours in the Rules tab", the rule left for the person) isn't crossed out, since that part is still the person's. The dot keeps its number: a passed step isn't done.

Related issue

Follow-up to #1556 (the path's passed state).

Type of change

  • feat — New feature
  • fix — Bug fix
  • chore — Maintenance / dependencies
  • docs — Documentation only
  • refactor — Code change that neither fixes a bug nor adds a feature
  • test — Adding or updating tests

How to test

  1. cd web && yarn vitest run 'src/app/[locale]/(dashboard)/dashboard/content/editor/[draftId]/_next-step.test.tsx'. The new case fails without the change.
  2. In the editor, let the agent take Fix open rules with a rule left open and decide its changes, then open Next. "Fix open rules" is crossed out, and "yours in the Rules tab" beside it isn't.

Checklist

  • Branch follows the naming convention (feature/, fix/, chore/, docs/) — see CONTRIBUTING.md
  • Commits follow Conventional Commits
  • yarn lint passes (run from web/)
  • yarn typecheck passes (run from web/)
  • yarn format:check passes (run from web/)
  • Changes are focused — one concern per PR

Also run: yarn format, yarn lint (0 errors), yarn typecheck, yarn test and yarn build in web/. The full test run was on a heavily loaded machine: 40 tests in 17 files timed out there, all outside this change. Each of those files passes when run on its own, except the content editor's page.test.tsx (it renders this basket), where 252 of 257 pass alone and the five that timed out pass when run by name.

No screenshot yet: the Mac's memory was full. One follows from the next local test session.

🤖 Generated with Claude Code

@gkhngyk gkhngyk 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.

Looks good, with follow-ups.

What I checked:

  • What the person sees. A step the agent took (passed, next-step.ts:353-357) now reads, muted, as "Fix open rules · yours in the Rules tab". The Length step reads the same way, as "Shorten to your Length · yours in the Rules tab".
    • The name is struck in its own span (_next-step.tsx:391).
    • The note is a sibling, not a child, so the strike doesn't reach it. no-underline couldn't cancel it from inside anyway.
    • The dot keeps its number on the muted fill (:386, PATH_DOT.passed), and the header's bars still show the step light.
    • A done step stays different: its whole line is struck, and its dot is filled with a check (:373, :386).
    • I find it clear. The struck name says Next has moved past the step. The note, left unstruck, says what's still the person's, which also explains the "If you see…" line that still offers Fix open rules. The numbered dot keeps it from reading as done. That answers round 34's concern (step 3 shown as done while rules are open) and the live test's (a step left unstruck read as still open).
  • Screen readers. The visible note is still aria-hidden, and the sr-only state is still outside the struck span (:399). A screen reader hears "Fix open rules · taken by Content Agent, what's left is yours in the Rules tab", as before. A CSS strike isn't announced. Wrapping the name in a span doesn't change the line's text, so page.test.tsx:6585 ("Fix open rules· yours in the Rules tab") still holds.
  • The test. It fails without the change: on main the name is a bare text node, so no span's text is exactly "Fix open rules". It also checks that neither the note, the name's wrapper nor the row is struck, which guards against striking the whole line as a done step is. I read it but didn't run it.
  • Merge.
    • One commit on 3b650fb (main). git merge-tree with main gives the head's tree (e659b7f4).
    • It shares no files with #1560, and the two merge cleanly (tree 438cdb18). #1560 changes when a pass holds (thirdStepPasses), not how the path draws one. With both, a Fix open rules pass that holds while the page comes within its Length still shows struck.
  • Before the API deploy. Web only: no strings, no API, no migration.

Follow-up:

  1. Pin the two things the PR keeps (_next-step.test.tsx:144-167).
    • The test checks step.textContent for "yours in the Rules tab". The visible note and the sr-only text both contain that, so dropping either still passes. Nothing checks the dot either.
    • Fix: add
      • expect(step.querySelector('.sr-only')!.textContent).toBe(" · taken by Content Agent, what's left is yours in the Rules tab");
      • expect(step.querySelector('span[aria-hidden]')!.textContent).toBe('3').

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.

2 participants