Skip to content

Feat/polish - #20

Merged
armedev merged 8 commits into
mainfrom
feat/polish
Aug 26, 2026
Merged

armedev merged 8 commits into
mainfrom
feat/polish

Conversation

@armedev

@armedev armedev commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

No description provided.

… loaders

- Flares: GET /v1/queue now hydrates a per-job {connections} map by
  reading each done ingest job's chained connections result. En route
  fixed ListJobs dropping the result/connections_job_id columns since
  the chaining migration - the API never returned them despite the
  schema documenting both.
- DoneItem: gold [link N] chip (hidden at 0) + sparkles enriched
  marker; whole row clickable when note_path exists -> NoteView sheet
- Show more: real pagination over done history (status=done, 50/page,
  dedup on merge) replacing the dead scroll hint; show-less collapses;
  fresh polls reset expansion
- Loaders: shimmer skeleton rows on first load; layout transitions on
  status groups; processing card already had indeterminate bar
- Logout: header two-step confirm ('lock out?') -> clears stored token
  and locks (vault-lock modes) or reloads into clean state

Tests: flare chip visibility/click-through, logout confirm flow (7 new,
92 total). Live verified: flares {2,1,0} hydrating against test vault,
new bundle embedded and served.
Two regressions from the queue polish commit:

- connections/memory jobs rendered as user-visible entries. QueueView
  now filters INTERNAL_JOB_TYPES out of every group (pending/failed/
  done, counts included); they live on only as flare chips on their
  ingest job. Regression test asserts internal types never render even
  when present in the payload.
- The AnimatePresence section wrappers and per-item layout props broke
  the q-body flex layout. Reverted to the original flat section
  structure with the pre-existing fade-in transitions; skeleton,
  show-more, flares and logout all kept intact.

93/93 vitest, tsc clean, new bundle embedded.
…land

The feature works in the current bundle - proven by a new Playwright
e2e that navigates to the queue tab, clicks a done item, and asserts
the NoteView sheet fetches the note. Getting there required fixing the
e2e harness (helpers hardcoded the wrong token and cross-origin host;
now same-origin via the vite proxy) and installing the chromium runner.

Root cause of the user-visible breakage: workbox generateSW defaults
to skipWaiting=false, so new bundles wait for every tab to close - an
installed PWA never closes, leaving users on stale bundles where queue
polish features don't exist. main.tsx now posts SKIP_WAITING as soon
as an update is installed and reloads on controllerchange, so deploys
take effect on the next refresh.

93 vitest green; e2e green; assets rebuilt.
Batch 2 — realtime:
- internal/events: buffered pub-sub hub; Publish never blocks (slow
  consumers dropped), unsubscribe-safe
- Worker publishes job_updated on every status transition (processing/
  done/failed); API retry handler publishes too
- GET /v1/queue/ws (gorilla/websocket): token query-param auth — also
  accepted by AuthMiddleware now, since browsers cannot set custom
  headers on the handshake; ping/pong keepalive; logging middleware
  gained Hijack/Flush forwarding which upgrades require
- PWA useQueueWS: live in-place patching with capped-backoff reconnect;
  polling remains the silent fallback

Live verified end-to-end: one capture produced queued -> done ->
connections queued/done -> memory queued broadcasts on the wire.

Phase 5 close-out:
- Amount dedupe decided and implemented at normalization time:
  normalizeAmounts collapses identical converted values ($2,000 + 2k
  -> one 2000 row) so connections/glossary/memory each see a single
  row per value per note; table-tested
- PLAN.md: v1.1 section rewritten to reflect everything that shipped;
  vault/backup boxes ticked, shell completion deferred to v1.2

Both binaries build and version correctly; full suite + lint green.
- done-expand: was a raw <button> with browser-default styling breaking
  the layout — now a full-width centered flex row matching the design
  system, with hover state
- WebSocket auth redesigned to first-message flow: client sends
  {"type":"auth","token"} immediately after connect; nothing streams
  until validated; invalid/missing auth closes with code 1008. Tokens
  no longer appear in query params where access logs capture them.
  Route moved outside the header-auth group (handshakes cannot carry
  headers), middleware query-param fallback reverted.
- Live verified: unauthenticated connection closed 1008 unauthorized;
  authed connection acked then streamed queued/done broadcasts.

3 WS handler tests updated for the frame-based contract.
@armedev
armedev merged commit dd61581 into main Aug 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant