feat(tui): hide auto-design-router noise from queue by default#707
feat(tui): hide auto-design-router noise from queue by default#707cpcloud wants to merge 4 commits intoroborev-dev:mainfrom
Conversation
Adds a show_classify_jobs config (off by default) that hides
auto-design-router byproducts from the TUI queue: rows with
job_type='classify' (the routing decision in flight) and rows with
status='skipped' (the terminal state for skipped design reviews).
Both predicates are scoped to source='auto_design' so a future
pipeline that adopts the same job_type or status for unrelated
reasons isn't silently swallowed.
Configuration:
- Global Config.ShowClassifyJobs (bool, default false).
- RepoConfig.ShowClassifyJobs (*bool override).
- Per-repo override applies when the queue is filtered to a single
repo, otherwise the global value is used. This avoids one repo's
preference leaking into a multi-repo view.
- ResolveShowClassifyJobs mirrors ResolveAutoClosePassingReviews.
Server-side filtering:
- New /api/jobs?hide_classify_jobs=true query param.
- storage.WithHideClassifyJobs adds a single SQL clause that hides
rows where source='auto_design' AND (job_type='classify' OR
status='skipped'), with COALESCE on j.source so rows with
source IS NULL aren't dropped by three-valued-logic NULL.
TUI:
- Session-only 's' hotkey toggles visibility on the fly. Footer
label tracks state ("show classify" vs "hide classify"), and the
'?' help view lists the shortcut under Filtering.
- Hitting 'l' on an auto-design classify row or terminal skipped
row shows the classifier's verdict, skip_reason, and any internal
error in a header band above the (typically empty) streamed log.
Reasoning lines are width-truncated and have embedded
newlines/tabs folded to spaces so each occupies exactly one
terminal row, keeping logVisibleLines accurate for long
classifier error blobs. Both classify and skipped triggers
require source='auto_design'.
- Effective show-classify value is cached on the model and
recomputed only on filter or session-toggle changes, keeping
render and fetch paths free of LoadRepoConfig disk I/O.
Tests cover resolver precedence, the SQL filter (with auto_design,
empty source, NULL source, and non-auto_design classify cases), the
/api/jobs endpoint, classify reasoning header rendering, width
truncation, and newline folding.
Caught by standard review 2217: classifyReasoningLines treated every classify row whose status wasn't 'skipped' as 'in progress', so a failed or canceled classifier showed an in-progress verdict alongside the error detail. That misleads operators looking at why a classifier didn't run. Branch on the row's status: queued/running stays 'in progress', while failed and canceled get explicit verdict text. Anything unexpected falls through to a verbatim '...: <status>' so a future status value can't silently regress to a misleading default. Tests cover queued, running, failed, and canceled classify rows; the failed and canceled cases also assert the header does NOT contain 'in progress'.
roborev: Combined Review (
|
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Two bugs that hid the new classify reasoning header from view, found by running the TUI against seeded auto-design rows: 1. ListJobs didn't select j.skip_reason or j.source — the columns were added by the auto-design router PR (roborev-dev#661) but the list query was not updated. Result: every job loaded by the TUI's queue or /api/jobs caller had Source="" and SkipReason="". The classifyReasoningLines helper requires Source='auto_design', so it always returned nil for list-fetched jobs and the reasoning header never rendered. GetJobByID already selects both columns; ListJobs is now in sync. 2. The TUI's log view bounced back to the queue with a "No log available for this job" flash whenever the on-disk log file was missing. That fires for every classify/skipped row because the classifier runs as a one-shot SchemaAgent.Decide call and never writes to the streaming log. So even with the data fixed, the user couldn't see the reasoning header — the view exited before it rendered. Now: when the job has classifyReasoningLines output, stay in the log view with an empty body so renderLogView's header band shows the verdict, skip reason, and any classifier error. Verified manually with an isolated daemon + seeded auto_design rows; captures show the verdict + reason + detail rendering correctly for both terminal skipped and failed classify states.
roborev: Combined Review (
|
- render_log.go: distinguish degraded auto-design skips from clean ones. completeClassifyAsSkip writes status=skipped with job.Error populated when the classifier execution fails, but the previous branch labeled both kinds of skipped rows as "no design review needed" — misleading operators about a classifier failure. Now branches on job.Error: empty → "no design review needed", non-empty → "Auto-design classifier failed (skipped)". - render_log_classify_test.go: rename the failure-path case to assert it now contains "classifier failed" and does NOT contain "no design review needed"; add notWant to the clean-skip case to lock in that it does NOT contain "failed".
roborev: Combined Review (
|
|
False positive on the latest roborev-ci finding. The review claims In fact the scan targets are // internal/storage/hydration.go
type reviewJobScanFields struct {
...
SkipReason sql.NullString
Source sql.NullString
}The call site at if fields.SkipReason.Valid {
job.SkipReason = fields.SkipReason.String
}
if fields.Source.Valid {
job.Source = fields.Source.String
}
|
Summary
show_classify_jobsconfig (off by default, global + per-repo*booloverride) that hides auto-design-router byproducts from the TUI queue: rows withjob_type='classify'and rows withstatus='skipped'. Both predicates are scoped tosource='auto_design'so a future pipeline that adopts the same job_type or status for unrelated reasons isn't silently swallowed./api/jobs?hide_classify_jobs=truequery param backed bystorage.WithHideClassifyJobs. SQL usesCOALESCEonj.sourceso rows withsource IS NULLaren't dropped by NULL three-valued logic.shotkey toggles visibility; the queue footer label and the?help view both reflect the current state.lon an auto-design classify or terminal skipped row renders the classifier verdict,skip_reason, and any internal error in a header band above the (typically empty) streamed log. Reasoning lines are width-truncated and have embedded newlines/tabs folded to spaces so each occupies exactly one terminal row, keepinglogVisibleLinesaccurate. Verdict text branches onjob.Statusso failed/canceled classifiers don't claim "in progress".LoadRepoConfigdisk I/O.