Skip to content

Show and filter queued work on the board and the project feed - #208

Merged
artempartos merged 2 commits into
developfrom
feat/queued-status-filter
Sep 5, 2026
Merged

artempartos merged 2 commits into
developfrom
feat/queued-status-filter

Conversation

@artempartos

@artempartos artempartos commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The company-wide sessions list got a Queued filter with the admission queue. The project's own Sessions & Runs list did not — queued sessions were folded into Pending alongside not_started.

That is backwards: the project feed is where a project's work actually lives, so it is the first place someone looks during a capacity squeeze, and it was the one place that could not answer "what is waiting?".

Runs need a different question than sessions

A run whose step is waiting for a slot is itself running — queueing is a property of the child, not of the run. So the runs side of this filter cannot be a state list like the others:

QUEUED_STEP = :queued_step

STATUS_FILTERS = {
  "queued" => { sessions: %w[queued], runs: QUEUED_STEP },
  ...
}

filtered_runs answers it with a join on step sessions instead. The run row still reads Running, which is true; expanding it shows which step is waiting, using the nested session states the resource already carries.

Pending drops queued rather than keeping it in both, so the two filters do not overlap and disagree about the same row.

The board could not say it either

The filter was half the problem. A run whose step is waiting for capacity is itself running, so the board card painted it amber and the tooltip read Status: running — the ticket claimed work was happening while nothing was. Same on the runs feed row.

That is resolved on the server, so every consumer agrees rather than each re-deriving it: board cards, task detail, the runs feed, and the MCP task listing.

# "waiting" is a queued step session and nothing else in flight — a run with one
# step executing and another queued is still working, not parked
states.include?("queued") && (states & %w[running ready finishing]).empty?

It costs one query for a whole page, passed into the resource, rather than a join behind every ticket. The board's N+1 guard moves 8 → 9 for exactly that query, with the reason written next to it.

Blue, not amber. queued already reads as info everywhere else — StatusBadge maps it that way and the sessions list has shown blue QUEUED chips since the queue landed — so the board now says the same thing as the rest of the app. It still counts as in flight: the ticket will proceed on its own, unlike a pending gate, which deliberately clears the active flag because nothing moves without a human.

Type of change

  • Bug fix / small feature
  • Breaking change

How was this tested?

docker compose exec -T web make check_all — green in full (rails-test, rubocop, brakeman, system-test, eslint, typescript, fsd, vitest, vite-build).

Four tests added to SessionsRunsFeedTest: a waiting standalone session, a run whose step waits while the run is running, and that Pending no longer doubles as Queued.

Also corrects a test whose name outlived it — "cancelled matches runs only, since sessions have no such state" asserted something that stopped being true when sessions gained a cancelled state.

Checklist

  • I read CONTRIBUTING.md.
  • All commits are signed off for the DCO.
  • make check_all passes locally.
  • Added/updated tests.
  • Commits use descriptive messages.

@artempartos artempartos changed the title Feat/queued status filter Show and filter queued work on the board and the project feed Sep 5, 2026
A run whose step is waiting for capacity is itself `running`, so the board card
painted it amber and the tooltip read "Status: running" — the ticket claimed
work was happening while nothing was. Same on the runs feed. With a queue in
front of every session that is the state people most need to see, and it was
the one the UI could not say.

Resolved on the server so every consumer agrees: board cards, task detail, the
runs feed and the MCP task listing. "Waiting" means a queued step session and
nothing else in flight — a run with one step executing and another queued is
still working and must not read as parked.

Costs one query for a whole page, passed into the resource, rather than a join
behind every ticket; the board's N+1 guard moves 8 -> 9 for that one query and
says why. Blue rather than amber, because `queued` already reads as info
everywhere else — the sessions list has shown it that way since the queue
landed — and it counts as in flight, unlike a pending gate, which needs a human
before anything moves.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
@artempartos
artempartos force-pushed the feat/queued-status-filter branch from aa7c9f1 to 6c7d268 Compare September 5, 2026 21:30
…ran before it

"an unset variable keeps its own fallback" asserted something about an unset
SESSION_USER_CONCURRENCY_DEFAULT without ever unsetting it. A sibling test sets
it to 1, so under one ordering the assertion read that value and failed with
Expected: 2, Actual: 1 — green locally, red on CI, which is the worst shape a
test can have.

It now establishes both variables itself. Reproduced the failure by exporting
the leaked value before the run, and confirmed the fix under it.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
@artempartos
artempartos merged commit 2fd9db9 into develop Sep 5, 2026
7 checks passed
artempartos added a commit that referenced this pull request Oct 28, 2026
…rd (#591)

The server already reports a run whose step waits for capacity as `queued`
(#208), and Sessions & Runs, the collapsed chip and the recent-runs tooltip
all show it that way. The card's own status chip, rebuilt in the board
redesign, folded every in-flight state into an amber "Running", so two
cards read as running while one of them was still waiting for a slot.

Signed-off-by: Artem Petrov <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
aixle-com Bot pushed a commit that referenced this pull request Nov 7, 2026
aixle-com Bot pushed a commit that referenced this pull request Nov 8, 2026
…ng, one tmux call (task #208 CR)

- NoOutputWatchdog judges silence by the screen only for SCREEN_RULE_RUNTIMES
  (kiro_cli); other runtimes keep the log-mtime rule, for the watchdog and the
  token-refresh sweep.
- ScanNoOutputSessionsActivity reads sessions from their start (no MIN_AGE) and
  runs every 5 minutes.
- TurnEndNudge counts a reminder and forgets the confirmed screen under the row
  lock before typing, so a retry or a second scan types nothing.
- Sessions::PaneInput types text and Enter in one tmux call, used by AuthPause
  and TurnEndNudge; ScreenDigest.lines replaces the copied pane normalization.
- ScanQuotaErrorsActivity reads AuthPause's verdict with auth.paused?.

Signed-off-by: Aixle Flow <[email protected]>
aixle-com Bot pushed a commit that referenced this pull request Nov 8, 2026
… the reminder cap; match Kiro's idle prompt at any pane width (task #208 CR)

TurnEndNudge#give_up reads the session again under its row lock, as claim does, and fails it only if it still takes reminders (ready, non_interactive, workflow step, not auth-paused) and the cap is reached. SessionService.fail_session runs after the lock is released.

TurnEndDetector matches Kiro's prompt on its start, allows three lines under it and no longer needs the Credits line's session figure on the same line: at 30 columns the placeholder, the hint and the Credits line wrap. New real kiro-cli captures: 3.0.0 at 80x24, 220x50 and 30x20, and 2.34.0 at 80x24.

Signed-off-by: Aixle Flow <[email protected]>
aixle-com Bot added a commit that referenced this pull request Nov 8, 2026
…session, and judge silence by the screen (task #208) (#666)
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