Repository navigation
Add session work-unit grouping and the Models By-agent lens to the desktop app - #1351
Closed
ozymandiashh wants to merge 4 commits into
Closed
ozymandiashh wants to merge 4 commits into
ozymandiashh wants to merge 4 commits into
Conversation
…ession rows
Work units now carry rootProvider and a members[{sessionId, provider, role}]
twin so JSON consumers can separate two sessions sharing an id across
providers without guessing. Session rows gain agentType (null when the
provider records none; never synthesized). serve --stdio routes
sessions --by-work-unit like the CLI table already did.
… models codeburn:getWorkUnits maps to the existing sessions --by-work-unit JSON command and codeburn:getModelsByAgent to models --by-agent, with the same period/provider/range validation as the neighboring read channels. The renderer bridge types carry the WorkUnitReport envelope and ModelReportRow agentType; both new methods are optional-degrading on older preloads.
Sessions gains a Group by work units view beside the existing list: group rows aggregate the whole unit (root cost split from descendants'), members expand with their recorded agent type and contribution, cost sort ranks whole units, and the summary counts sessions and groups separately without re-summing member detail. Search surfaces a group when any member matches (agent types included) and flags only the matches; a population switch closes open details. Models gains a By agent lens fed by the CLI's --by-agent rows under their model groups.
…and user docs CODEBURN_DEV_PORT drives one Vite port through the new dev launcher (defaults to 5173 unchanged); CODEBURN_USER_DATA_DIR redirects the Electron profile (serve.pid, telemetry, tray). The browser demo harness serves the two new read channels, and docs/desktop-session-groups.md documents the feature end to end, including the reproducible acceptance fixture.
Collaborator
Author
|
Closing for now — main gained the CLI half of this through #1145 (CB-2 slice 1), so this branch now conflicts semantically with the landed resolver. The desktop grouping view and By-agent lens remain valuable; I plan to re-submit just the renderer half rebased on the landed CLI foundation once the CB-2 slices settle. Branch stays on the fork. |
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
Desktop: one orchestration root together with the subagents it spawned — the whole group's cost and each member's contribution — plus a By agent lens in Models fed by the CLI's existing
models --by-agent.Explore,general-purpose, …) and contribution, cost sorting ranks whole units, and the summary counts sessions and groups separately without re-summing member detail. Search surfaces the whole group when any member matches (agent types included) and flags only the matches. A period/provider/refresh switch closes any open group or member detail.(main)bucket — nothing fabricated.How
WorkUnitgainsrootProvider+members[{sessionId, provider, role}]so JSON consumers can separate same-id sessions across providers;SessionRowgainsagentType(null when the provider records none).serve --stdionow routessessions --by-work-unitlike the other read commands.codeburn:getWorkUnits/codeburn:getModelsByAgentmapping to the existing CLI commands, same arg validation as neighbors; presentation logic lives in the newapp/renderer/lib/workUnits.ts.CODEBURN_DEV_PORT(Vite + dev launcher),CODEBURN_USER_DATA_DIR(Electron profile incl.serve.pid), and the existing browser-demo harness learns the two new channels (CODEBURN_DEMO_BRIDGE=1, dev-serve only).Tests
serve --stdiorouting cases.agentType.Sessions > caps a large list, a timeout that also fails on a cleanmaincheckout — verified via stash). Rootnpm testfailures are unchanged load-flakyserve-stdio/menubarcases that pass in isolation.npm run build:cli, andnpm --prefix app run buildall clean.scripts/goal7-fixture.mjs) through the real CLI andserve --stdio, and clicked through the full flow in the real app: grouping → expand → member detail → cost sort → period switch → By agent, with totals reconciling at $17/$10/$8 and the CLI by-agent report ((main) 9 / Explore 3 / general-purpose 5).Docs
docs/desktop-session-groups.mdcovers the UI behavior, the never-does rules, the CLI counterparts, and the dev-isolation variables.