Agent session visualization and personalization platform.
Refer to DESIGN.md for visual/layout conventions.
Code conventions:
- I/O lives in
frontend/src/api/<domain>.ts. Components never callfetchWithTokendirectly — they take a client from the matching<domain>Client(fetchWithToken)factory. One factory per API domain (analysis, llm, sessions, dashboard, upload, donation, extensions). Memoize withuseMemoso references are stable. - Cross-cutting state lives in
frontend/src/hooks/. Existing patterns to reuse:useJobPolling,useCostEstimate,useCopyFeedback,useResetOnKey,useSessionData,useDemoGuard. If auseEffectpattern appears in 2+ files, extract a hook. - Don't notify a parent via
useEffect(useEffect(() => onChange?.(x), [x])). Wrap the setter and call the callback at the state-change site. - Shared timing constants live in
frontend/src/constants.ts(COPY_FEEDBACK_MS,JOB_POLL_INTERVAL_MS,SEARCH_DEBOUNCE_MS). Don't redeclare per file.
Before commit (frontend changes):
cd frontend && npx tsc --noEmit— type check (fast).cd frontend && npm run test— vitest suite (<1s).cd frontend && npm run build— build intosrc/vibelens/static/. Commit the static output.
The full suite takes ~5m. Run only what you need:
- Default during edits: target the test file(s) that exercise the code you changed.
uv run pytest tests/<path>/<file>.py -v -s. - Multi-file change: run the test directory matching the area, e.g.
uv run pytest tests/storage/ tests/ingest/. - Big change (touching ≥3 areas, refactoring shared code, or changing public API): run the whole suite once at the end.
uv run pytest tests/. - Always before commit:
uv run ruff check src/ tests/. Cheap.
Conventions:
- Tests should log detailed output with
print()for manual verification, not just assertions. - Use
-sto see print output when iterating.
Canonical flow: docs/release.md. User-facing entry points: README.md (PyPI badge, CHANGELOG link).
Quick-reference for executing a release:
- Version bump: update
versioninpyproject.tomland__version__insrc/vibelens/__init__.py. They must match. - CHANGELOG: promote
[Unreleased]entries into a new## [X.Y.Z] - YYYY-MM-DDsection. Keep the[Unreleased]heading empty for the next cycle. - Catalog: Skip.
- Frontend (only if
frontend/src/changed):cd frontend && npm run build && cd ... Commitsrc/vibelens/static/. - Verify:
uv run ruff check src/ tests/ && uv run pytest tests/ && uv build. - Tag and push:
git commit -am "Release vX.Y.Z" && git tag vX.Y.Z && git push origin main --tags. Trusted publishing on PyPI (.github/workflows/publish.yml) takes over from the tag push — no token, notwine. - GitHub Release (use the CHANGELOG entry as the body):
gh release create vX.Y.Z --title "vX.Y.Z" --notes "$(...)".