Repository navigation
feat(aggregator): slice 2 — mobile, needs-Drew/orchestrator tiers, roadmap horizons, today view, session clarity - #901
Conversation
…on summary SessionFeedEntry gains source/parentId/agent/outcome/createdAt; new AttentionTier + TieredEntry, SourceCoverage, OrchestrationSummary and JulesSummary shapes; FleetFeed carries optional julesSummary and orchestration sections (contract posted on #899). Provenance gains an orchestration facet.
…dmap grains, today buildAttention expires finished runs (>2h) and anything >24h, then tiers every classified session: orchestrator escalations first (reason verbatim), keeper escalations, decision-shaped questions, destructive permission requests and credential walls land in NEEDS DREW with a per-item reason; everything else actionable is NEEDS ORCHESTRATOR with the fleet's next step. Roadmap gains month/week/ 3-day/today grains over the same rows (Chicago calendar); deriveToday renders the #899 orchestration summary when present and otherwise derives objectives + per-project momentum from board/roadmap/items.
…ing, Jules wiring The OpenCode v2 mapper now carries parentID (sub-sessions), agent, createdAt and outcome (cleared while the server holds the session active), stamping each entry with its source. New sources/jules.ts maps the keeper's jules-review-state.json items to Jules feed entries (AWAITING_USER_FEEDBACK -> awaiting a question, FAILED -> errored, COMPLETED -> finished) and parses the keeper's run totals. The collector stamps sandbox entries, merges Jules in, and embeds the #899 orchestration summary (orchestration-state.json) when present.
…ource interface liveSource reads the orchestration summary from the fleet feed, stamps laptop sessions opencode-laptop, and reports per-source coverage from what its reads actually saw (feed present, laptop reachable, keeper totals) — Muse honestly not wired. Fixtures gain source stamps, a collapsed sub-session, a Jules entry, a finished probe that expires, and a fixture orchestration summary.
…map horizons, today view Mobile-first CSS (single-column stacking, scrollable tables/nav, touch chips). Needs-you is now card-based and tiered: NEEDS DREW first with a per-item 'Why you' reason, NEEDS ORCHESTRATOR with the fleet's next step, then all sessions with source labels, plain- language states, sub-sessions collapsed under parents, and the session-coverage note (Muse honestly not wired). Roadmap gains a horizon switcher (quarter/month/week/next-3-days/today) over the same rows. New /today view: top objectives + per-project momentum from the #899 orchestration summary when present, derived and labelled until then. /api/attention.json keeps its array shape, tier-annotated; new /api/today.json and /api/coverage.json. Footer carries the canonical amd-6.raptor-pumpkinseed.ts.net URL — never the raw tailnet IP.
…e the keeper's pm-stack README tailnet references now use amd-6.raptor-pumpkinseed.ts.net. Aggregator README documents the views, tiers, expiry, sources and the #899 feed contract. One behavior refinement from the live collector run: a Jules AWAITING_USER_FEEDBACK question matches the decision heuristic, but the keeper already answers those — Jules questions tier to the orchestrator unless #899 escalates them.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 8 minutes. View limit details
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. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d30f7078d9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| put(row, { key: ym, label: monthLabel(ym), order: y * 12 + m }); | ||
| } else { | ||
| put(row, laneFor(row.horizon)); // quarter / ongoing / unscheduled lanes |
There was a problem hiding this comment.
Use a common chronological scale for month and quarter lanes
When the Month view contains both dated rows and quarter-labelled rows, their lane orders use incompatible scales: months use year * 12 + month, while laneFor() gives quarters year * 4 + quarter. Consequently, every quarter lane sorts before every month lane, even across years. With the committed fixtures, Q1 2027 appears before October 2026. Normalize both lane types to the same chronological scale before sorting so the roadmap preserves time order.
Useful? React with 👍 / 👎.
| const [feed, summary, coverage] = await Promise.all([ | ||
| source.attention(), | ||
| source.orchestration(), | ||
| source.coverage(), |
There was a problem hiding this comment.
Read coverage after the attention source finishes
In live mode, source.coverage() reads laptopSeen, which source.attention() updates only after awaiting the laptop session fetch. Running them concurrently means the first request reports the laptop as “not wired / not read yet” even when that same response successfully includes laptop sessions; subsequent requests can report the previous read's status instead. This affects /attention, /today, and /api/coverage.json. Await the attention read before collecting coverage so the coverage describes the sources actually used for that response.
Useful? React with 👍 / 👎.
| const all = current | ||
| .map((e) => tierEntry(classifyAttention(e, now), summary)) |
There was a problem hiding this comment.
Keep successfully finished runs out of the poke queue
For a newly collected Jules COMPLETED session, mapJulesItems() supplies outcome: "succeeded" and activeToolCalls: 0. Until the two-hour expiry, this classification pass nevertheless labels it needs-poke with evidence saying “no completion signal” and puts it in NEEDS ORCHESTRATOR, instructing the orchestrator to poke or close already-successful work. The newly propagated successful OpenCode outcomes have the same problem. Handle successful outcomes before assigning actionable attention states; retaining finished runs in All sessions should not make them work that needs intervention.
Useful? React with 👍 / 👎.
| } | ||
| const all = [...linked.values()]; | ||
| const accomplished = all | ||
| .filter((i) => (i.state === "merged" || i.state === "closed") && Date.parse(i.updatedAt) >= weekAgo) |
There was a problem hiding this comment.
Exclude unmerged closed PRs from accomplishments
When a linked PR was recently closed without merging, this predicate counts it as an accomplishment and can mark an otherwise inactive project as moving. In this model, merged PRs have the separate merged state, while closed PRs are explicitly distinguished as closed-unmerged by executionStrip(). Thus abandoning an approach produces a successful-progress report in both the Today page and its JSON endpoint. Restrict closed-item accomplishments to issues, and require PRs to be merged.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 626a597c2e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let laptopSeen: boolean | null = null; | ||
| async function getFeed(): Promise<FleetFeed | null> { | ||
| const feed = await loadFeed(cfg.feedFile); | ||
| if (feed) lastFeed = feed; |
There was a problem hiding this comment.
Clear cached coverage when the fleet feed becomes unreadable
After a successful feed read, if the file is deleted, becomes unreadable, or contains invalid JSON, getFeed() returns null but retains the previous lastFeed. Attention then falls back to fixtures or laptop-only sessions, while coverage() continues reporting the old sandbox and Jules sources as wired. This persists across subsequent requests because coverage prefers the cached value. Update lastFeed on failed reads too, so coverage reflects the sources actually supplying the displayed sessions.
Useful? React with 👍 / 👎.
| const esc = summary?.escalations.find( | ||
| (x) => (x.sessionId && x.sessionId === e.sessionId) || (x.title && x.title === e.title), | ||
| ); | ||
| if (esc && e.state !== "in-motion") { |
There was a problem hiding this comment.
Honor explicit escalations regardless of local activity state
When the orchestration summary explicitly escalates a session that still reports active tool calls, this guard silently discards the escalation because the local classifier labels the session in-motion. A fresh entry with activeToolCalls: 1 and a matching escalation produces an empty Drew queue, omitting both the escalation reason and the Today alert. This contradicts the documented contract in pm-stack/aggregator/README.md that orchestration escalations override tier rules. Apply the explicit escalation before filtering by the locally inferred activity state.
Useful? React with 👍 / 👎.
# Conflicts: # pm-stack/aggregator/scripts/collect-fleet-feed.ts # pm-stack/aggregator/src/feed.ts # pm-stack/aggregator/src/source.ts # pm-stack/aggregator/src/sources/fixtures.ts # pm-stack/aggregator/src/sources/live.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e6d48454bc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (/^jules_note_\d+$/.test(k) && typeof v === "string" && k > bestKey) { | ||
| bestKey = k; | ||
| bestText = v; |
There was a problem hiding this comment.
Select Jules run totals correctly across midnight
When keeper state retains notes across midnight, comparing jules_note_<HHMM> keys lexicographically selects yesterday's latest clock time rather than the freshest run. For example, with last_run at 00:05 and notes named jules_note_2359 and jules_note_0005, julesSummary() returns the 23:59 totals stamped with the new 00:05 timestamp. The coverage endpoint and session coverage panels therefore present stale session counts as the latest measurement. Select the note using run chronology, including the day boundary, rather than the greatest HHMM key.
Useful? React with 👍 / 👎.
Aggregator slice 2 (#898) — mobile, tiers, horizons, today view, session clarity
Implements #898 end to end. Contracts with #899 posted on that issue (orchestration-state.json → collector →
feed.orchestration; escalations override tiering verbatim).What landed
?h=quarter|month|week|3d|todayover the same Grist rows; dated rows land on their day/month, quarter-grain rows are counted honestly at fine grains./today,/api/today.json) — top objectives + per-project momentum (moving/stalled/blocked-by-what + recent accomplishments). Consumes the impl(orchestrator): recurring orchestration job — queue triage, priority ladder, blocker awareness, goal measurement #899 orchestration summary via the fleet feed; until it exists it derives from board/roadmap/items and labels itself derived.parentIDmapped so sub-sessions collapse under parents; finished leftovers expire; a coverage note states what's wired. Jules is wired (keeper state →src/sources/jules.ts, totals infeed.julesSummary). Muse is not — no registry exists to read; the note says so and the gap is tracked in impl(aggregator): slice 2 — mobile, needs-Drew/needs-orchestrator tiers, time-granular roadmap, session clarity #898.amd-6.raptor-pumpkinseed.ts.net; binds/transport keep the IP (plumbing, not links)./api/attention.jsonkeeps its flat-array shape, now current-only and tier-annotated (tier,drewReason,orchestratorNote,source,parentId); new/api/coverage.json.Verification
bun test: 59 pass (newtest/slice2.test.tscovers tiers, expiry, hierarchy, Jules mapping, grains, today derivation + renders; opencode stub covers parent/agent/source mapping; boot test covers /today, coverage, horizons).bunx tsc --noEmit: clean.Need help on this PR? Tag
@codesmith-botwith what you need.