Skip to content

feat(chat): show an OmO session's workflows in the background-task list - #306

Merged
devswha merged 16 commits into
mainfrom
feat/omo-dag-runs
Oct 2, 2026
Merged

devswha merged 16 commits into
mainfrom
feat/omo-dag-runs

Conversation

@devswha

@devswha devswha commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

Stacked on #305 (base feat/omo-task-popover); review that first.

Summary

OmO checkpoints every workflow (DAG run) to <cwd>/.omo/senpi-task/dag/runs/dag_*.json: parentSessionId, status, waves[].nodeIds, and per node state, label, error. The background-task list (#305) now shows the session's workflows above its tasks.

Server (server/omo-tasks.ts omoRuns)

  • Runs whose parentSessionId is the pane's session: running ones oldest first, then up to 5 that ended in the last day.
  • Steps grouped by OmO's own waves; a node no wave names goes in a last wave. A failed step carries error.message.
  • Checkpoints carry every node's prompt and output (the largest local one is 1.1 MB). A file is parsed only when its mtime or size changed (cache keyed by path), and a file untouched for a day is not opened, which also drops runs OmO never finished (one left running since 2026-09-05 here). Prompts and outputs never leave the server: a run is 600–800 bytes on the wire.
  • GET /api/pane/omo-tasks answers { tasks, runs } (OmoActivity); the client reads runs as [] from a bridge that only sends tasks.

Client (BackgroundTasks)

  • A "Workflows" section: name, "1 of 5 done · 2 running · 6m 0s", one line of step chips per wave (state icon + token colors, wrapping), failed steps' reasons under it.

Ideas from omo-herdr-dag's DAG view (MIT): its wave layout and summary line; data from OmO's checkpoints only, OmO is not touched.

Test plan

  • bun run typecheck
  • bun test ./server/omo-tasks.test.ts ./src/lib/omoTasks.test.ts ./src/lib/i18n.test.ts ./src/motion.test.ts (new: waves/labels/errors, prompt/output not leaked, other sessions / untouched for a day / unknown status / torn file skipped, a rewritten checkpoint read again)
  • bun test ./server/api.contract.test.ts -t omo-tasks (isolated test herdr)
  • Real checkpoints in this repo's .omo: the session's two runs from 2026-10-01 come back with their waves and the one failed step marked.
  • Demo (OmO pane with a running and a failed workflow) in Chrome at 1280×900 dark and light, 390×844 @2x: chips wrap, no horizontal overflow, no page errors.

Codex review (gpt-6.1-sol xhigh) — fixed

  • P1: every changed checkpoint was parsed even for other sessions. Now the parentSessionId near the start is matched before parsing, one call parses at most 16 MB (the rest on the next poll), and files over 8 MB, links and pipes are skipped.
  • P2: pending / paused runs and blocked steps were dropped. Supported in the protocol, server and UI.
  • P2: finished workflows were unreachable once no task ran (fixed in feat(chat): list an OmO pane's background tasks from the status line #305: the button stays).
  • P2: the 512-entry cap in directory order could miss current runs. Now every recent file is stat'ed, newest by time first (dag_ names are random).
  • Merged feat(chat): list an OmO pane's background tasks from the status line #305's fixes (server_time is in this answer too).

@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Repository: devswha/herdr-web-ui/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 28cccde5-4616-4dc8-b4af-ef62d913358e

📥 Commits

Reviewing files that changed from the base of the PR and between 1387e6a and 6ae18ad.

📒 Files selected for processing (15)
  • CHANGELOG.md
  • server/api.contract.test.ts
  • server/index.ts
  • server/omo-tasks.test.ts
  • server/omo-tasks.ts
  • shared/protocol.ts
  • site/demo/transport.ts
  • src/components/BackgroundTasks.css
  • src/components/BackgroundTasks.tsx
  • src/lib/api.ts
  • src/lib/i18n.ja.ts
  • src/lib/i18n.ko.ts
  • src/lib/i18n.zh.ts
  • src/lib/machineContext.tsx
  • src/lib/omoTasks.ts
 __________________________________________________
< Deploying the charm offensive against your bugs. >
 --------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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

devswha added 11 commits October 2, 2026 14:41
…e last task ends, and time tasks on the PC's clock
…rse only the asked session's, within a budget, and show paused runs and blocked steps
…s with no time, always say how a task ended, and offer the list on every OmO pane
…/omo-dag-runs

# Conflicts:
#	server/omo-tasks.test.ts
#	src/components/BackgroundTasks.tsx
# Conflicts:
#	src/lib/i18n.ja.ts
#	src/lib/i18n.ko.ts
#	src/lib/i18n.zh.ts
# Conflicts:
#	CHANGELOG.md
#	src/lib/i18n.ja.ts
#	src/lib/i18n.ko.ts
#	src/lib/i18n.zh.ts
…/omo-dag-runs

# Conflicts:
#	CHANGELOG.md
#	src/lib/i18n.ja.ts
#	src/lib/i18n.ko.ts
#	src/lib/i18n.zh.ts
Base automatically changed from feat/omo-task-popover to main October 2, 2026 06:43
# Conflicts:
#	CHANGELOG.md
#	server/api.contract.test.ts
#	server/index.ts
#	server/omo-tasks.test.ts
#	server/omo-tasks.ts
#	shared/protocol.ts
#	site/demo/transport.ts
#	src/components/BackgroundTasks.css
#	src/components/BackgroundTasks.tsx
#	src/lib/api.ts
#	src/lib/i18n.ja.ts
#	src/lib/i18n.ko.ts
#	src/lib/i18n.zh.ts
#	src/lib/machineContext.tsx
#	src/lib/omoTasks.ts
@devswha
devswha merged commit 95a6a47 into main Oct 2, 2026
10 of 11 checks passed
@devswha
devswha deleted the feat/omo-dag-runs branch October 2, 2026 06:46
devswha added a commit that referenced this pull request Oct 2, 2026
…ine (#310)

## What changes
The background-task list (status line → "N background tasks") is for
what runs now. Before, it also listed every task that ended in the last
day, and every workflow, finished or not. With a day of work behind it
the list was mostly history: on a desktop it was cut at the bottom, and
on a phone it covered the last message.

Now:
- Running tasks and workflows that have not ended (running, waiting,
paused) show as before.
- Everything that ended is one line under them: `4 ended in the last day
· 2 failed`. It opens to the same rows as before (ended workflows first,
then ended tasks).
- "failed" counts failed and lost tasks and failed workflows, so a
failure is seen without opening the line.
- With nothing running, the list says "Nothing running right now" above
that line.

Asked for by the maintainer while trying the unreleased build.

## How
- `src/lib/omoTasks.ts`: `runGoing`, `endedSummary` (unit-tested).
- `src/components/BackgroundTasks.tsx` + `.css`: the fold line (a button
with `aria-expanded`/`aria-controls`; the list is `hidden` until
opened).
- Strings: "Ended in the last day" becomes "{n} ended in the last day";
new "Nothing running right now" (ko, ja, zh).
- CHANGELOG: the two unreleased entries for this list (#305, #306) now
describe it as it ships.

No server, protocol or demo-transport change.

## Checks
- `bun run typecheck`, `bun run build` pass; `omoTasks`, `i18n`,
`motion` unit tests pass (21).
- Real app in headless Chrome against a pane in the isolated test herdr
session, with task and workflow records built by the real
`omoTasks`/`omoRuns` from fixture files: folded and opened states at
1440x900 and 390x844, English and Korean. Looked at 4 of the 12
screenshots.
- Not checked: a real OmO session with a day of ended tasks; Safari.
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