Skip to content

feat(action-center): open the Content Plan's top rows from Getting started - #1329

Merged
gkhngyk merged 10 commits into
ansvisor:mainfrom
cihan-gyk:feature/getting-started-plan-steps
Oct 22, 2026
Merged

gkhngyk merged 10 commits into
ansvisor:mainfrom
cihan-gyk:feature/getting-started-plan-steps

Conversation

@cihan-gyk

Copy link
Copy Markdown
Collaborator

Summary

From the user's review of Getting started (AC-ALT2): the "Create your first content" and "Optimize a page" steps now open two items of the Content Plan, its top Create row and its top Optimize row, instead of Content Opportunities and Site Audit.

Steps (lib/getting-started/steps.ts)

  • create_content opens /dashboard/content/plan?start=create, and optimize_page opens /dashboard/content/plan?start=optimize.

  • Done when:

    • create_content: a create draft is made ready or published (new), or content was sent to the CMS or completed (as before);
    • optimize_page: an optimize draft is made ready or published (new), or a page was audited (as before).

    The old criteria still count, so a step already done stays done.

  • The steps' copy (summary, button, "done when", how) now speaks of the Plan.

Content Plan (content/plan/page.tsx)

  • ?start=create|optimize is read once and removed from the URL, so a reload opens the plan as it is.
  • Once the plan is in, the page selects that action's card and:
    • opens Start on the top row of that action that isn't being written yet;
    • opens the draft already written if every such row has one;
    • otherwise leaves only the card selected, which says there's nothing to do.
  • Priority rows (feat(content): assign, mark as a priority or hide a Content plan row #1321) rank first, so a marked row is the one started.
  • presetFor moves out of the component (a pure function of the row), which keeps the React Compiler analysing the page.

Header buttons (the user's wording, same PR)

  • "Start getting started" becomes "Get Started".
  • "Skip getting started" becomes "Skip Get Started", and its dialog title reads "Skip Get Started?".

Migration 00234_getting_started_plan_steps.sql (after #1328's 00233)

  • getting_started_facts (00197) adds drafts_created and drafts_optimized: the brand's Content Editor drafts by method, made ready or published. The rest is 00197's body unchanged; the dev DB's body matched main's (md5) before it was redefined.

Stacked on #1321 (with #1320/#1319), which this builds on for the Plan page. I'll merge main forward once they land.

Related issue

None. Product feedback from the user.

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

Apply 00234 first.

  1. Action Center → Getting started → "Create your first content" → Open the Plan. The Plan opens on the Create card, with Start open on its top new page.
  2. "Optimize a page" → Open the Plan. Start opens on the top page to optimize, or its editor if a draft is already being written for it.
  3. Mark that draft ready in the editor. The step reads done in Getting started.
  4. Reload the Plan. It opens as is, without starting anything again.

Checked in light and dark, at 1024 px and wider.

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

yarn test: 281 files, 2,501 tests pass. yarn build passes with CI's placeholders. bash supabase/build-schema.sh was run.

🤖 Generated with Claude Code

cihan-gyk and others added 6 commits October 21, 2026 21:39
…e in its final layout

- "What AI cites in your topics" drew both shares on one track scaled to
  AI's largest share, so a type the brand leans on more than AI does
  (e.g. 35% · 73%) ran its bar past the track onto the shares column. The
  two shares are now two thin bars on one scale, the larger of the two,
  never past the track.
- The list and the sections above it (AI results, the mix) were read and
  drawn apart, so the list showed mid-screen first and jumped down when
  the sections came in. The page now shows one spinner until both reads
  are in; a list that fails says so at once.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rlap warning

More of the brand's pages cited for the same prompts is no loss (AI
answers aren't a ranking), so neither Start nor the Plan treats it as a
problem any more:

- Start's "Overlap check" is an "Overview": a plain box listing the
  brand's pages AI already cites for these prompts, with no amber warning,
  no "Safe to create" and no "Recommended". The action the person clicked
  stays chosen (Create stays Create); the choices are the plan's page when
  it named one, a new page, and optimizing the page cited most.
- The Plan drops the Overlaps card, the ⚠ Overlap tag on rows, and the
  rows that were listed only because another page of the brand is cited
  for the same prompts.

content_plan_pages (00220/00221) still returns overlaps; the Plan no
longer reads it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each Priority list row gets a "…" menu:
- Assign to… (every member): a row with a draft assigns its Action
  Center task (sending the draft first when needed); a row without one
  opens Start on Team, which now has an "Assign to" picker. The Who
  column shows the assignee.
- Mark as priority (admins and managers): the row goes to the top with a
  Priority tag; a Priority card counts and filters the marked rows.
- Hide from the plan (admins and managers): the row leaves the list, with
  Undo and "N hidden rows · Show"; an opportunity's row also dismisses the
  opportunity and gets its status back when shown again.

Migration 00229 adds content_plan_marks (members read; admins and
managers write).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…arted

"Create your first content" and "Optimize a page" now open the Content
Plan (?start=create|optimize) on Start for its top Create or Optimize
row, or the draft already being written for it, instead of Content
Opportunities and Site Audit. A create or optimize draft made ready or
published completes them (migration 00234 adds drafts_created and
drafts_optimized to getting_started_facts); the old ways still count.
The steps' copy speaks of the Plan, and the header buttons read
"Get Started" and "Skip Get Started".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added the needs-migration Adds or edits a migration — apply it to the hosted database label Oct 21, 2026
@cihan-gyk

Copy link
Copy Markdown
Collaborator Author

@gkhngyk This changes two Getting started steps at the user's request: "Create your first content" and "Optimize a page" now open the Content Plan's top Create / Optimize row in Start, or the draft already being written for it. The user also asked for the header buttons to read "Get Started" / "Skip Get Started".

Checks: web 2,501 tests, lint, typecheck and build pass. Tested end to end on dev: the step card's "Open the Plan" opens Start on the right row. Checked in light and dark, and at 1024 px.

@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 on top of #1321 (reviewed d2570cc2 only). Its 00229 is the same file as #1321's, carried by the stack, so it isn't a second migration. #1321's findings apply here until main is merged forward.

00234 checked against prod: the live getting_started_facts has 00197's logic with the comments stripped, so this version only adds drafts_created and drafts_optimized. It stays security invoker, and execute stays limited to authenticated and service_role, with no anon. Merge after #1328 so 00234 lands after 00233, and rebuild schema.sql then. It conflicts with #1328 in schema.sql, content/library/page.test.tsx and content-plan.test.ts.

cihan-gyk and others added 3 commits October 22, 2026 12:02
# Conflicts:
#	supabase/schema.sql
#	web/messages/en.json
#	web/src/app/[locale]/(dashboard)/dashboard/content/plan/_plan-insights.tsx
#	web/src/app/[locale]/(dashboard)/dashboard/content/plan/page.test.tsx
#	web/src/app/[locale]/(dashboard)/dashboard/content/plan/page.tsx
#	web/src/components/content/new-content-dialog.test.tsx
#	web/src/lib/content/plan.test.ts
#	web/src/lib/content/plan.ts
… only what is still dismissed

hidePlanRow and showPlanRow no longer take an opportunity id from the client:
the server reads it from the row key the mark is written under (a uuid, or
'invalid'). Show again gives an opportunity back its status only while it
is still dismissed; one completed or reopened elsewhere keeps its status and
only the mark goes. Hidden rows read only dismissed opportunities. The
Priority card's dot is in ink, as its outline badge.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nu' into feature/getting-started-plan-steps

# Conflicts:
#	supabase/schema.sql
@cihan-gyk

Copy link
Copy Markdown
Collaborator Author

@gkhngyk Merged #1321's review fixes in (8b2c09b5, which also brings main); only schema.sql conflicted, rebuilt. Web: 2,518 tests, lint, tsc, Prettier and the build pass. As you said, this merges after #1328, with schema.sql rebuilt again then.

@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 (re-reviewed 8b2c09b5, which merges #1321's head into this branch):

  • The merge: its tree differs from a clean re-merge of its parents only in supabase/schema.sql, the conflict it resolved, and that file matches a rebuild from the migrations.
  • On top of #1321: it still adds only d2570cc2, unchanged since the last review.
  • #1321's fixes: carried. The Plan calls the new two-argument hidePlanRow and showPlanRow (page.tsx:254, :265).

Merge after #1321. It merges cleanly on main. Apply 00229 and 00234 on prod first; neither is there yet, and prod's getting_started_facts is still 00197's. 00234 doesn't depend on #1328's 00233. Whichever of the two merges second will hit the #1321 stack's conflicts with #1328 in content/library/page.test.tsx and content-plan.test.ts, plus a schema.sql rebuild.

Tested on top of the current main together with #1343, #1344, #1321, #1329, #1332, #1334 and #1342: web and server tests, tsc, lint and Prettier pass, and schema.sql matches a rebuild. 00229, 00234 and 00238 are applied on production.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-migration Adds or edits a migration — apply it to the hosted database

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants