feat(frontend): render the not-advice caveat on model output surfaces - #3
Closed
OmerHarmankayaC wants to merge 1 commit into
Closed
OmerHarmankayaC wants to merge 1 commit into
OmerHarmankayaC wants to merge 1 commit into
Conversation
The prompts already instruct the model to describe its own answers as research commentary — prompts/chat/system.md, prompts/analysis/stage2_report.md and prompts/news/system_sentiment.md each carry the line. An instruction is not a guarantee: a model that omits it, or a fallback provider that phrases it away, leaves the screen with no caveat at all. Before this change the only caveat the client rendered unconditionally was the provenance footer on the ownership board. ModelOutputNotice renders it from the client, independent of what the model chose to say, and attaches to the three surfaces that carry model output: the analysis report, the news verdict panel and the chat composer. Its styling follows the footer already in OwnershipPage rather than introducing a new one. Deliberately not a band in ClientShell. That shell is a fixed-height, non-scrolling layout, so a permanent row would cost height on all thirteen routes — including the heatmap and the live feed, which render no model output to caveat. The landing footer carries no model output either, so it gets a product-level line rather than the same component.
2 tasks
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.
What changed
Adds
components/ui/ModelOutputNotice, a one-line caveat rendered by theclient, and attaches it to the three surfaces that carry model output:
analysis/ReportViewOraclePanel(news verdict)OracleChatPagelanding/LandingFootergets a product-level line instead — it renders no modeloutput of its own, so the same sentence would not fit.
Why
The prompts already instruct the model to describe its own answers as research
commentary.
prompts/chat/system.md,prompts/analysis/stage2_report.mdandprompts/news/system_sentiment.mdeach carry the line, andstage2_report.md:114is explicit:An instruction is not a guarantee. The three reports committed at
backend/data/analysis_reports.jsonare the evidence — two of the three donot contain it:
dailyweeklymonthlySo on a stored
dailyreport the screen today carries no caveat at all. Afallback provider, a shorter model, or a truncated response reproduces that
outcome anywhere the chain runs. Rendering the line from the client makes it
independent of what the model chose to say.
Before this change the only unconditional caveat in the client was the
provenance footer on the ownership board (
OwnershipPage.tsx:203). This followsthat footer's styling rather than introducing a second visual language for the
same idea.
Why not a band in
ClientShellThat was the first thing I tried.
ClientShellwraps its children in<main className="flex-1 min-h-0 overflow-hidden">— a fixed-height,non-scrolling shell where each route owns its own scroll. A permanent row there
costs height on all thirteen routes, including
/heatmapand/live, whichrender no model output to caveat. Attaching per surface keeps the cost where the
output is.
Verification
All four gates run locally, against Node 22:
npm run lintno-img-elementwarnings in files this PR does not touchnpm run typechecknpm testnpm run buildRendering checked by hand against a running stack (backend on a local port,
USE_AI=false, no LLM provider configured):dailyreport; the notice rendersunder the Risk Disclosures section. This is the case the table above
describes, so it is also the before/after: that report ends without a caveat
of its own.
a response, so it is present before the first message and with no provider
reachable.
The news verdict panel (
OraclePanel) is the one surface I could not exercise:it needs a completed news analysis, which needs a reachable LLM provider. The
placement there mirrors the report's and is a static child of the same
always-rendered block as the coverage line.
No environment variable is added or changed. No API surface is touched.