The guard pattern that masked the prefill-ref bug fixed in PR #153 is applied across handleSend, handleTaskSubmit, selectChat, refreshFacts, refreshActiveFix, and refreshPreview. Worth either logging the mismatch path or distinguishing expected-stale from unexpected-stale so the next instance of this class of bug surfaces instead of hiding. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
3.2 KiB
3.2 KiB
TODO.md
Backlog of work NOT currently active. Read only when
CURRENT_TASK.mdstatus iscomplete. Format:- [ ] short description — optional link to issue/PR
Up next
- Parallelize backend pytest with pytest-xdist. ✅ landing as PR #151. Verified locally: backend suite 22 min → 4m 28s with
-n autoon the 8-core homelab runner. Per-worker DB isolation viaPYTEST_XDIST_WORKERin conftest.py.
Backlog
- Frontend lint warnings cleanup. 23
react-hooks/exhaustive-depswarnings remain after PR #149 (mostly missing-deps in useEffect). Either fix them or audit them for known-safe ones and add eslint-disable comments. Not blocking CI today. - Audit
filterwarningsignores added inwip(handoff): restore backend suite to green. Codex added narrowResourceWarningfilters for unclosed socket/transport/event-loop noise from pytest-asyncio teardown. Worth periodically reviewing whether those are still needed (e.g. when bumping pytest-asyncio) — if a real warning appears in those forms it would be silenced. - Add
data-testidattributes to e2e-critical interactive elements. PR #152 fixed five Playwright tests by chasing UI-text changes (Sessions→Session History,Account Settings→Account Management,/assistant→/pilot, "Flow Sessions" tab, Resume button on session cards). Each was a one-line selector update, but every UI churn re-breaks them. Adding stabledata-testidattributes on the targeted elements (page heading wrappers, tab nav, primary action buttons) and switching tests togetByTestIdwould make these immune to copy/route renames. Scope it small — start withSessionHistoryPageheading, the AI/Flow Sessions tab buttons, the per-sessionResumebutton, and the command-palette FlowPilot option. - Per-test transactional rollback in
test_dbfixture. Bigger engineering than xdist (which we already shipped). Instead ofDROP SCHEMA public CASCADEper test, wrap each test in a savepoint and rollback at teardown. ~30-40% additional speedup on top of xdist for test-DB-heavy tests. Real refactor; only worth it if the suite gets significantly larger or runs more frequently. - Consider
pytest-testmonfor PR-time test selection. Tracks which tests touched which source files and only re-runs affected ones. Best for small PRs touching ~few files. Adds cache-invalidation complexity; only worth it if the suite stays painfully long even after xdist. - AssistantChatPage
currentChatRefguard is a silent return —handleSend,handleTaskSubmit,selectChat,refreshFacts,refreshActiveFix, andrefreshPreviewall bail withif (currentChatRef.current !== sentForChatId) returnwhen stale. This is by design for chat switching, but it also silently masked the prefill-ref bug fixed in PR #153 — the user just saw "no AI response" with no log, no toast, no Sentry event. Either (a) log aconsole.warn/Sentry breadcrumb on the mismatch path so future drift is visible, or (b) split "expected stale" (chat switch) from "unexpected stale" (ref never updated) so only the latter alerts. Pair with an audit of everycurrentChatRef.current = ...assignment vs everysetActiveChatId(...)call to make sure they're paired everywhere.