Skip to content

Add desktop queue visibility sidecar and task-origin metadata#32

Merged
steve-the-edwards merged 16 commits intoblock:mainfrom
steve-the-edwards:sedwards/no-ticket/queue-visibility
Apr 27, 2026
Merged

Add desktop queue visibility sidecar and task-origin metadata#32
steve-the-edwards merged 16 commits intoblock:mainfrom
steve-the-edwards:sedwards/no-ticket/queue-visibility

Conversation

@steve-the-edwards
Copy link
Copy Markdown
Collaborator

@steve-the-edwards steve-the-edwards commented Apr 24, 2026

Summary

  • Persist task-origin metadata in the queue database and metrics log so queued and running work can be attributed by agent, repo, branch, and worktree.
  • Add a Compose desktop sidecar for real-time queue visibility with:
    • queue scope and lane views for running and waiting work
    • agent grouping by repo and worktree context
    • live queue-server inspection with historical fallback context
    • ADB emulator lane matching and missing-device warnings
  • Harden the queue and sidecar follow-up paths discovered during review and manual relaunch testing:
    • share queue insertion logic and collapse Git metadata collection into a single best-effort probe
    • tighten schema migration handling and keep SQLite integer coercion bounded
    • infer sidecar data dirs from TASK_QUEUE_DATA_DIR
    • make sidecar process inspection handle env-heavy ps eww output and installed python .../agent-task-queue launches
    • treat an existing queue.db without the queue table as schema bootstrap instead of a hard error
    • sanitize public test fixtures so the branch does not carry internal repo names or real session identifiers

Testing

  • uv run pytest tests/test_queue.py tests/test_tq_cli.py
  • cd desktop-sidecar && ./gradlew desktopTest --tests com.block.agenttaskqueue.sidecar.EnvironmentSnapshotTest --tests com.block.agenttaskqueue.sidecar.QueueSnapshotTest --tests com.block.agenttaskqueue.sidecar.MetricsSnapshotTest --tests com.block.agenttaskqueue.sidecar.TaskQueueDatabaseTest

@steve-the-edwards
Copy link
Copy Markdown
Collaborator Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6a258e5e1e

ℹ️ 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".

Comment thread tq.py Outdated
Comment thread tq.py Outdated
@steve-the-edwards steve-the-edwards marked this pull request as ready for review April 24, 2026 19:26
Splits the dashboard into a two-column layout: queue activity on the
left, agents + emulators + servers on the right. Adds a hero strip of
Running / Waiting / Agents / Emulators stats that shifts to warning /
danger tints when queues back up or configured emulator lanes lack
devices.

Scopes now sort by pressure (waiters first, then utilization) and
surface BACKUP / AT CAPACITY chips plus a slot meter in the header.
Each lane renders as a timeline: running slots with agent-colored
TaskPills (Amp / Claude / Codex / Cursor / Zed / Windsurf), then a
divider and the waiting queue as de-emphasized pills with hover
tooltips showing full command, agent, branch, pids, and age.

The right pane groups live tasks by agent with per-context run/wait
breakdowns, pairs each configured emulator lane side-by-side with its
matching ADB device (or a red "missing" placeholder), and keeps a
compact server list agent-colored.

Deletes the orphaned SummaryRow / CapacityOverview / ScopeOverview /
TaskSection / ScopeDetails / QueueLaneCard / TaskRow / AdbSection /
SlotStrip / MetaBadge / StatusBadge / AdbDeviceRow / SectionCard /
InfoBanner helpers that were left over from the earlier layout.

No changes to the snapshot / data layer — existing desktopTest suites
still pass.
@steve-the-edwards steve-the-edwards marked this pull request as draft April 24, 2026 20:55
@steve-the-edwards steve-the-edwards marked this pull request as ready for review April 27, 2026 13:22
@steve-the-edwards
Copy link
Copy Markdown
Collaborator Author

@codex review

@steve-the-edwards
Copy link
Copy Markdown
Collaborator Author

@builderbot0 review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2597dcf7fc

ℹ️ 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".

Comment thread tq.py Outdated
@steve-the-edwards
Copy link
Copy Markdown
Collaborator Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e6635db8aa

ℹ️ 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".

Comment thread queue_core.py Outdated
@steve-the-edwards steve-the-edwards changed the title Improve queue visibility and Amp session restart tooling Add desktop queue visibility sidecar and Amp restart tooling Apr 27, 2026
@steve-the-edwards steve-the-edwards changed the title Add desktop queue visibility sidecar and Amp restart tooling Add desktop queue visibility sidecar and task-origin metadata Apr 27, 2026
@steve-the-edwards steve-the-edwards merged commit ccb94ae into block:main Apr 27, 2026
8 checks passed
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.

2 participants