Commit graph

89 commits

Author SHA1 Message Date
92da5902ba fix: UndoToast now emits expire after 5s so toast self-dismisses 2026-03-04 11:29:03 -08:00
82eeb4defc fix: prevent blank page on rebuild and queue drain on skip/discard
Two bugs fixed:

1. Blank white page after vue SPA rebuild: browsers cached old index.html
   referencing old asset hashes. Assets are deleted on rebuild, causing
   404s for JS/CSS -> blank page. Fix: serve index.html with
   Cache-Control: no-cache so browsers always fetch fresh HTML.
   Hashed assets (/assets/chunk-abc123.js) remain cacheable forever.

2. Queue draining to empty on skip/discard: handleSkip and handleDiscard
   never refilled the local queue buffer. After enough skips, store.current
   went null and the empty state showed (blank-looking). Fix: both handlers
   now call fetchBatch() when queue drops below 3, matching handleLabel.

Also: sync classifier_adapters LABELS to match current 10-label schema
(new_lead + hired, remove unrelated).

48 Python tests pass, 48 frontend tests pass.
2026-03-03 19:26:34 -08:00
a06b133a6e docs(avocet): document email field schemas and normalization layer 2026-03-03 18:43:41 -08:00
b54b2a711e fix(avocet): normalize queue schema + bind to 0.0.0.0 for LAN access
- Add _item_id() (content hash) + _normalize() to map legacy JSONL fields
  (from_addr/account/no-id) to Vue schema (from/source/id)
- All mutating endpoints now look up by _normalize(x)[id] — handles both
  stored-id (test fixtures) and content-hash (real data) transparently
- Change uvicorn bind from 127.0.0.1 to 0.0.0.0 so LAN clients can connect
2026-03-03 18:43:00 -08:00
cd7bbd1dbf fix(avocet): start-api polls port instead of sleeping 1s — avoids false-success on slow start 2026-03-03 18:11:53 -08:00
682a958c28 fix(avocet): strip HTML from email bodies — stdlib HTMLParser, no deps 2026-03-03 16:28:18 -08:00
47973aeba6 feat(avocet): easter eggs — hired confetti, century mark, clean sweep, midnight labeler, cursor trail 2026-03-03 16:24:47 -08:00
deddd763ea feat(avocet): manage.sh start-api / stop-api / open-api commands 2026-03-03 16:23:56 -08:00
382bca28a1 feat(avocet): LabelView — wires store, API, card stack, keyboard, easter eggs
Implements Task 13: LabelView.vue wires together the label store, API
fetch, card stack, bucket grid, keyboard shortcuts, haptics, motion
preference, and three easter egg badges (on-a-roll, speed round, fifty
deep). App.vue updated to mount LabelView and restore hacker-mode theme
on load. 3 new LabelView tests; all 48 tests pass, build clean.
2026-03-03 16:21:07 -08:00
b623d252d0 feat(avocet): LabelBucketGrid bucket-mode CSS — spring expansion, glow on drop 2026-03-03 16:19:29 -08:00
9b5a1ae752 feat(avocet): EmailCardStack — swipe gestures, depth shadows, dismissal classes 2026-03-03 16:16:09 -08:00
e7f08ce685 feat(avocet): UndoToast — 5-second countdown, undo button, accessible 2026-03-03 16:13:02 -08:00
5114e6ac19 feat(avocet): useLabelKeyboard — 1-9, h, S, D, U, ? shortcuts 2026-03-03 16:12:58 -08:00
cd6cae2040 feat(avocet): LabelBucketGrid — numpad layout, bucket-mode expansion, drag drop 2026-03-03 16:04:31 -08:00
e05ac885d7 feat(avocet): EmailCard component — subject, from/date, body preview, expand/collapse 2026-03-03 16:03:01 -08:00
e823c84196 feat(avocet): useApi, useMotion, useHaptics, useEasterEgg (Konami/hacker mode)
- useApiFetch: typed fetch wrapper with network/http error discrimination
- useMotion: reactive localStorage override for rich-animation toggle, respects OS prefers-reduced-motion
- useHaptics: label/discard/skip/undo vibration patterns, gated on rich mode
- useKonamiCode + useHackerMode: 10-key Konami sequence → hacker theme, persisted in localStorage
- test-setup.ts: jsdom matchMedia stub so useMotion imports cleanly in Vitest
- smoke.test.ts: import smoke tests for all 4 composables (12 tests, all passing)
2026-03-03 15:58:43 -08:00
209f49f7ea feat(avocet): Pinia label store with queue, lastAction, easter egg counter 2026-03-03 15:54:44 -08:00
2abda18b92 fix(avocet): align theme with Peregrine design system — full token set, dark mode, self-hosted fonts 2026-03-03 15:52:38 -08:00
ac1f4b8ba1 feat(avocet): CircuitForge base theme + Avocet Slate Teal/Russet colors 2026-03-03 15:49:07 -08:00
cb059492bf feat(avocet): Vite + Vue 3 + UnoCSS + Vitest scaffold 2026-03-03 15:46:58 -08:00
4a76f6ba41 fix(avocet): undo — commit-then-clear order, empty-records guard, skip dedup, stronger test 2026-03-03 15:41:58 -08:00
80a8195899 feat(avocet): discard, undo, labels config, static serving — backend complete 2026-03-03 15:35:01 -08:00
f0e9886ab2 feat(avocet): POST /api/skip endpoint 2026-03-03 15:21:32 -08:00
816c0e3bb2 fix(avocet): store original item in _last_action; add requirements.txt 2026-03-03 15:16:54 -08:00
ff27053aa9 feat(avocet): POST /api/label endpoint 2026-03-03 15:14:04 -08:00
c1a6dd4fc5 fix(avocet): queue_with_items fixture uses api._DATA_DIR to avoid implicit tmp_path coupling 2026-03-03 15:03:57 -08:00
9abae0478c feat(avocet): GET /api/queue endpoint 2026-03-03 15:00:59 -08:00
c8aea3c39f fix(avocet): _write_jsonl empty-list writes empty file; add reset_last_action helper 2026-03-03 14:36:18 -08:00
ffd1450f62 feat(avocet): FastAPI skeleton + JSONL helpers 2026-03-03 13:30:28 -08:00
9133cadd66 feat: discard button — removes email from queue without writing to score file 2026-02-27 15:48:40 -08:00
18c7ed2c57 fix: manage.sh restart — exec bash $0 so script path resolves correctly 2026-02-27 15:41:53 -08:00
a26a21e71d feat: targeted fetch — date range + sender/subject filter for historical email pulls 2026-02-27 15:15:49 -08:00
1452889d0f fix: RerankerAdapter falls back to label name when no LABEL_DESCRIPTIONS entry 2026-02-27 14:54:31 -08:00
d0dbc6e787 docs: update CLAUDE.md — 9 labels table with keys, wildcard shortcut 2026-02-27 14:49:24 -08:00
fd476e4199 feat: 9 labels (add event_rescheduled/unrelated/digest), wildcard Other label, InvalidCharacterError fix 2026-02-27 14:34:15 -08:00
66f69ff9a2 fix: fetch log — overwrite per-email progress instead of appending
status.write() per email grows the log unboundedly on big pulls.
Now uses status.empty() to create one updatable slot; per-email
progress overwrites it, cleared after each account completes.
Per-account summaries still use status.write() (one line each).
2026-02-27 14:20:57 -08:00
2824fca70c feat: add Settings tab with IMAP account GUI + connection test
- ⚙️ Settings tab: add/edit/remove accounts without touching YAML
- Per-account: name, host, port, SSL, username, password (masked), folder, days back
- Test connection button: connect → login → select folder → report message count
- Save writes config/label_tool.yaml; Reload discards unsaved changes
- _sync_settings_to_state() prevents index-key drift on add/remove
- _test_imap_connection() helper shared with fetch tab indirectly
- CLAUDE.md: document new tab, Settings UI design notes
2026-02-27 14:18:51 -08:00
e705962f7b feat: add manage.sh with port collision detection
start/stop/restart/status/logs/open for the label tool UI;
benchmark/list-models/score/compare shortcuts for the harness.

Port scan: checks lsof → ss → /dev/tcp fallback, increments from
8503 until a free port is found. PID tracked in .avocet.pid,
assigned port persisted in .avocet.port.
2026-02-27 14:10:24 -08:00
0e238a9e37 feat: initial avocet repo — email classifier training tool
Scrape → Store → Process pipeline for building email classifier
benchmark data across the CircuitForge menagerie.

- app/label_tool.py — Streamlit card-stack UI, multi-account IMAP fetch,
  6-bucket labeling, undo/skip, keyboard shortcuts (1-6/S/U)
- scripts/classifier_adapters.py — ZeroShotAdapter (+ two_pass),
  GLiClassAdapter, RerankerAdapter; ABC with lazy model loading
- scripts/benchmark_classifier.py — 13-model registry, --score,
  --compare, --list-models, --export-db; uses label_tool.yaml for IMAP
- tests/ — 20 tests, all passing, zero model downloads required
- config/label_tool.yaml.example — multi-account IMAP template
- data/email_score.jsonl.example — sample labeled data for CI

Labels: interview_scheduled, offer_received, rejected,
        positive_response, survey_received, neutral
2026-02-27 14:07:38 -08:00