Spaces:
Running
Running
Fix: red headings, voice-edit badge, and voices persisting across refresh
Browse files- Persist voiceQuote + voiceDesignUsed in the saved persona record. Without them, a
reloaded persona always read as "dirty" so ▶ re-synthesized instead of replaying the
cached file — that's why "voices weren't saved on refresh." Now a saved voice reloads
as current and replays from IndexedDB; only real quote/voice edits mark it stale.
- Section headings: color !important so Gradio's text var can't blacken them (now red).
Verified red = rgb(216,39,26).
- Confirmed: editing the voice design (not just the quote) badges ▶; audio + voice-state
survive a page reload.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- web/personaStore.js +4 -0
- web/shell/persona.css +1 -1
web/personaStore.js
CHANGED
|
@@ -42,6 +42,10 @@ export function savePersona(p) {
|
|
| 42 |
personality: p.personality || '',
|
| 43 |
vibe: p.vibe || '',
|
| 44 |
seed: p.seed || '',
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
createdAt: now,
|
| 46 |
updatedAt: now,
|
| 47 |
}
|
|
|
|
| 42 |
personality: p.personality || '',
|
| 43 |
vibe: p.vibe || '',
|
| 44 |
seed: p.seed || '',
|
| 45 |
+
// What the cached voice file (IndexedDB) was made for — so after a refresh we know
|
| 46 |
+
// the audio is current (replay it) vs stale (re-make it), instead of always re-synthing.
|
| 47 |
+
voiceQuote: p.voiceQuote || '',
|
| 48 |
+
voiceDesignUsed: p.voiceDesignUsed || '',
|
| 49 |
createdAt: now,
|
| 50 |
updatedAt: now,
|
| 51 |
}
|
web/shell/persona.css
CHANGED
|
@@ -68,7 +68,7 @@
|
|
| 68 |
.persona-sec-title {
|
| 69 |
display: flex; align-items: center; gap: 8px;
|
| 70 |
font-family: var(--p-mono); font-size: 10px; font-weight: 500; letter-spacing: .2em;
|
| 71 |
-
text-transform: uppercase; color: var(--p-transmit);
|
| 72 |
}
|
| 73 |
.persona-sec-title::before { content: ''; height: 2px; width: 18px; background: var(--p-ink); flex-shrink: 0; }
|
| 74 |
.persona-voice-desc {
|
|
|
|
| 68 |
.persona-sec-title {
|
| 69 |
display: flex; align-items: center; gap: 8px;
|
| 70 |
font-family: var(--p-mono); font-size: 10px; font-weight: 500; letter-spacing: .2em;
|
| 71 |
+
text-transform: uppercase; color: var(--p-transmit) !important; /* beat Gradio's text var */
|
| 72 |
}
|
| 73 |
.persona-sec-title::before { content: ''; height: 2px; width: 18px; background: var(--p-ink); flex-shrink: 0; }
|
| 74 |
.persona-voice-desc {
|