Repository navigation
feat(runs): FAC-160 Mine includes runs an integration trigger started for me - #1192
Conversation
…on trigger started for me Adds a mine=true run list filter (created by the caller or sender matched to the caller) to the list query, stream matcher, BFF, MCP runs.list and docs. The Runs tab Mine chip sends it; the Started by me chip is removed. Signed-off-by: kora-agent <agent@runkora.io>
Visual WalkthroughThe Mine filter now sends Mine filter entry pointsThe Mine chip and the MCP flowchart TB
subgraph sUI [Runs page]
chip[Mine chip]
gone[Started by me chip]
params[runFilterParams]
end
subgraph sProxy [Frontend proxy]
fwd[FILTER_PARAMS allowlist]
end
subgraph sMCP [kora MCP server]
tool[runs.list tool]
end
subgraph sAPI [Agents API]
handler[handleListRuns]
parse[Mine query filter]
repo[ListRuns SQL]
end
chip -->|mine=true| params
gone -.->|was started_by_user me| params
params -->|keeps mine param| fwd
fwd -->|forwards to API| handler
tool -->|mine=true query| handler
handler -->|parses mine value| parse
parse -->|adds caller match| repo
classDef added fill:#1f883d,stroke:#1a7f37,stroke-width:2px,color:#ffffff
classDef changed fill:#bf8700,stroke:#9a6700,stroke-width:2px,color:#ffffff
classDef removed fill:#cf222e,stroke:#a40e26,stroke-width:2px,stroke-dasharray:5,color:#ffffff
classDef context fill:transparent,stroke:#8c959f,stroke-width:1px,stroke-dasharray:3,color:#8c959f
linkStyle default stroke:#8c959f,stroke-width:2px
class chip,params,fwd,tool,handler,parse,repo changed
class gone removed
style sUI fill:transparent,stroke:#8c959f
style sProxy fill:transparent,stroke:#8c959f
style sMCP fill:transparent,stroke:#8c959f
style sAPI fill:transparent,stroke:#8c959f
Legend: green = added, amber = changed, red = removed, dashed grey = context
Mine query pathA request with sequenceDiagram
participant R as Runs page
participant A as Agents API
participant P as Postgres
R->>A: list runs with mine=true
alt mine is not true
A-->>R: error mine must be true
else mine is true
A->>P: query runs for caller
P-->>A: created or started by caller
A-->>R: runs page
end
|
There was a problem hiding this comment.
Walkthrough
Adds a mine=true run list filter, created_by = me OR started_by_user_id = me, used by the list query, stream matcher, Mine chip and MCP runs.list. The Started by me chip is removed.
| Severity | Finding | Location |
|---|---|---|
| Align the "View runs" link with the count it sits beside | started-for-me.tsx:18 |
Review effort: Medium
Risk: Medium, new run list filter in query and stream matcher
Coverage: 16 of 16 files reviewed
Where to focus
| Area | Why it needs a person |
|---|---|
my-usage/_components/started-for-me.tsx |
Decide whether the link target should match the counted set. |
backend/internal/agents/run_page_postgres_test.go |
Postgres list-versus-matcher cases were not run. |
backend/internal/agents/postgres.go |
OR filter on two columns; index use not checked. |
Changes by area
| Area | Files | Change |
|---|---|---|
backend/internal/agents |
5 | mine filter in query, matcher, parser and tests |
backend/internal/koramcp |
1 | mine argument for runs.list |
docs |
2 | Describe the mine filter |
frontend |
8 | Mine chip sends mine=true; Started by me chip removed |
Checked
Stream matcher and list query agreement; empty-subject handling; frontend filter parsing.
Signed-off-by: kora-agent <agent@runkora.io>
There was a problem hiding this comment.
Walkthrough
Relabels the My usage link to "View all my runs" and updates its test assertion to match. The link still targets quick=mine.
No new findings.
Fixed since the last review: Align the "View runs" link with the count it sits beside.
Review effort: Low
Risk: Low, link label and test assertion only
Coverage: 1 of 1 files reviewed
Where to focus
| Area | Why it needs a person |
|---|---|
my-usage/_components/started-for-me.tsx |
Confirm "View all my runs" wording suits the integration-started count beside it. |
Checked
Link label and test assertion agreement.
Signed-off-by: kora-agent <agent@runkora.io>
There was a problem hiding this comment.
Walkthrough
Replaces the "true" case literal in parseRunFilters with strconv.FormatBool(true). Behavior is unchanged.
No new findings.
Review effort: Low
Risk: Low, one-line literal change in query parsing
Coverage: 1 of 1 files reviewed
Where to focus
| Area | Why it needs a person |
|---|---|
backend/internal/agents/run_page.go |
Confirm the goconst workaround is the form you want. |
Checked
Run filter parsing in run_page.go.
|
QA blocked for work-item FAC-160 (Runs tab: Mine includes runs an integration trigger started for me), head
|
|
QA passed at head
The PR head is unchanged since those results, so they still apply. |
What and why
The Runs tab's Mine chip missed runs an integration trigger started for me (matched through my account link); they showed only under a separate Started by me chip. This adds a
mine=truerun list filter, meaningcreated_by = me OR started_by_user_id = me(an empty subject matches nothing). It is applied in the list query and the stream matcher, so the list and live stream agree.created_byandstarted_by_userstill work for API callers. The Mine chip now sendsmine=true, and the Started by me chip is removed. The My usage "started for me" link now points atquick=mine. The kora MCPruns.listtool takesmine, and the docs describe it.Work-item: https://plane.clearroute.io/kora/browse/FAC-160/
How it was tested
go build ./...andgo test ./internal/agents/ ./internal/koramcp/...pass, with new cases: the caller's own run, a run whose sender matched the caller, another person's run, no subject, and parser validation formine.pnpm tsc --noEmit,pnpm lint(one existing warning), and the unit tests for runs and my-usage pass. The BFF integration tests for runs pass.make test-postgresandmake check. The sandbox has no Docker or Postgres. I addedMinecases to the Postgres list-versus-matcher agreement test inrun_page_postgres_test.go, and they are unverified.go test ./internal/agents/sessionmanagerfails onTestACPExecSpawn_CancelKillsProcessGroup. I did not touch that package.Checklist
make checkpasses. Not run here.