Skip to content

fix(content): draw the Plan's mix bars to one scale, and open the page in its final layout - #1319

Merged
gkhngyk merged 2 commits into
ansvisor:mainfrom
cihan-gyk:fix/plan-display
Oct 22, 2026
Merged

gkhngyk merged 2 commits into
ansvisor:mainfrom
cihan-gyk:fix/plan-display

Conversation

@cihan-gyk

Copy link
Copy Markdown
Collaborator

Summary

Two display bugs on the Content plan, both seen on production by the user.

  • "What AI cites in your topics": a bar ran past its track.
    • Both shares were drawn on one track, scaled to AI's largest share. So a type the brand leans on more than AI does (e.g. Blog post 35% · 73%) drew the brand's bar past the track and over the shares column.
    • The two shares are now two thin bars on one scale, the larger of either. Neither runs past the track, and neither hides the other. AI's bar is light, above; the brand's is dark, below.
  • The page jumped while it loaded.
    • The list and the sections above it (the AI results strip, the mix) were read and drawn apart. The Priority list showed mid-screen first, then jumped down when the sections came in.
    • The page now shows one spinner until both reads are in, and opens in its final layout. A list that fails to load says so at once. Switching the period shows the spinner again, then the whole page.

Related issue

None. Reported in the app.

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 for a brand whose own pages are cited. A type where "Your pages' mix" is larger than "Share of AI citations" keeps its dark bar inside the track.
  2. Reload, or switch Last 7 / 30 / 90 days: a spinner, then the whole page at once, with no list showing first.

Checked at 1024 px and wider, in light and dark. Seen in the page: loaded → spinner → loaded, with no in-between state.

Checklist

  • Branch follows the naming convention (feature/, fix/, chore/, docs/) — see CONTRIBUTING.md
  • Commits follow Conventional Commits
  • yarn lint passes (run from web/): no errors; the 6 warnings are in files this PR does not touch
  • yarn typecheck passes (run from web/)
  • yarn format:check passes (run from web/)
  • Changes are focused — one concern per PR (the Plan page's display)

Also run: yarn test (2,484 tests; new ones cover the bar widths on one scale and the single spinner until both reads are in) and yarn build. Web only, no migration, no new dependency.

🤖 Generated with Claude Code

cihan-gyk and others added 2 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]>
@cihan-gyk

Copy link
Copy Markdown
Collaborator Author

@gkhngyk Two display fixes on the Content plan that the user saw on production. The mix's dark bar ran past its track when the brand's share was larger than AI's. And the page loaded in two jumps: the list first, then the sections above it. Web only; the description has the details and the checks.

@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. The page now waits on both reads; content_plan_insights measured 0.3 s (30 days) to 1.5 s (90 days) on the largest brand as authenticated, so the single spinner costs little.

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 merged commit c305eb5 into ansvisor:main Oct 22, 2026
5 checks passed
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