Conversation
- /api/vision endpoint: allow-listed metrics-only view of vision events, no frames or raw data, full redaction while vision is disabled - settings: vision_enabled, vision_sample_interval (30-60s), vision_frame_interval - build_assistant_command: assistant launch args come from persisted settings only - mutation guard: POST/PATCH/DELETE require same-origin (Origin==Host) and application/json content type for state-changing requests - _send_json/_send_download: allow_nan=False so non-finite metrics never serialize - bounded tail reads for the events file (200 lines / 256 KiB cap) - Vision panel UI (posture + activity metrics, privacy seal, attention pulse) - tests: payload allow-listing, NaN/Inf rejection, redaction, clamp ranges, mutation guard, consent persistence, panel assets
# Conflicts: # FOCUS_COMMAND_CENTER.md # README.md # deep_work_assistant/cli.py # deep_work_assistant/ui/app.v2.css # deep_work_assistant/web_ui_v2.py # tests/test_web_ui_v2.py # uv.lock
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
Vision panel (Phase 3 of the vision lane) — live posture/activity metrics in the Focus Command Center:
/api/visionendpoint: allow-listed metrics-only view ofvision_events.jsonl— no frames, no raw data, no path disclosuredisabled→stopped→waiting→active/attention/unavailable, with freshness bound (180s)vision_enabled,vision_sample_interval(30–60s),vision_frame_interval(0.1–5s) — clamped inSettingsStorebuild_assistant_command); consent changes stop the managed assistantallow_nan=False)Mutation guard (hardens the whole command center, not just vision):
Origin==Host) +application/jsonContent-Type; cross-origin → 403, wrong type → 415Verification
287 passedon merged tree (uv lock --checkexit 0)origin/main(integration-first-run) with no loss — tutorial/help/effective-streak retained alongside vision panelNotes
--vision); the panel is the read-side UI