Repository navigation
fix(chat): read the page's view: tab, sort, search and the rows on screen - #2463
Merged
Merged
Conversation
Chat beside a page now reads what the page shows (the owner's rule, 2026-11-16; step 5 of the page-data plan, gaps G1 and G2). - Period: a period the message names wins, then the page's date chip, then the person's default. A page on All time reads all time. On a page with its own dates the range card isn't shown and nothing is kept as the default; the composer hides the person's range chip beside the page's. A read with a period input (Ads) takes the range when it is one of its periods. - Filters (lib/chat/page-scope.ts, from scopeRead): platform, region and topic fill the reads of the page's brand that take them; a list's own filters (status, category, impact, type, Sources, prompt) only the read of that page's list. Values are checked against each input's schema; a chip no read takes the same way stays text. The model's own input wins, "" reads all, and a question that asks for all of a filter drops that chip. A page of another brand than the run's keeps its filters as words only. - Rules: the reader is told the page's dates and filters apply; each read's scope has from_page, and the writer says once what the answer covers, as on the page, never row counts. - Help: Chat answers for the page's dates and filters unless you ask otherwise. - Eval: citations-page-scope (24 hours, ChatGPT, Brand sources). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
The owner's decisions on ansvisor#2459 (16 Nov): - Citations: the domain and page lists follow the page's Sources, as its table does, and the citations and their average per answer count every source, as its cards do. When list_citations took Sources from the page, the engine runs the same read over every source beside it (one row, same filters and window) and puts its totals next to the filtered lists as all_sources_totals (lib/chat/citation-totals.ts). The person's own Sources read once, as before. The writer says counts are for all sources and lists for the chosen Sources. No change to lib/mcp or the read's registry row. - Ads: get_ads_opportunities takes the page's period only on Ads, and a period the message names anywhere; elsewhere it reads its own 30 days, never the person's default or another page's range (ScopeFacts.rangeFrom: message, page or default). - Lookups by domains or urls take no page filter, as codes and ids. - Help: Ads' Chat line says the period it reads. - Eval: the Citations scenario checks the answer says its scope. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
Stacks step 7 on both open Chat PRs (ansvisor#2459 page period and filters, ansvisor#2460 lookups by name). Their eval scenarios, eval data, eval tests and Chat help keywords are kept as a union; approved-articles.json is regenerated. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
Step 7 of the "Chat must read everything a page shows" plan: Chat's
numbers and "top" lists equal the screen's.
- Counts past 1,000 answers: the citations scan, the visibility
summary's raw window and a product's appearances read the window a
page at a time, newest first, up to 50,000 answers (answer-pages.ts).
Past that the note says what the counts cover, never a row count.
- Last 24 hours as the page reads it: on Overview and Citations reads,
the latest completed tracking run's days (the pages' own
getTrackingWindow, with the service role after brandAllowed); the
rolling 24 hours before a first run. Prompts and AI Traffic read a
preset as the last N x 24 hours, as their pages do (page-periods.ts).
- Prompts: get_prompt_performance gives each prompt's AI Visibility
Score and Coverage, as the Prompts table (the page's own read, or the
same sums over a platform's answers) and ranks by it by default;
avg_visibility stays, sorted by "answer_score", and is labelled.
- The page's default order: Actions can read every status, most
recently updated first (the list's tie-break too); Content
Opportunities take the page's Sort (newest, score, oldest). The
models get the page's order beside <page_context>; "what should I do
first" keeps priority, and the writer says which order a list is in.
- explain_change compares the run's period (the page's, else the
person's range) with the days before it, as the pages compare a
change, to yesterday; Last 24 hours keeps its 7 against 7.
- get_visibility_trend returns every day of its period, compact, within
its share of the run.
- Help: "Numbers that match the page"; "Why a number changed" says its
new default. approved-articles.json regenerated.
- Eval: prompts-page-top ("What are my top 5 prompts?" on Prompts).
No migration. MCP output is unchanged but for additive fields.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
The side panel now sends what the page shows beyond its chips: the open tab, the sort and search picked, the rows on screen by the code or id the page shows, the list's total, and the page's own URL state (whitelisted per page). The engine checks it again (cut, never refused), keeps it on the message, and gives it to both models in an untrusted page_view block with the rule to read those rows by their refs before saying anything. The page's chosen sort replaces its default in the order line, and a search goes into the read's search input. send() in chat-thread-view.tsx posts the view, with the owner's permission for this plan. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
The page's search (from its view) now fills `search` on the reads of the page's own list that take one, as ansvisor#2459 fills its list filters: as ansvisor#2460's capped lookup words, never over the model's own search, ids or codes, not for another brand's page, and dropped when the question asks for all. The read's scope names it (from_page.search) and the writer says it. In the models' page_view block every row and ref stay, each label cut to 80 characters; the stored view's cap is now a safety net that every 100-row view fits under. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
When Sources came from the Citations page, the engine ran list_citations twice in parallel: the filtered read and the same read over every source (limit 1) for the cards' totals. Limit 1 didn't shrink the work, so every such question scanned the window's answers twice. The read now counts every source's citations in the same pass that builds the Sources-filtered domain and page lists, and returns them as all_sources_totals when the engine asks (ChatToolContext.allSourcesTotals): one read, one scan. The writer's rule and the result's shape stay as they were. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
The maintainer's review: readAnswerPages paged prompt_results by offset, four pages at once up to 50,000 rows of jsonb, under the visibility summary (also the external MCP tool), the citations reads, product visibility and the prompt scores. It is gone. - Citations (list_citations and the domain/page lookups): over whole UTC days the domains, citations and answers come from the Citations page's own daily rollups (00118: citations_domains_daily and citations_window_stats_daily). They are security invoker over the rollup tables, so the service role runs them after the brand check, by brand. Every source's totals come from the same rows. The pages and the prompts citing them have no aggregate the service role may run (citations_urls_daily and citation_url_occurrences refuse it), so they come from one bounded request of the newest answers, never paged; the result says what that covers when the window holds more. - Visibility summary inside a day: the raw aggregates the page reads (competitor_aggregates, ai_visibility_aggregates, visible_prompt_stats, tracked_prompt_count), no answer rows. Whole days keep the rollups. The MCP output keeps its shape. - Product visibility: the Products page reads cards itself, so one bounded request with an exact count: every appearance counted, the breakdowns of the newest read, said when cut. - Prompt scores: always the Prompts page's prompt_visibility_summaries. It takes no platform, and the page counts every platform's answers, so the plan's platforms no longer send Starter to a raw read. - Visibility order: the Prompts table's own comparator, a prompt with no score counted as 0, an unscored one last. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
This was referenced Nov 16, 2026
gkhngyk
requested changes
Nov 17, 2026
gkhngyk
left a comment
Contributor
There was a problem hiding this comment.
- With the page's search, list_content_opportunities (~read-tools.ts:993) and list_prompts (~331) switch to the lookup path, which drops the page's other filters (status, archived, topic, is_active, impact/type) and its sort, while scopeForModel still reports them as taken, so Chat says 'as on the page' over rows the page doesn't show. Apply the filters and sort in the search branch, or don't report them. 2) On /dashboard/prompts (the default Prompts view) the search is never applied: pageFilterInputs needs tool.route === page.route and list_prompts.route is /dashboard/prompts/tracked, but page-order.ts tells the model the app applied it.
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
…-same-maths-as-pages Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
…-page-view Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
This was referenced Nov 17, 2026
The page's own-list filters (and, above, its search) reach a read only when the read's route is the page's. The Prompts area's base path opens on Tracked Prompts (next.config.ts redirects it there), but it never matched list_prompts' /dashboard/prompts/tracked. One alias map in page-route.ts (pageRoute, samePage) now decides it for the page's filters (page-scope.ts) and its period (scope.ts). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
…-same-maths-as-pages list_content_opportunities' description keeps both sides: the Content page's sorts and main's pointer to get_content_opportunity. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
getVisibilitySummaryFor read the raw competitor_aggregates whenever a window started or ended inside a day: on the busiest brand 13 s for 7 days and past 120 s for 90, which external MCP calls with timestamps reach. Now a window of at most about a day (25 hours of answers, up to now) is still read to the minute from the raw aggregates; a longer one is read over the whole UTC days it touches from the daily rollups, and the result says so (roundedToDays and a note). A bound that isn't a day or a time is refused with a clear message before any read. Chat's whole-day windows are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
…-page-view page-scope.ts takes both imports: the lookups' search words and the page-route helper. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
help/chat/chat.md keeps both sides' keywords; approved-articles.json regenerated from the help files. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
get_prompt_locations (from main) is a read of Prompts › Tracked, so the app gives it a preset as that page reads it: the last N × 24 hours up to now (page-periods.ts rollingWindow), as every other Prompts read here. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
…-same-maths-as-pages help/chat/chat.md keeps both sides' keywords; approved-articles.json regenerated from the help files. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
With the page's search, list_prompts and list_content_opportunities went down their lookup path, which reads every status and drops the page's other filters and the sort, while the scope note said they were taken. Now the app sets as_listed with the page's search: the search reads the list as the page lists it (status, impact, type, topic, active state, archived set aside, the read's sort, paged and counted like the list). The model's own search on such a read stays a lookup by name in every status, and then none of the page's filters is filled or said taken. /dashboard/prompts is Tracked Prompts (page-route.ts), so its search reaches list_prompts; the view's URL keys, open item and order use the same helper. The order line says the app applies the page's search, or leaves out a filter's "all", only where pageFilterInputs does. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
…-page-view help/chat/chat.md keeps both sides' keywords; approved-articles.json regenerated from the help files. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
…-same-maths-as-pages Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
…-page-view Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
scope.ts took any search on list_prompts or list_content_opportunities for named rows and dropped the model's limit. The page's search, as listed, reads the list, so it keeps them; ids still name rows. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
gkhngyk
previously approved these changes
Nov 18, 2026
gkhngyk
left a comment
Contributor
There was a problem hiding this comment.
Thanks, both fixed: the page search now reads the list with its filters (as_listed), and /dashboard/prompts maps to the tracked route.
cihan-gyk
dismissed
gkhngyk’s stale review
November 18, 2026 11:26
The merge-base changed after approval.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Review fixes (17 Nov)
1. The page's search now reads the page's rows (review of 17 Nov: with the page's search,
list_promptsandlist_content_opportunitiesused their lookup path. That path dropped the page's status, archived, topic, is_active, impact and type filters and its sort, whilescopeForModelstill said those were taken.)web/src/lib/chat/page-scope.tspageFilterInputs:searchfrom the page's search, it also sets the newas_listedinput (AS_LISTED) on reads whose search is otherwise a lookup.web/src/lib/chat/registry/read-tools.ts,list_promptsandlist_content_opportunities:as_listedinput. With it, the search reads the list rather than the lookup.list_promptsappliestopic_idandis_activeand lists newest first.list_content_opportunitiesappliesstatus,impactandtype, sets archived aside unless asked by status, and keeps the read'ssort.web/src/lib/chat/scope.tsnamesRows: a search withas_listedno longer counts as naming rows, so it keeps the list's page and the model'slimit. Ids still name rows.web/src/lib/mcp/data.ts:promptsPageForandcontentOpportunitiesPageFortakeasListed. It applies the list's filters and sort and matches each search word as an escapedilike, the same way the lookup does. The MCP tools are unchanged.list_mentions,get_action_historyandlist_my_agentsalready apply their search as a filter.list_draftsandlist_reportsget no page search.2.
/dashboard/promptscounts as the Tracked Prompts pageweb/src/lib/chat/page-route.ts(added in fix(chat): read over the page's dates and filters in the side panel #2459, where the route match lives).pageRoute()andsamePage()read one alias map,PROMPTS_BASE → PROMPTS_TRACKEDfromprompts-routes.ts. main'snext.config.tsredirects/dashboard/promptsto/dashboard/prompts/tracked, the home page since feat(prompts): simplify the Prompts page header #2472–feat(nav): analytics before execution; everyone lands on Prompts › Tracked Prompts #2475.page-scope.ts,tool.route === page.route→samePage) and the page's period (scope.ts) use the helper. So do the view's URL keys (page-view.tsviewRoute), its open item (page-view-scope.ts) and its order (page-order.tspageOrderOf). The duplicate'/dashboard/prompts'entries are gone.web/src/lib/chat/page-order.tspageOrderLinetakestakes. The engine (engine.ts) builds it frompageFilterInputs, the same function that fills the reads.help/chat/chat.md: Chat's lists follow the page's search within the page's filters, and an item named on its own is still found in any status.Tests
web/src/lib/chat/page-search.test.ts(new) runs scopeRead and then the read on a fake database:tookis['type','impact','status','search'].as_listed, the chips apply./dashboard/promptsand on/dashboard/prompts/trackedreturns only active prompts of the topic, newest first, and reports['search']. A named lookup still finds a paused prompt.takes. A filter's "all" follows what the app fills.web/src/lib/chat/page-scope.test.ts:as_listedon both Prompts routes and on Content. The model's lookup takes no page filters. Mentions keeps its filters beside a model search.web/src/lib/chat/scope.test.ts: a search withas_listeddoesn't name rows, and one with ids still does.web/src/lib/chat/page-order.test.ts: the claim on/dashboard/promptsand/dashboard/prompts/tracked, and no claim whentakessays none.web/src/lib/chat/page-route.test.ts(in fix(chat): read over the page's dates and filters in the side panel #2459): both routes, the other Prompts views, prototype keys.Summary
Step 8 of the "Chat must read everything a page shows" plan (owner, 16 Nov): the page's view reaches Chat (audit gap G7).
Until now the side panel sent the page's path and its chips only. The sort and search the person picked, the open tab, an open drawer (
?action=<id>), the address on/citations/url?u=…and the rows on screen never reached Chat. So "what are these?", "the first ones" after a sort, or "how are these doing?" after a search were answered from a list read in the read's own order, which can be other rows.Now each message from the panel carries the page's view: its tab, sort, search, the rows on screen (by the code the page shows, else the id, domain or address, with their title) and the list's total, plus the page's own URL state, whitelisted per page. The engine checks it again, gives it to both models as untrusted data, and tells the reader to read those rows by their refs before saying anything about them. The page's chosen sort replaces its default in the order line, mapped to the read's
sortinput where one exists. The page's search is applied by the server to the reads of that page's own list, as #2459 applies its list filters, and the answer says it ("matching "skip a month", as on the page").This needs one change in
chat-thread-view.tsx(send()posts the view), which the owner allowed for this plan ("chat-thread-view izni var"). It is 7 lines, below.Changes
ChatPageContext.view(new plain modulelib/chat/page-view.ts):tab,sort({ key, dir }, the page's own sort name),search,rows({ ref, label }, at most 100, labels cut to 200 characters on one line),total,query.viewRows()builds the rows from what the page already holds; nothing is read again.useChatPageContext(table in "Page by page"). Where a table keeps its own state (Prompts › Tracked, the Mentions table, Ads › Opportunities), it hands its part up with anonChatViewcallback. No rows or total while a list is still loading.ChatSidePaneladds the page's query toview.query, read as the message goes (so a URL written 300 ms after a change is current). Only the keys each page writes withwriteUrlParamsor reads as its state (PAGE_QUERY_KEYS), at most 20, each value on one line and cut to 300 characters. Everything else is dropped:token,code,next,utm_*, unknown keys. The query is never appended to the route, sooriginPageis untouched. No view goes once the person takes the page chip off with ×, or on a Retry from another page.chat-thread-view.tsx(owner's exception for this plan): apageViewprop, andsend()posts its result besiderouteandchips:lib/chat/page-view-scope.ts):startRunFieldstakescontext.viewwith zod, field by field. A field that isn't what a page sends is dropped, never refused: a tab or sort key must be a word,dirasc or desc,totala non-negative integer. A row needs a ref that is an app code (AC-12,S-07), an id, a domain or a page address (≤ 298 characters); others are dropped. Labels are kept up to 200 characters with the samepageTexthelper test(chat): evals fail any "couldn't read" answer #2450 uses for chip labels (moved here fromengine.ts, which re-exportsPAGE_LABEL_CHARS). Search is cut to 200. Rows past 100 are cut. The whole view has a 60,000-character safety net that every valid 100-row view fits under; only text that escapes long in JSON can reach it, and then the last rows go first.querykeeps only the keys of the page the message names. A malformed view leaves the message as it was.messageScopeOf()keeps it on the message (context_json.context.view). Posted from another brand's page, it keeps only its tab and sort: no search, rows, URL state or total, as fix(chat): read over the page's dates and filters in the side panel #2459 drops filter values.turnMessage()takes the view out of<page_context>and adds a compact<page_view>block after it, inside<untrusted_data source="page_view">:tab:,sort:,search:,total:,open:(an item the URL holds open),url state:, then oneref — labelline per row, no repeated keys. Every row and every ref stay; each label is cut to 80 characters in the block, with the same cut helper (cutText, never half a character or emoji) and…. The reads by ref give the whole record. Hidden text is stripped, block tags inside a label are neutralized (page_viewjoinsDATA_TAGS), and a label that reads like an instruction to an AI is shown as[label not shown: read it by its ref].list_action_center_taskscodes, S- codes →list_signalscodes, ids → the read's ids orprompt_ids,get_action,get_mention, domains and addresses →list_citations), up to 10 a read, the next 10 in the next. For more than 30, read the page's list in its order. "This one" is the item the page holds open (?action=,?opportunity=,?positions=,?u=), read with its own read. The writer names rows from what the reads returned, never says how many rows were read or sent, and gives a count only as the page's total.page-scope.ts, the same rule as fix(chat): read over the page's dates and filters in the side panel #2459's list filters):pageScopeOf()takes the search from the message's view;pageFilterInputs()fillssearchon the reads of the page's own list (the tool's route is the page's route) that take one:list_promptson Prompts › Tracked,list_content_opportunitieson Content, and on Mentions every one of its reads that takes a search (list_mentions,get_mentions_summary,get_mention_competitors,get_mentions_perception), as the page's search filters all its tabs. Library and Reports send no search yet; their reads would take it the same way.searchWords: at most 8 words of the first 200 characters,*and edge punctuation dropped), and the read escapes them as it does any search.search(even""),ids,codes,domainsorurls; never on another brand's read or without the brand chip; dropped when the question asks for all ("all prompts", "every opportunity", "tüm promptlar", "without the search").from_pageis now{ took: [...], search }(tooklists the period and filter keys as before, plussearch). The writer rule says to name it: "matching "skip a month", as on the page". The reader's rule says the app applies the page's filters and search.page-order.ts). With a sort in the view, the order line uses it instead of the page default:sort "updated"/"priority". Lowest first, oldest first and Due date have no read order, so they stay words and the rows are read by their refs.sort.sort_byandorder. Position, volume, runs, added and last run stay words.list_mentions'sort.list_prompts(thenget_prompt_performancewith their ids),list_content_opportunitiesorlist_mentionsunless the model gives its own. Actions' read has no search, so its rows are read by code. The search text itself stays in the untrusted block.approved-articles.jsonregenerated withyarn vitest run -u src/lib/help.testing/agent-eval.ts): scenarios can carry the page'sview, apageSearchthe list read must take, andpageRowsthe answer must name. Two new scenarios:actions-page-view: Actions sorted by Priority Score, filtered to New, 3 rows on screen; "What are these?" must read AC-41, AC-42 and AC-44 by their codes, name each by title and code, and name no other action.prompts-page-search: Prompts › Tracked searched for "coffee subscription"; "How are these doing?" must readlist_promptswith that search, say the search, and name each prompt it shows. On the scripted model the run callslist_promptswith no search, the server fills it, and the writer seesfrom_page: { took: ["search"], search: "coffee subscription" }.Page by page
list_content_opportunities)list_prompts)list_mentions,get_mentions_summary,get_mention_competitors,get_mentions_perception)ADS_ENABLED)Safety
<untrusted_data source="page_view">. The one input filled from it is the page's search, on the page's own list, the way fix(chat): read over the page's dates and filters in the side panel #2459 fills the page's list filters from its chips: after the read's brand check, as fix(chat): look up any listed item by its code, id, words or address #2460's capped lookup words, escaped by the read, never over the model's own inputs, and not for another brand's page.brandAllowed, filters bybrand_idand joins the organization, so a ref from another brand finds nothing.next=and unknown keys never leave the browser and are dropped if posted.'use server'file changed.page-pane.tsx,page-open.ts, the content editor folder and Action Center site-type files are untouched.How to test
contexthas noview).?token=abc&next=/xto a page's URL and send a message.context.view.queryhas neither.cd web && SKILL_EVAL=actions-page-view yarn vitest run src/lib/chat/agent-eval.test.ts, andSKILL_EVAL=prompts-page-search.Checks
npx tsc --noEmit -p .passes.src/lib/chat(all),src/lib/mcp,src/components/chat,src/app/api/chat,src/app/api/mcp, the 8 pages' tests (Actions, Content, Prompts, AI Traffic, Mentions, Citations, Overview, Ads),src/lib/action-center,src/lib/help,src/i18n,use-server-exportsandsubscription-guard-coverage: 448 files, 5,870 tests, all pass (1 skipped: the real-model eval). Run again after the review merge.page-view.test.ts: rows capped at 100 and labels cut on one line (no half emoji); the URL whitelist keeps the page's keys only (token,code,next,access_token,utm_sourcedropped), values cut to 300; the panel puts the URL's state in place of any the page set.page-view-scope.test.ts(throughstartRunInput): what a page sends is kept; over-limit rows, labels and search are cut and bad tabs, sorts, totals, refs and queries dropped, never refusing the message; the query is whitelisted by the message's route; 100 rows of the longest refs and labels are all kept, and the 60,000-character safety net cuts only text that escapes long, last rows first; ref kinds; another brand's view keeps its tab and sort only. The block: compactref — labellines in<untrusted_data source="page_view">, each label cut to 80 (never half an emoji), the 9,129- and 42,391-character sizes pinned, an instruction-like label withheld, tags neutralized, the open item only for its page and ref kind; the reader and writer rules.page-order.test.ts: the chosen sort beats the default and maps tosort/sort_by+order; unmapped and unknown sorts stay words and point to the refs; the line says the app applies the search tolist_prompts,list_content_opportunities,list_mentions, and its text stays out of the line.page-scope.test.ts(as fix(chat): read over the page's dates and filters in the side panel #2459's filter tests): the search comes from the view; it fillssearchon the page's own list only (Prompts'list_prompts, Content's list beside its status filter, all of Mentions' reads), not on another page's list, a read without one, or Actions; fix(chat): look up any listed item by its code, id, words or address #2460's words (8 at most, 200 characters, no wildcard); never over the model's ownsearch(or"") orids, nor for "all prompts", "Tüm promptlar", "every prompt", "without the search"; none for another brand or without the brand chip.engine.test.ts:from_pageas{ took: [...] }in fix(chat): read over the page's dates and filters in the side panel #2459's three filter tests.engine.test.ts: the view is kept on the message with its whitelisted query, reaches both models in its untrusted block, is gone from<page_context>, and the chosen sort drives the order line.chat-thread-view.test.tsx:send()postscontext.viewfrom the page onroute, read only as the message goes.chat-panel.test.tsx: the panel's getter adds the URL's whitelisted keys (current at send time), none on a Retry from another page or with the page chip off.trafficChatView).actions-page-viewandprompts-page-searchon the scripted model, each with a passing run and a failing one ("these" from a list read; a read without the page's search). In the passingprompts-page-searchrun the model callslist_promptswith no search: the server applies "coffee subscription",get_prompt_performanceby ids takes none, the writer seesfrom_page: { took: ["search"], search: "coffee subscription" }, and the new must check "says the page's search" passes. The grading helpers.citations/page.tsx:1314(the export'suseCallbackdeps) andengine.test.ts:255–256.git merge-tree --write-tree upstream/main HEAD(0044e8fea): clean at9dc1a518a.'use server'file change.page-pane.tsx,page-open.ts, the content editor folder and Action Center site-type files are untouched.ChatThreadViewandActionTable; the header is the panel's, drawn by hand.Not in this PR
uon/citations/url), and they can pass rows with oneuseChatPageContextcall each.get_prompt_performance'sprompt_ids.Choices made
Made in review to match the screen and keep the prompt small; the owner can change any of them:
domainsandurlslookups of fix(chat): look up any listed item by its code, id, words or address #2460 take them). Domains and http(s) addresses up to 298 characters are accepted; anything else is dropped.search, as fix(chat): look up any listed item by its code, id, words or address #2460's capped and escaped lookup words, never over the model's ownsearch,idsorcodes, dropped when the question asks for all, and named in the read'sscope.from_page.searchso the answer says it.🤖 Generated with Claude Code
https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9