GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat(dashboard): cards that respond — Datastar shell, render-time action state, quick actions, comments (epic #1442) by dezren39 · Pull Request #1470 · developing-today/code Conversation
|
| page | before | after |
|---|---|---|
/ |
TTFB ~1.16 s, 1,887,577 B in one block | shell TTFB ~0.0016 s, 23,001 B; board fragment streams behind it (TTFB 1.41 s — the projector fan-out, unchanged) |
/attention |
TTFB ~0.039 s, 2,119,654 B in one block | shell TTFB ~0.0009 s, 25,836 B; queues fragment TTFB 0.081 s, sessions 0.065 s |
/today |
TTFB ~0.83 s, 31,324 B | shell TTFB ~0.0009 s, 18,996 B; fragment behind it |
serve path / |
TTFB 3.26 s / total 11.1 s | shell complete at 1.53 s (TTFB 1.22 s) |
serve path /attention |
TTFB 2.81 s / total 10.3 s | shell complete at 1.30 s (TTFB 1.16 s) |
Honest trade: total content bytes grew (queues fragment 2.31 MB) because cards now carry their detail, action history, and comment threads inline — but it streams progressively behind a ~1 ms shell instead of arriving as one monolith after a multi-second blank wait, and the header fragment (counts, banner) lands first.
294 pass / 0 fail (baseline 273). Two boot assertions moved to the fragment endpoints they now describe; one #1291 survey test updated to the #1451 partial-answer contract; a new dashboard-overhaul suite (21 tests) covers the derivation, strips, quick bar, detail, comment box, partial surveys, and ordering. tsc --noEmit clean. E2E smoke against a temp store (fixtures): snooze → card leaves the queues for the strip; restore → strip clears; mark-done → hidden strip; set-needs-order → re-renders as saved.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…me card state (#1449/#1450/#1451/#1456) - actions: triage gains mark-done (one-tap Already done) and restore (must name the superseded suppressor); preference gains set-needs-order (urgency|newest|oldest|deadline). - card-state.ts: the render-time effective-state derivation — a pending snooze/dismiss/mark-done suppresses exactly like an applied one, a consumer rejection lifts it, a restore cancels even an applied suppressor, survey answers merge per question. - tier-items: effectiveNeedsOrder mirrors effectiveStandingAuto; answers[] submits may be partial (#1451) — membership/value checks stay, required-coverage rejection goes. - comments: byObject() grouping for per-card comment boxes.
…tions, detail, comments, order (#1443/#1445/#1446/#1449/#1450/#1451/#1456) - Cards reflect the store at render: pending state disables the matching control, acknowledged cards render quiet, and suppressed cards leave their list immediately for the Snoozed strip or the new Dismissed/done strip — both with Unsnooze/Restore, including refs no longer published at all. - Quick-action bar: Already done, Dismiss reason chips, and (on Needs User cards) de-escalate chips with Dres preset whys; proposal buttons now read I accept your proposal / No — make another. - Titles link to their GitHub issue; every card expands inline to source/state/since/last-seen/horizon/blocked-by/question payload plus the full action history. - Per-card comment box: message for the orchestrator + an optional also-post-publicly GitHub comment (gh: refs only); existing comments show queued/posted state. - Surveys prefill merged answers and mark still-needed questions. - Needs-you order control (preference-backed) re-sorts at render. - Post-submit, forms patch in place (sent · pending, tombstone for suppressing verbs) and dispatch a fragment refresh; attention splits into header/queues/sessions section builders.
…ests (#1444) - /, /today, /attention serve a light shell (headings + nav paint immediately) and stream their heavy sections from /frag/board, /frag/today, /frag/attention/{header,queues,sessions} as datastar-patch-elements SSE; ?full=1 keeps the full server render (the no-JS path, via noscript meta refresh). - Datastar v1.0.0 vendored at src/assets/datastar.js, served at /assets/datastar.js — no runtime CDN, and no service worker is registered on this origin (/sw.js kill switch untouched). - boot tests assert against shell + fragments; new dashboard-overhaul suite covers the derivation, suppression strips, quick bar, detail, comment box, partial surveys, order. Suite: 294 pass (was 273).
There was an error while loading. Please reload this page.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 45 seconds. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: beb82bc66a
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| * shell's placeholder and the fragment payload share this shape, so | ||
| * a refresh re-patches the container with itself (attrs included). */ | ||
| export function attentionFragment(section: "header" | "queues" | "sessions", innerHtml: string): string { | ||
| return `<div id="attn-${section}" data-frag data-on-load="@get('/frag/attention/${section}')" data-on-dashrefresh__window="@get('/frag/attention/${section}')">${innerHtml}</div>`; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Initialize fragment requests with the supported Datastar hook
On a normal JavaScript-enabled visit, these containers never request their fragments: the vendored Datastar v1.0.0 implements data-on-load as an ordinary load event listener, but a <div> does not emit that event. Its initialization hook is data-init. Consequently, /attention stays on its loading placeholders indefinitely; the same attribute also leaves / and /today empty, and the <noscript> fallback does not help JavaScript-enabled browsers. Use the supported initialization hook for the shell placeholders.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| export function cancelledActionIds(actions: DashAction[]): Set<string> { | ||
| const out = new Set<string>(); | ||
| for (const a of actions) { | ||
| if (a.verb === "restore" && a.state !== "superseded" && a.supersedes) out.add(a.supersedes); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Exclude rejected restores from suppressor cancellation
If the consumer rejects a restore of an already-applied dismiss or mark-done action, this condition still cancels the original suppressor because it excludes only superseded restores. The card therefore remains restored in the UI despite the rejected operation; if the publisher has already omitted the item, it instead disappears from the hidden strip entirely, removing the restore control. Only pending or applied restores should cancel the suppressor so a rejected undo preserves the effective dismissal.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| const dismiss = latestInFamily(eff, "dismiss"); | ||
| if (dismiss && dismiss.state !== "rejected") suppressors.push({ kind: "dismissed", action: dismiss }); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Allow dismissed items to resurface when new material facts arrive
When the orchestrator republishes a dismissed item under the same object ref with a new material fact, the historical applied dismiss still suppresses it indefinitely. The existing dismissal contract in needsUserFormsHtml explicitly promises that such items resurface with the fact cited, but this derivation receives only action history and never considers the newly published item's state. Rendering a fresh same-ref item with a new since and reason still produces Needs User (0) and omits the new reason. Reconcile applied dismissals with the publisher's resurfacing state rather than requiring a manual restore for every future escalation.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| act?.identities && act.commentOpts | ||
| ? cardCommentHtml(objectRef, undefined, act.commentsByObject?.get(objectRef), act.commentOpts) | ||
| : ""; | ||
| return `<div class="card${cs.acked ? " acked" : ""}" id="${cardDomId(objectRef)}"><strong><a href="/sessions#${encodeURIComponent(e.sessionId)}">${esc(e.title ?? e.sessionId)}</a></strong> <span class="badge src">${esc(src)}</span> <span class="badge ${esc(e.state)}">${esc(STATE_LABELS[e.state])}</span>${tierBadge}${sub}${cmt}${badges}<br><span class="muted">${esc(e.sessionId)} · ${esc(e.directory ?? "—")}${e.branch ? ` · ${esc(e.branch)}` : ""} · ${esc(e.model ?? "—")}${e.provider ? ` / ${esc(e.provider)}` : ""} · last activity ${fmtDate(e.lastActivityAt)} · ${esc(e.messageCount ?? "—")} msgs${e.outcome ? ` · outcome: ${esc(e.outcome)}` : ""}</span><br>${esc(evidence)}${reason}${orch}${controls}${detail}${commentBox}${kidsHtml}</div>`; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Give each rendered session-card occurrence a unique DOM ID
A tiered session is rendered both in its queue and under All sessions, so deriving both IDs solely from objectRef creates duplicate IDs across independently patched fragments. When session activity changes their ordering, the vendored Datastar morph implementation can use its global document.getElementById lookup to move the queue's card into the sessions fragment instead of reusing that fragment's own card. Executing the vendored morph helpers against a queue containing A and a sessions list changing from [A, B] to [B, A] leaves the queue empty while its reported count remains unchanged. Scope IDs to each rendered occurrence so refreshing one section cannot remove cards from another.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.