Skip to content

feat(prompts): open the positions panel for a tracked prompt the brand isn't named in - #1089

Merged
gkhngyk merged 6 commits into
ansvisor:mainfrom
cihan-gyk:feature/positions-unmentioned
Oct 16, 2026
Merged

gkhngyk merged 6 commits into
ansvisor:mainfrom
cihan-gyk:feature/positions-unmentioned

Conversation

@cihan-gyk

Copy link
Copy Markdown
Collaborator

Summary

A tracked prompt the brand isn't named in now opens its positions panel, and its Positions cell says why it has no average.

The Positions column offered See only when the brand had a mention or a citation in the window (#1003's rule). A prompt that was tracked but never named therefore had two problems:

  • The cell read "—", the same as a prompt with no answers at all.
  • The panel could only be reached through the row's menu (Improve). Yet that panel is where its "Not mentioned" platforms and its Improve suggestions are.

Now:

The prompt in the window Positions cell See
Named, with stored positions #1.5 ↑0.5 (as before) yes
Answers, brand cited but never named Cited only, as the panel's legend calls it yes
Answers, brand neither named nor cited Not mentioned yes
No answers — no

Hovering "Not mentioned" or "Cited only" says how many answers it covers, e.g. "Cited in 1 of 1 answer in this period, named in none".

This changes #1003's rule on purpose. "Not mentioned" is the case someone most needs to open, and the button no longer hides it.

How

  • lib/prompt-position-summary.ts adds two helpers, both tested:

    • positionCellKind: average, cited only, not mentioned, or none;
    • opensPositionsPanel: whether the row has answers in the window.

    The page uses both, so the rules have tests.

  • The new strings are in en.json under prompts.positions.

Stacked on #1088. Please review only the commits feat(prompts): open the positions panel for a tracked prompt the brand isn't named in and fix(prompts): say "Cited only" for a prompt cited but never named, and test the panel button. The merge commit brings in #1088.

Related issue

None. Found while checking the Positions column and panel.

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 on a range where some prompt was tracked but the brand wasn't named.
    • Its Positions cell reads "Not mentioned", or "Cited only" if its pages were cited.
    • See is there and opens the panel, with "Not mentioned" per platform and the Improve tab.
  2. A prompt with no answers in the range still reads "—" and has no See.

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 (717 on this branch), and yarn build passes. New tests in lib/prompt-position-summary.test.ts: positionCellKind (all four cases) and opensPositionsPanel.

  • In the browser: with answers added for the check on my dev database (removed afterwards), at 24h:

    • a cited-only prompt read "Cited only";
    • a never-named one read "Not mentioned";
    • both had See;
    • prompts without answers kept "—".

    I checked at 1440px and 1024px, in the light and dark themes.

  • Review: a code review flagged that a cited-only prompt read "Not mentioned", and that the button rule had no test; both are fixed.

🤖 Generated with Claude Code

cihan-gyk and others added 5 commits October 16, 2026 14:33
…s cards

The Prompts table counts answers (Runs), the brand's mentions in them
(Mentions) and its own sources (Citations); the positions panel counted days
and platforms, so none of the table's numbers could be found in it. Each
summary card now also says what the table counts: "37 answers", "In 37 of 37
answers · 108 mentions", "In 27 of 37 answers · 54 citations", on the 24h
view too. The days view the panel was built around stays as it was.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…d isn't named in

The Positions column offered "See" only when the brand had a mention or a
citation, so a prompt that was tracked but never named read "—", like one
with no answers at all, and its panel (where "Not mentioned" and the Improve
tab are) could only be reached through the row's menu. The button now shows
whenever the prompt has answers in the window, and the cell says "Not
mentioned" for such a prompt.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The 24h cards count platforms in their latest run, so their answer lines now
say they cover the whole period; and where the plan locks a platform, whose
answers the panel never reads, a note says the counts cover the included
platforms. The panel gets a test for its cards.

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

# Conflicts:
#	web/messages/en.json
…d test the panel button

A tracked prompt whose pages were cited without the brand being named read
"Not mentioned"; it now reads "Cited only", as the panel's legend calls
that state. Whether a row offers its panel moves into opensPositionsPanel,
next to positionCellKind, so the rule has a test.

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

Copy link
Copy Markdown
Collaborator Author

@gkhngyk this changes a rule from your #1003 on purpose: See now shows for any prompt with answers in the window, and the cell reads "Not mentioned" or "Cited only" instead of "—" for a tracked prompt the brand isn't named in, since that's the prompt someone most needs to open (its panel has the Improve tab). Happy to revert to the old rule if you'd rather keep it. Stacked on #1088.

…entioned

Keeps both sides where ansvisor#1098 added compareLateness next to positionCellKind and opensPositionsPanel.

@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. I merged main into the branch: #1098 had added compareLateness where this PR adds positionCellKind and opensPositionsPanel, so the merge keeps both, and en.json keeps your four strings after #1088's. Against main the diff is only this PR's four files. Web tests pass (842) and CI is green.

@gkhngyk
gkhngyk merged commit 41cf79e into ansvisor:main Oct 16, 2026
5 checks passed
gkhngyk added a commit to cihan-gyk/ansvisor that referenced this pull request Oct 16, 2026
…-tooltip

main now carries ansvisor#1088 and ansvisor#1089 as squashes; their files come from main, and this branch's tooltip changes stay as they were.
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