Skip to content

Dashboard issue actions + pooled project store#8

Merged
EdmondDantes merged 4 commits into
mainfrom
feat/dashboard-issue-actions
Jun 29, 2026
Merged

Dashboard issue actions + pooled project store#8
EdmondDantes merged 4 commits into
mainfrom
feat/dashboard-issue-actions

Conversation

@EdmondDantes

Copy link
Copy Markdown
Contributor

Dashboard issue-management endpoints, richer trace/artifact metadata, and a storage refactor that retires the hand-rolled connection handling.

Endpoints

  • create / close / stop / delete (soft-delete) an issue from the board
  • soft-deleted issues stay in the db (history + runs) but are hidden; the SSE board feed emits issue-removed so clients drop the card
  • lazy artifact-file read, path-confined to the project folder

Trace / artifacts

  • each artifact is tagged with the step that produced it
  • millisecond trace timestamps so the waterfall can time sub-second spans
  • artifacts carry a content type (ext + mime), sniffed from content or path

Storage refactor

  • ProjectStore::open() enables TrueAsync's PDO connection pool + WAL; busy timeout via ATTR_TIMEOUT so it covers every pooled connection
  • collapse Server::readStore() / storeFor() into one cached store() — the pool gives each coroutine its own connection, so a run's writes and the dashboard's reads share one handle safely
  • extract ProjectStoreInterface; the runner and frontends depend on it
  • createIssue: 404 for an unknown project (was an uncaught 500)

Tests

  • concurrent-coroutine pool safety (INSERT + lastInsertId stays correct under interleaving)
  • artifact content-type sniffing

QA: php-cs-fixer, PHPStan level 8, full suite (212 tests) all green.

POST /issues/{id}/close moves a done issue to the Closed column (a plain
setIssueStatus; the board's polling SSE feed carries the change).

POST /issues/{id}/stop cancels an in-flight run: the run coroutine handle is
now kept in $active (was a bare bool), so stop() can cancel() it and drop the
issue back to Open. 409 when no run is active.

Also: add the run-app skill documenting how to launch the server + UI, and
ignore local .claude settings.
artifactRecords now walks the run tracking open step spans, so every artifact
record carries the innermost step name — the dashboard shows which step emitted
which artifact.
POST /issues/{id}/delete cancels any in-flight run, then marks the issue
Deleted (a new IssueStatus case) — the row, its runs and trace stay in the db
but allIssues() hides Deleted, so the board no longer shows it.

issuesStream now emits an 'issue-removed' event for an id that vanished from the
snapshot set, so clients drop a deleted (or otherwise gone) card live instead of
keeping it until reconnect.
…te handle split

The Server hand-rolled connection lifecycle — a cached read handle plus a fresh
storeFor() per run — to keep a run's writes off the shared connection. That put a
database concern in the HTTP layer and leaked it as two ways to get a store, one of
which createIssue picked wrong.

TrueAsync's PDO pool already provides exactly this: it hands each coroutine its own
connection and keeps it pinned across awaits, so one shared handle is safe for
concurrent reads and writes and INSERT + lastInsertId() stays correct.

- ProjectStore::open() enables the pool (ATTR_POOL_*) + WAL; busy timeout moves to
  ATTR_TIMEOUT so it applies to every pooled connection, not just the first
- collapse Server readStore()/storeFor()/$readStores into one cached store()
- extract ProjectStoreInterface; runner and frontends depend on it, not the concrete store
- createIssue: 404 for an unknown project (was an uncaught 500); status read from the issue
- move a docblock that had drifted onto stop() back onto answer(); drop a stray blank line
- tests: concurrent-coroutine pool safety; Artifact content-type sniffing
@EdmondDantes EdmondDantes merged commit d57e588 into main Jun 29, 2026
2 checks passed
@EdmondDantes EdmondDantes deleted the feat/dashboard-issue-actions branch June 29, 2026 15:25
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