A dismissed card stays dismissed, even offline

The server already suppressed every span she had accepted or dismissed, on
both the LLM reconcile and the mechanics pass, with tests either side. What
had no memory was the half that never asks it: item 3b's rule pack renders
250 ms after a keystroke with no network, and its record of "she already
answered this" was a set cleared on every document switch and added to only
for cards dismissed while still provisional.

So dismissing a persisted rule-pack card recorded nothing client-side and the
next keystroke put it straight back until the server's reply removed it again;
and after a reload the client knew nothing at all — permanently so with the
server unreachable, which is the case the rule pack exists for.

GET /docs/{id}/settled hands over the normalized originals of the document's
actioned rows, scoped through documents because an original quotes her
sentence. The client seeds a SettledSpans from it on open and adds to it for
every card that leaves, keyed on the original alone the way the server keys
it. The load adds rather than assigns, so a dismissal made while it is in
flight survives it.

normalizeForDedup now exists in both languages, compared across a network
boundary, so the same nine cases are asserted on both sides and each test
names the other.

Also: the status-bar count — "🌸 5片花瓣待打磨 · 5 petals to polish" beside the
word count, from the packs, hidden at zero. An empty rail already says nothing
is waiting; a badge announcing it after every check is a verdict, which the
review's non-goals rule out.

Verified in Chrome at 1517x810 with the server killed: a new violation was
detected, underlined and counted with no network, while the dismissed span
stayed gone.
This commit is contained in:
prosolis
2026-07-28 07:27:49 -07:00
parent 1aa3a14030
commit b2d50e9136
15 changed files with 562 additions and 7 deletions
+6
View File
@@ -327,6 +327,12 @@ export const zh: Pack = {
savedLocally: '已保存在本机 · Kept on this device',
helperRestingNative: '小助手在休息',
helperRestingEn: "· Petal's helper is resting · 文字已保存",
// 片 is the measure word for petals; a digit reads perfectly naturally in
// Chinese and spares every pack a numeral table.
petalsToPolish: (n) => ({
native: `${n}片花瓣待打磨`,
en: `${n} ${n === 1 ? 'petal' : 'petals'} to polish`,
}),
soundsOn: '声音开 · Sounds on',
soundsOff: '声音关 · Sounds off',
petalsOn: '花瓣开 · Petals on',