ui: log page tone badge follows the toggle (novice / pro)
The Strategic Log Archive panel header used to show two engineery
badges sourced from server config:
new logs use: tone intermediate analysis speculative
Both were misleading:
- The tone badge described the SERVER's generator setting, not the
user's reading preference — confusingly disconnected from the
Novice | Pro toggle in the topbar that actually controls what AI
panels render.
- The analysis flag is always SPECULATIVE in production, so the badge
carried no information.
Drop the "new logs use:" prefix and the analysis badge. The tone badge
now mirrors the user's toggle: NOVICE → "novice", INTERMEDIATE → "pro"
(same data values; just the display label flips, matching the header
relabel from 3e1a14f).
Wiring lives in base.html: a new cassandraSyncToneBadge(tone) helper
updates the #tone-badge element when present. Called from
DOMContentLoaded (so the initial badge picks up the localStorage tone)
and from cassandraSetTone (so toggling the header updates the badge
live, without a page refresh).
current_tone / current_analysis are removed from _log_page_context —
log.html was the only consumer and neither key is referenced now.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
259146ecdc
commit
6c4c711830
3 changed files with 23 additions and 6 deletions
|
|
@ -77,12 +77,9 @@ async def _resolve_log_date(session: AsyncSession, day: str | None) -> date:
|
|||
|
||||
|
||||
def _log_page_context(target: date, paid: bool, user_lang: str = "en") -> dict:
|
||||
s = get_settings()
|
||||
return {
|
||||
"selected_iso": target.isoformat(),
|
||||
"selected_month": target.strftime("%Y-%m"),
|
||||
"current_tone": s.CASSANDRA_TONE.upper(),
|
||||
"current_analysis": s.CASSANDRA_ANALYSIS.upper(),
|
||||
"paid": paid,
|
||||
"user_lang": user_lang,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue