Skip to content

fix(content): name the page type filtering the Plan's list while its section is closed - #1344

Merged
gkhngyk merged 1 commit into
ansvisor:mainfrom
cihan-gyk:fix/plan-insights-filter-closed
Oct 22, 2026
Merged

gkhngyk merged 1 commit into
ansvisor:mainfrom
cihan-gyk:fix/plan-insights-filter-closed

Conversation

@cihan-gyk

Copy link
Copy Markdown
Collaborator

Summary

Follow-up you asked for on #1330: a page-type filter picked in "What AI cites in your topics" stays on after the section is closed (page.tsx keeps typeFilter). While closed, nothing showed which type was filtering the list or offered a way to clear it.

  • Closed with a filter on: a line under the bar says "Priority list filtered to {type}" with a ✕ Clear button that clears it (onSelect(null)).
  • Open, or with no filter: nothing changes. Open, the pressed row already says it.
  • The line sits under the bar rather than inside it: the bar is one <button> (the whole bar opens the section), and a clear button can't nest inside it.
  • I chose this over keeping the section open while a type is selected, so closing it always closes it.
  • Copy: contentEditor.plan.mix.filteredBy and clearFilter.

Web only.

Related issue

None. Follow-up from the #1330 review.

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. Open /dashboard/content/plan and click Show on "What AI cites in your topics".
  2. Click a row (e.g. Best-of list): the priority list narrows to that type.
  3. Click Hide: under the bar, "Priority list filtered to Best-of list ✕ Clear".
  4. Click Clear: the line goes, and the list shows every row again.

Checked in light and dark, and at 1280 px.

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: 283 files, 2,497 tests pass. yarn build passes with CI's placeholders.

🤖 Generated with Claude Code

…section is closed

A page-type filter picked in "What AI cites in your topics" stays on after
the section closes. Closed, a line under its bar now says "Priority list
filtered to {type}" with a Clear button, so the filter is never out of
sight. Nothing changes without a filter.

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

Copy link
Copy Markdown
Collaborator Author

@gkhngyk The #1330 follow-up you suggested: closed with a type picked, a line under the bar names it ("Priority list filtered to {type}") with a Clear button. I picked this over keeping the section open, so Hide always closes it. Web only.

@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 (reviewed b9123dc5). This closes the #1330 item:

  • With the section closed and a type selected, the line names the type, and Clear resets the filter.
  • selected is the filter that actually applies (page.tsx:139), so a period without that type shows no line.

It merges cleanly on main and with the #1321 and #1342 stacks.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants