Add a 'How Dayflow figured this out' transparency panel#297
Open
caezium wants to merge 1 commit into
Open
Conversation
Surfaces how each activity card was produced, inline in the card detail (collapsed by default): - the model's reasoning for grouping/categorizing the session - the on-screen observations it wrote, each with a downsampled screenshot from that moment, so you can see what it actually saw - which model/provider generated the card - an optional raw LLM-call view (operation, status, latency, response) Reasoning is persisted in the timeline_cards metadata JSON at save time (no schema migration — it rides the existing envelope alongside appSites), and falls back to parsing the logged llm_calls for older cards. Everything else reads already-persisted observations + llm_calls by batchId. Includes unit tests for the reasoning extraction (bare/fenced JSON and OpenAI/Gemini envelope shapes).
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
A "How Dayflow figured this out" panel, shown inline in each activity card's detail (collapsed by default). It makes the AI categorization transparent — useful for trust in an always-on screen recorder, and for debugging odd cards. For each card it surfaces:
How it works
timeline_cardsmetadata JSON at save time — no schema migration; it rides the existing envelope alongsideappSites. For older cards (pre-this-change), it falls back to parsing the loggedllm_calls, so the panel is populated retroactively too.batchId. No new tables.Tests
Unit tests for the reasoning extraction (
CardInsightParsingTests) covering bare JSON, code-fenced JSON, and the OpenAI / Gemini envelope shapes, plus graceful nils.Notes
main(v1.14.1); the app builds and the tests pass.