Skip to content

Chronicle Espresso design system + standard UI primitives - #342

Closed
AnkushMalaker wants to merge 17 commits into
feat/screenpipe-wizardfrom
feat/espresso-design-system
Closed

Chronicle Espresso design system + standard UI primitives#342
AnkushMalaker wants to merge 17 commits into
feat/screenpipe-wizardfrom
feat/espresso-design-system

Conversation

@AnkushMalaker

Copy link
Copy Markdown
Collaborator

What

Applies the Chronicle "Espresso" design system (source: claude.ai/design) to both web UIs, and introduces a standard UI primitive library for the advanced webui.

Palette — remap, not rewrite

Both apps are Tailwind darkMode:'class' with the default palette. Instead of hand-editing thousands of class strings, a shared chronicle-espresso-preset.js remaps Tailwind's color names to the Espresso ramps (gray→espresso, blue→terracotta, green→forest, red/amber/purple→status, sky→info) + warm shadows + DS fonts/radius. Every existing x-50 dark:x-900 pairing keeps working. Duplicated per app (separate Docker build contexts).

Standard primitives (advanced webui)

New src/components/ui/: Button, IconButton, Card, Input/Textarea, Select, Checkbox, Label, StatCard, Tabs, Alert, Modal, plus StateBadge/MetadataChip (extended suggest/mono tones; info→muted-blue so it stays distinct from the terracotta brand). Built in the Tailwind idiom (one styling system). ~54 files migrated onto it, behavior-preserving.

Speaker webui

Same palette preset; consolidated the duplicate App.css/components.css token systems into one; fixed 73 pre-existing tsc errors so npm run build is green for the first time.

Reviewed

Two Opus review passes over the migration diff; applied fixes: Queue modal scroll containers, Modal Escape/backdrop close-guards for form/in-flight modals, Alert dismiss alignment, Checkbox disabled styling.

Scope / notes

  • Base is feat/screenpipe-wizard, not main — the design work layers on that branch's in-progress work.
  • Frontend-only: no backend files; the branch's uncommitted backend WIP is intentionally excluded.
  • Theme default unchanged (system-preference → user-choice).
  • A few migrated files (e.g. GuidedEnrollment) carry incidental pre-existing WIP hunks from the parent branch.
  • Both webui npm run build pass.

- tests/conftest.py: provide AUTH_SECRET_KEY/ADMIN_PASSWORD defaults so
  collection works without a local .env (CI has none; auth.py raises at
  import since the readiness/fleet work landed).
- docker-compose-test.yml: drop workers-test dependency on backend
  health. /readiness now requires the worker-fleet heartbeat, so gating
  workers on backend health deadlocked startup (backend unhealthy ->
  workers never start). Matches prod compose: workers need mongo+redis.
test_session_store.py was committed in #336 but the SessionStore
implementation it exercises (set/get/clear/expire current conversation,
conversation_create_lock) stayed in a local stash. Bring the
implementation in so the committed tests pass.
services/device_audio.py imports opuslib at module level, which needs
the native Opus library; the GitHub runner doesn't ship it. Was masked
until now by the earlier AUTH_SECRET_KEY collection error.
opuslib 3.x contains `is not 0`, a SyntaxWarning on py3.12. With
filterwarnings=error it becomes a SyntaxError on first import in a
fresh venv (CI), killing collection. Cached .pyc masked it locally.
Two layers were breaking the plugin-event tests:

1. mock-services.yml had no defaults.fallback_llm, so the memory agent's
   note-guarantee recovery pass (force_fallback=True) raised 'No fallback
   LLM is configured' and the memory job failed with nothing recorded.
   Add mock-llm-fallback (same mock server, distinct name — a fallback
   identical to defaults.llm is rejected as pointless).

2. chronicle.py treated a recovery-pass exception as fatal, skipping the
   source-preserving fallback note entirely. The note guarantee now
   degrades: log the recovery failure, write the fallback note, return
   its path — so memory.processed still fires and the vault keeps the
   conversation.

Also lands the speaker-rename guard in _speaker_rename_guidance:
conversation-scoped relabels between real named people no longer trigger
a vault-wide rename_person (which merged the wrong person's history);
only placeholder labels (Speaker N / Unknown Speaker N) may be globally
renamed.
…rvice logs

- test_vault_rename_person needs Redis (vault locks are Redis-backed and
  fail closed) and test_leading_silence_trim_db needs Mongo; both passed
  locally only because a dev stack was listening. Give the CI job real
  service containers on the ports the code defaults to.
- robot-tests saved backend/worker logs to files but never uploaded
  them, leaving container-side failures undiagnosable. Upload them.
Every real HTTP caller in the test stack (memory-agent LLM, streaming
STT consumer) addresses the mock services as host.docker.internal, but
Docker on Linux does not resolve that name without an explicit
host-gateway mapping — CI workers logged 'Name or service not known'
for every LLM and streaming-STT call. This broke memory.processed
events and streaming speech detection (open_conversation) in the no-api
suite, while passing locally under podman, which resolves the name
natively. Prod compose already carries the same extra_hosts.
save_config_section() patched the in-memory config cache once, but any
subsequent reload_config() (frequent in normal operation) rebuilt the
cache from disk and silently reverted the change whenever CONFIG_FILE
points away from config.yml (test environments). The always-persist
robot test toggles always_persist_enabled via /api/misc-settings and
raced exactly this: on slow CI a reload landed between the toggle and
the stream open, so a placeholder conversation appeared despite
always_persist=false. Register overrides and re-apply them on every
load instead.
save_config_section() passed a plain {} to OmegaConf.update() when
config.yml didn't exist yet, raising 'Unexpected type: {}' — so the
very first runtime settings save on a fresh install failed (and the
API reported it only in the response body, still HTTP 200).
…mitives

Reskin both web UIs to the Espresso palette (warm espresso neutrals +
terracotta brand + forest-green status; dark-capable) via a shared Tailwind
preset that REMAPS the color names, so thousands of existing gray-*/blue-*/
dark:* utilities reskin with no per-component churn.

- chronicle-espresso-preset.js (per app; separate Docker build contexts):
  full 50-950 ramps gray->espresso, blue->terracotta, green->forest,
  red/amber/purple->status, sky->info; warm shadows, DS fonts/radius.
- advanced/webui: new src/components/ui primitive library (Button, IconButton,
  Card, Input/Textarea, Select, Checkbox, Label, StatCard, Tabs, Alert, Modal
  + StateBadge/MetadataChip) with barrel; ~54 files migrated onto it
  (buttons/cards/modals/inputs/badges/tabs/alerts), behavior-preserving.
- speaker/webui: same palette preset; consolidated the duplicate App.css /
  components.css token systems into one; fixed 73 pre-existing tsc errors so
  `npm run build` is green for the first time.
- Theme stays system-preference-then-user-choice. Brand-blue hex literals in
  waveforms/sliders -> terracotta; categorical data-viz palettes left intact.

Both webui builds pass. Opus review pass applied fixes: Queue modal scroll
containers, Modal Escape/backdrop close-guards for form/in-flight modals,
Alert dismiss alignment, Checkbox disabled styling.
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 62a6892e-d4b0-401f-af4c-d151f796dffe

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/espresso-design-system

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@AnkushMalaker
AnkushMalaker deleted the feat/espresso-design-system branch July 26, 2026 00:12
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