ui: flip tone relabel — "Pro" now maps to INTERMEDIATE, not NOVICE

Reverses the polarity of 71155a6 to match the actual semantics:

- "Novice" stays labelled "Novice" → glossary tooltips, plainer prose.
- "Intermediate" is relabelled "Pro" → terse, assumes fluency, no
  hand-holding. This is the mode an expert reader wants, so the "Pro"
  badge actually fits.

Backend tone values (NOVICE, INTERMEDIATE) are unchanged — no API,
prompt, or stored-preference impact. Only the display strings flip.

Also drops the .tone-toggle button min-width: 10em override added in
71155a6. With "Intermediate" gone from the visible label, the longest
remaining label is "Novice" (6 chars), which fits the shared 5.5em
just like the theme and language toggles.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Giorgio Gilestro 2026-05-29 11:23:52 +02:00
parent 71155a67be
commit 3e1a14f334
3 changed files with 9 additions and 13 deletions

View file

@ -157,11 +157,6 @@ body.drawer-open .drawer-backdrop { opacity: 1; }
.tone-toggle button + button, .tone-toggle button + button,
.theme-toggle button + button, .theme-toggle button + button,
.lang-toggle button + button { border-left: 1px solid var(--border); } .lang-toggle button + button { border-left: 1px solid var(--border); }
/* The tone-toggle's longer option ("Intermediate", 12 chars) needs more
room than the shared 5.5em min-width. We size both buttons to fit the
longest one so the popup width (set by container width via left/right:0)
doesn't get clipped when only the short "Pro" label is active. */
.tone-toggle button { min-width: 10em; }
.tone-toggle button:hover, .tone-toggle button:hover,
.theme-toggle button:hover, .theme-toggle button:hover,
.lang-toggle button:hover { color: var(--accent); } .lang-toggle button:hover { color: var(--accent); }

View file

@ -234,16 +234,17 @@
<a href="/log" class="{% if request.url.path.startswith('/log') %}active{% endif %}">Log</a> <a href="/log" class="{% if request.url.path.startswith('/log') %}active{% endif %}">Log</a>
</nav> </nav>
<div class="header-right"> <div class="header-right">
{# The "Pro" label maps to the NOVICE tone server-side — kept that {# The "Pro" label maps to the INTERMEDIATE tone server-side —
way to avoid touching every stored user preference and API kept that way to avoid touching every stored user preference
contract. The mode itself (glossary tooltips + plainer and API contract. The mode itself (terse, no glossary
framing) is unchanged; only the display label changes. #} tooltips, assumes fluency) is unchanged; only the display
label changes. #}
<div id="tone-toggle" class="tone-toggle" data-tone="INTERMEDIATE" <div id="tone-toggle" class="tone-toggle" data-tone="INTERMEDIATE"
role="group" aria-label="Explanation level"> role="group" aria-label="Explanation level">
<button type="button" data-value="NOVICE" <button type="button" data-value="NOVICE"
onclick="cassandraSetTone('NOVICE')">Pro</button> onclick="cassandraSetTone('NOVICE')">Novice</button>
<button type="button" data-value="INTERMEDIATE" <button type="button" data-value="INTERMEDIATE"
onclick="cassandraSetTone('INTERMEDIATE')">Intermediate</button> onclick="cassandraSetTone('INTERMEDIATE')">Pro</button>
</div> </div>
<div id="theme-toggle" class="theme-toggle" data-theme="light" <div id="theme-toggle" class="theme-toggle" data-theme="light"
role="group" aria-label="Theme"> role="group" aria-label="Theme">

View file

@ -185,9 +185,9 @@
<div class="settings-row__value"> <div class="settings-row__value">
<div style="display:flex; gap:14px;"> <div style="display:flex; gap:14px;">
<label><input type="radio" name="digest-tone" value="NOVICE" <label><input type="radio" name="digest-tone" value="NOVICE"
{% if (user.digest_tone or 'INTERMEDIATE') == 'NOVICE' %}checked{% endif %}> Pro</label> {% if (user.digest_tone or 'INTERMEDIATE') == 'NOVICE' %}checked{% endif %}> Novice</label>
<label><input type="radio" name="digest-tone" value="INTERMEDIATE" <label><input type="radio" name="digest-tone" value="INTERMEDIATE"
{% if (user.digest_tone or 'INTERMEDIATE') == 'INTERMEDIATE' %}checked{% endif %}> Intermediate</label> {% if (user.digest_tone or 'INTERMEDIATE') == 'INTERMEDIATE' %}checked{% endif %}> Pro</label>
</div> </div>
</div> </div>
</div> </div>