hyperhive/frontend/packages
Repository files (latest commit first)
Filename Latest commit message Latest commit date
iris b15d7a4b5d perf(dashboard): keyed question row cache — preserve textarea + checkbox state across re-renders
renderQuestions() was calling root.replaceChildren() on every
question_added / question_resolved SSE event, wiping all <li>
elements including any textarea the operator was typing into.

Add questionRowCache (Map<id, {el, fingerprint}>):
- questionRowFingerprint encodes the static fields that determine
  the <li> DOM structure (asker, target, asked_at, deadline_at,
  question text, options, multi)
- buildQuestionLi extracts the <li>-building code so it can be
  called only when the fingerprint changes
- renderQuestions reuses cached <li> nodes for unchanged questions
  and evicts entries for resolved/cancelled questions

Effect: when a new question arrives while the operator is typing a
reply, the existing <li> is reused — the textarea value, radio
selection, and checkbox state are all preserved.

The history <details> open state is also saved before and restored
after the replaceChildren call, so the answered-history panel does
not collapse when a live question event fires.
2026-06-05 13:46:02 +02:00
..
agent feat(agent): model quick-picker in overflow menu 2026-06-05 13:14:17 +02:00
dashboard perf(dashboard): keyed question row cache — preserve textarea + checkbox state across re-renders 2026-06-05 13:46:02 +02:00
shared fix(#1249): break sticky-bottom lock when user scrolls up during snap animation 2026-06-04 20:10:37 +02:00