Skip to content

feat(prompts): right-align the positions panel's 24h citations and reorder its platforms - #1102

Merged
gkhngyk merged 2 commits into
ansvisor:mainfrom
cihan-gyk:feature/positions-24h-rows
Oct 17, 2026
Merged

gkhngyk merged 2 commits into
ansvisor:mainfrom
cihan-gyk:feature/positions-24h-rows

Conversation

@cihan-gyk

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

Copy link
Copy Markdown
Collaborator

Summary

Two changes to the Tracked Prompts positions panel, from product feedback: the 24h view's citations sit on the right, and the platforms follow a new order.

Before Now
24h row Name and "Run at …" on one line; Mention and Citation side by side under it, both left-aligned The same layout; the Citation column (label, status and "Detected earlier in this period") is right-aligned, so mentions read down the left and citations down the right
Narrow screens The two blocks stack Unchanged: they stack, left-aligned
Platform order ChatGPT, Perplexity, Google AI Overviews, Google AI Mode, Gemini, Microsoft Copilot, Grok, Claude ChatGPT, Microsoft Copilot, Google AI Overviews, Google AI Mode, Gemini, Grok, Claude, Perplexity

Why:

  • Citations on the right: the status reads in two columns, mention on the left and citation on the right.
  • New order: Microsoft Copilot comes right after ChatGPT, and Perplexity goes last.

What changes

  • lib/prompt-positions.ts: POSITION_PLATFORMS is reordered. It drives the panel (24h and 7d/30d/90d) and the Prompts table's platform dots, so all follow the new order.

  • components/prompts/prompt-positions-sheet.tsx: LatestRow's Citation block gets sm:text-right. The rows also carry data-platform, for the test.

  • Tests

    • prompt-positions.test.ts pins the order.
    • prompt-positions-sheet.test.tsx checks the 24h rows: one per platform in order, mention before citation, the "Detected earlier" notes, and "No completed tracking runs in this period".

    Both fail on main.

Left as is:

  • Growth plan: Perplexity is last everywhere, so on Growth its row comes after the locked Grok and Claude rows.
  • Platform pickers: the pickers when adding a prompt (SCRAPER_GROUPS) keep their own order. This change covers the positions panel and the table's dots.

Commits: the first tried a one-line row per platform. The second returns to the two-column layout with the citation on the right, which is what was asked. The squashed diff against main is the right-aligned column, the order and the tests.

Related issue

None. Product feedback on the Tracked Prompts page.

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 Prompts → Tracked Prompts and click a prompt's position to open its panel at 24h.
  2. Under Platform results, the platforms come in the new order: Microsoft Copilot second, Perplexity last.
  3. For a platform with an answer, Mention is on the left and Citation, with its "Detected earlier" note, is on the right.
  4. Narrow the window to phone width: the two blocks stack.
  5. Switch to 7d, and close the panel: the panel and the table's platform dots keep the same order.

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

Also run:

  • web: yarn test passes (853), and yarn build passes. The panel tests also pass with TZ=America/Los_Angeles.
  • In the browser (demo data): I checked the 24h rows at 1440px, 1024px and phone width, in the light and dark themes. I also checked the 7d order and the table dots.

🤖 Generated with Claude Code

…4h view

The 24h view listed each platform with its name on one line and a
Mention / Citation block under it. Each platform now takes one line: its
name on the left and its latest answer's status on the right ("Mentioned
Early · #1 of 3 · Not cited", or "No runs in this period"). The run's time
moves to the status's tooltip, which opens on hover or keyboard focus.

The platforms are also reordered wherever POSITION_PLATFORMS drives them
(the panel and the table's platform dots): ChatGPT, Microsoft Copilot,
Google AI Overviews, Google AI Mode, Gemini, Grok, Claude, Perplexity.

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

Copy link
Copy Markdown
Collaborator Author

@gkhngyk ready for review: the positions panel's 24h view gives each platform one line with its status on the right, and the platforms follow the new order (Microsoft Copilot second, Perplexity last) in the panel and the table's dots.

…ion on the right

The one-line rows read the request wrong. Each platform keeps its name
line with "Run at …" and its Mention / Citation block under it, as
before; the Citation column is now right-aligned, so mentions read down
the left and citations down the right. On narrow screens the two stack,
left-aligned. The rows carry data-platform for the test; the platform
order from the previous commit stays.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@cihan-gyk cihan-gyk changed the title feat(prompts): give each platform one line in the positions panel's 24h view feat(prompts): right-align the positions panel's 24h citations and reorder its platforms Oct 16, 2026
@cihan-gyk

Copy link
Copy Markdown
Collaborator Author

@gkhngyk updated: the first commit misread the request (one line per platform). The new commit keeps the 24h Mention / Citation layout and right-aligns the Citation column; the platform order is unchanged. Title and description are updated to match.

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

Thanks, approving. Web tests pass on the combined tree.

@gkhngyk
gkhngyk merged commit 76c25ec into ansvisor:main Oct 17, 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