Skip to content

feat(content): open the Plan's "What AI cites in your topics" closed - #1330

Merged
gkhngyk merged 5 commits into
ansvisor:mainfrom
cihan-gyk:feature/plan-mix-collapsible
Oct 22, 2026
Merged

gkhngyk merged 5 commits into
ansvisor:mainfrom
cihan-gyk:feature/plan-mix-collapsible

Conversation

@cihan-gyk

@cihan-gyk cihan-gyk commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

From the user's review of the Content Plan: "What AI cites in your topics" now opens closed, behind a clickable header, the way Tracked Prompts' usage header (#1130) does. The Priority list is the page's work, so it moves up.

  • Header: one full-width bar in a card, so it reads as something to click (the user's follow-up). On the right it shows "Show" and a chevron pointing down; once open, "Hide" and a chevron pointing up. It has a pointer cursor and a hover state, and is a button with aria-expanded and aria-controls. While closed, a short summary sits next to the title: "3 page types · 1 gap".
  • Body: the legend, the rows and the coverage note open inside the same card. They stay mounted while closed (hidden), so the section opens at once.
  • Filtering: a page-type filter still works the same once the section is open.

Web only: _plan-insights.tsx (PageTypeMix), three new en.json keys (contentEditor.plan.mix.collapsed, show, hide), and tests.

Stacked on #1319, which reworked the same component's bars. I'll merge main forward once it lands.

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

  1. Content → Plan. "What AI cites in your topics" is a closed bar, with "N page types · M gaps" beside the title and "Show ⌄" on the right.
  2. Click it. The legend, the bars and the coverage note open. Click a page type: the list filters as before.
  3. Click the bar again ("Hide ⌃") to close it.

Checked in light and dark, at phone width, 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 passes: 281 files, 2,485 tests. yarn build passes with CI's placeholders (first commit).

🤖 Generated with Claude Code

cihan-gyk and others added 3 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]>
The page-type mix now sits behind a clickable header, closed by default,
as Tracked Prompts' usage header does: the Priority list is the page's
work. Closed, it says how many page types and gaps it holds; opened,
the legend, bars and coverage note show as before, and a type still
filters the list.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@cihan-gyk

Copy link
Copy Markdown
Collaborator Author

@gkhngyk The user asked for this small Plan change: "What AI cites in your topics" now opens closed behind a clickable header, the same pattern as the Tracked Prompts usage header (#1130), with an "N page types · M gaps" summary while closed. It's web only, and stacked on #1319 because it touches the same component. Tests (2,485) and the build pass, and I checked it in both themes and at 1024 px.

The user asked that the closed section look clickable and show that it
opens downward. The whole header is now one full-width bar in a card,
with "Show" and a chevron pointing down on the right ("Hide" and up
when open), a pointer cursor and a hover state. The legend, the rows
and the coverage note open inside the same card.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@cihan-gyk

Copy link
Copy Markdown
Collaborator Author

@gkhngyk The user followed up on this one: the closed section has to look clickable and show that it opens downward. In fd95b14 the header is now a full-width bar in a card, with "Show ⌄" on the right ("Hide ⌃" when open), a pointer cursor and a hover state. The legend, rows and coverage note open inside the same card. The PR body is updated. Web tests pass (281 files, 2,485 tests), along with lint and typecheck; I checked it in both themes, at phone width and at 1024 px.

gkhngyk
gkhngyk previously approved these changes Oct 22, 2026

@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, one small fix (reviewed abdf18fd and fd95b149 on top of #1319):

  1. web/src/app/[locale]/(dashboard)/dashboard/content/plan/_plan-insights.tsx:109: a page-type filter picked in the section stays on after it is closed (page.tsx:140 keeps typeFilter). While the section is closed, nothing shows which type is filtering the list or offers a way to clear it. The list only reads "Filtered · click it again to clear". Either show the selected type with a clear button in the collapsed header, or keep the section open while a type is selected (open || selected !== null).

Approving; the filter item can come in a follow-up.

Tested on top of main together with #1327, #1319, #1330 and #1320: web 2,487 tests, server 2,006, tsc, lint and Prettier pass.

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

Re-approving after merging main in (#1319 landed).

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