The stage detail pane covered the status bar. Introduce one shared
paneSafeArea() (WindowInsets.safeDrawing: status bar, display cutout,
navigation bar, gesture area and IME) and apply it from the live window
insets across the pane stack:
- SlidingPaneStack uses it (unioned with systemGestures) for the covered
peeks' strip geometry.
- Each pane's Scaffold reserves it once via contentWindowInsets, and its
TopAppBar reserves the top/horizontal part, so no pane sits under the
status bar, a cutout, the navigation bar or the IME. Applied to the five
stacked panes and SettingsScreen.
- The connection banner owns the top inset and the NavHost consumes it
(paneSafeArea().only(Top), was statusBars) so the inset is never doubled.
- The floating destinations pill clears the same safe area, so the keyboard
no longer hides it.
Scrollable content stays inside the remaining space rather than clipping.
android/README.md records the design and emulator-5554 verification.
Add a per-list sort control to each top bar and persist the choice in
SharedPreferences so it survives restarts.
- ui/screens/ListSort.kt: PipelineSort and RunSort enums plus pure
comparators with explicit tie-breaks, and sortPipelines/sortRuns.
ServerOrder/NewestFirst remain the defaults; a still-executing or
unparseable-timestamp run sorts last.
- ui/components/SortMenu.kt: the shared top-bar control, a distinct
IconButton opening a Material 3 DropdownMenu of every option plus a
divider and Reset, with the active choice checked.
- data/SettingsRepository.kt + ui/AppViewModel.kt: store the sort key
per list as a StateFlow; fromStorage falls back to the default for a
stale/unknown/blank value.
- ui/Format.kt: share parseInstant and durationSeconds so the printed
duration and the sort key cannot disagree; PipelineLastRun.kt reuses
the shared latest-run fold.
- PipelineListScreen.kt/RunHistoryScreen.kt wire the control and sort;
groupRunsByDay preserves the comparator's order.
- ListSortTest.kt covers the comparators and storage fallback;
RunGroupingTest.kt gains an explicit-order case.
Verified on this tree with :app:testDebugUnitTest (167 tests, 0
failures), assembleDebug, and emulator-5556 persistence, the sort
control, and Reset; captured in android/README.md.
Give every pane one shared slide spec, a fixed 300 ms duration and a symmetric cubic-bezier easing, so a close is the open curve run backwards at the same duration; several levels that pop in one tap now stagger so each reverses in order from the top.
The stack mounts a level while it is open or still sliding out and calls the pane only then, and rememberPaneContent retains each closing pane's full parent identity (item/version/section, stage key, visit). A closing pane therefore keeps rendering the content that opened it instead of vanishing or falling back to an empty node, and a fully closed level composes nothing. Geometry, tokens and insets are unchanged.
Adds three pure unit cases for the symmetric easing and the stagger rule; documents the change and its emulator verification in android/README.md.
Add the server-side half of the brokered chat path (route B): the
opencode.Chat adapter forwards chat_prompt to POST
/api/session/{id}/prompt through the owned Connection.Call translation
and derives chat_event frames from the authenticated /api/event SSE
firehose (text and reasoning deltas, tool parts with their status
transitions, step and usage). Every pushed frame carries a stable
session and message id, with a last-message-id fallback so step/tool
events that omit the assistant message id stay attributable.
The /connect handler keeps per-session retained state (chatHub) capped at
1 MiB with least-recently-updated eviction at 128 turns, so a
reconnecting client re-syncs through chat_messages instead of replaying
deltas the OpenCode per-session log never resends. Prompt dispatch
subscribes before posting and buffers pre-ack frames to preserve order,
and cancels the stream on disconnect so no goroutine leaks. chat_sessions
and chat_create are declared but not yet brokered: they answer with an
explicit protocol error rather than the generic Pong.
Reuse the existing transport, validation and normalization; no second
OpenCode transport or credential path is introduced.
Tests: protocol golden round-trip, adapter normalization + v1/v2 Call
translation, and handler ack/stream/validation/resume/disconnect, plus a
real-adapter no-tool evidence harness.
Each pipeline row in the Android list now renders its most recent run:
the status chip, how long ago it started, its recorded duration and its
run id. Pipelines that have never run say "no runs recorded" instead of
leaving a blank line, and the line is withheld until the run history has
loaded so a missing history is never reported as "no runs".
The list_runs history already arrives whole (id DESC), so the join is
client-side: PipelineLastRun.kt folds it onto a Map keyed by pipeline id,
recency decided from the timestamps with the higher run id breaking an
exact tie, and formats "ago · duration · run N", omitting any genuinely
absent fragment. The change is android/-only, adds no server field or
dependency, keeps the existing title/secondary structure and selected-row
highlight, and never starts a run.
PipelineLastRunTest covers most-recent-wins, no runs, unknown pipeline
id, equal timestamps, a bad timestamp, an unknown status word, the
formatRanAgo scales and the "no runs recorded" wording. README records
the verification: :app:testDebugUnitTest (153 tests, 0 failures) and a
full --rerun-tasks assembleDebug (17,863,337 bytes, sha256 b2255066…).
Rewrite SKILL.md to state the stance (reconnoitre, then route all work
through Pipelines runs; manage and debug, never implement), keep the
existing authoring/operations index, and route to four new references.
Add references/orchestration.md (stance, work items, brief template,
hard constraints, pipeline choice, running and watching),
references/lanes.md (worktrees, devices, sync/merge, restart-replay
cursor fix), references/debugging.md (eight symptom/confirm/do
playbooks) and references/delivery.md (artifacts, LAN URLs, WIP naming,
install boundaries), each with a clearly labelled project example where
Android/device specifics apply.
Append orchestration verification habits to references/verification.md
and add the four new files to install.go's managed inventory.
Add the internal/protocol types the phone needs to talk to OpenCode chat
through the Pipelines server (route B): the chat_* request/response type
constants (sessions, create, prompt, messages, interrupt, reply) and the
server-pushed chat_event frame, plus the part/status/role/tool-state/decision
constant sets and payload structs modelled on the verified OpenCode shapes -
an assistant turn is a list of parts (text | reasoning | tool), and a tool
part carries name, executed, state.status (streaming | running | completed |
error), state.input, state.content, state.metadata, state.error and
epoch-millisecond timings.
Add eight optional omitempty chat fields to the shared Message envelope, so
older peers ignore them, and a golden round-trip test covering every new type,
an exact-JSON pin of a tool chat_event frame, envelope preservation and
omitempty. go test ./internal/protocol/... passes.
The pane's Scaffold already painted an opaque colour, but it was the app
background role, identical to the peeks it slides over, so it read as
"no background" and its rows ran together with the covered pane's compact
identity.
Paint the whole pane one theme container role: StageDetailPane gains
paneContainerColor() = colorScheme.surfaceContainer and applies it to the
Scaffold container, the TopAppBar and the visit PrimaryScrollableTabRow, and
StageSection passes it to the shared SectionHeader, which gains an opaque
containerColor parameter defaulting to the previous background. The pane now
fully covers the area it occupies, including under a sticky section header,
and sits a tuneful step above the app background it covers.
Move the shared cards one step up so a card stays a card on the new sheet:
CodeBlock and the artifacts ArtifactRow use surfaceContainerHigh and the
full-size artifact dialog uses surfaceContainerHighest. No geometry, inset or
dependency changes; all colours come from the existing theme.
Verified with gradle :app:assembleDebug and :app:testDebugUnitTest (137 tests,
0 failures) and by capturing the pane open over the graph and the Timeline at
both window widths on emulator-5554. android/README.md records the change and
evidence.
Add a README evidence subsection for the committed run-status colour change at 24584d8: the unit suite (143 tests, RunStatusPaletteTest 7/7 incl. contrast), assembleDebug with the published APK size and sha256, before/after pixel-sampled captures on emulator-5556, and the APK publish location and LAN URL.
Run status was mapped onto Material roles, so a succeeded run read amber
(tertiary) and a running run read mint (primary). Replace that mapping with an
app-owned RunStatusPalette: Running/Active blue, Succeeded green, Failed the app
error red, Interrupted amber, Canceled muted grey, Queued neutral grey and
Unknown a low-key surface grey, each with a one-line rationale. runStateColor is
now a pure lookup over the palette.
Keep each state's distinct material glyph and text label so status is never
colour-only, and add a WCAG-AA contrast test for every status colour against the
dark surface plus hue-specific assertions.
Leave the graph's stage-outcome palette untouched. The timeline's step chips are
a stage outcome, not a run status, so point them at the shared graphColors/
outcomeColor factory (extracted from WorkflowGraph) to agree with the graph, and
factor the shared ColoredChip pill out of StatusChip so neither repeats the
layout. Document the change and its evidence in android/README.md.
A stage opened from a run (Timeline, run graph or run stage list) now leads
with the run-side result instead of the stage's own definition: status,
outcome, duration, visit and target, then the visit's results in the order
Artifacts (gallery first), Output, Input, then the remaining run evidence
under This run. The stage's full definition (type, prompt, output contract,
outcomes, model, provider, configs, tools, limits, memory, notify) moves into
one collapsed "Stage definition" section at the bottom.
StageDetailPane gains a runContext flag: RunStagePane passes true and gets the
collapsed-definition default, while PipelineStagePane passes false and keeps
the definition expanded, since it is then the pane's only content.
rememberSectionExpansion gains an initiallyExpanded set (part of the save key)
so the seed respects an operator's own expand/collapse choices without
inheriting them across contexts.
Nothing visible before is removed - the previous Model/Provider headline
promotion is reverted and those facts remain reachable inside the expanded
definition. The visit tabs and the collapsed-by-default behaviour of the other
sections are unchanged. android/ only; no dependency added.
Updates android/README.md and StageDetailSheetTest.kt accordingly.
The artifact grid could show failure placeholders that were never earned:
a server-relative artifact url that failed to resolve against the configured
server was fetched anyway and blamed with the "!" failure mark, and the
loading state was a bare "…" text.
- Pass the resolved url (nullable) into ArtifactImage; a null short-circuits
to a new distinct Unavailable state (LinkOff glyph) and issues no request,
so a fetch that was never attempted is never drawn as a failure.
- Reserve Error/"!" for a fetch or decode that was actually attempted.
- Replace the "…" text with a real Material 3 CircularProgressIndicator.
- Resolve gallery artifact urls in one shared helper (resolvedArtifactUrl)
so the image tile and the non-image row cannot disagree; non-image
artifacts keep their file-type icon.
- Add unit tests covering resolution against the configured server and the
null (unconfigured) case.
Add android/scripts/capture_png.sh, which captures on-device (screencap -p -d <SurfaceFlinger id>) to /sdcard, pulls the file, and validates PNG magic bytes plus the reported type, deleting and failing on anything that is not a real image. Document the multi-display warning failure mode and the required helper in android/README.md so every UI-capturing run captures and validates instead of writing adb screencap straight to a file.
On a wide window, a covered pane in the stack used to render a squeezed
copy of a full pane, so a covered entry showed a truncated title and a
crushed tab rail. A covered pane now renders only a compact identity: a
centred title plus at most one status/subtitle line, with no tab rail,
list, gallery or scroll body drawn into the sliver.
- SlidingPaneStack's pane lambda receives a covered flag; on a wide window
a covered level composes only the new PaneIdentity, while the list, both
detail screens and the stage pane early-return from their covered branch
after their data-loading effects.
- Adds MIN_COVERED_PANE_WIDTH_DP (112.dp); peekStripsDp shows at most
budget / MIN_COVERED_PANE_WIDTH_DP covered peeks and folds the oldest
levels into a single "<n> more" edge indicator rather than squeezing
them below the minimum.
- The fixed PEEK_BUDGET_DP (224.dp) and the constant active-pane width
are unchanged; the peek tap, Back and the narrow layout keep the same
behaviour.
- Rewrites SlidingPaneStackTest (10 cases) for the fold rule, minimum
width, constant active width and inset/geometry invariants, and records
the evidence and the unreachable-fold gap in android/README.md.
Surface a run stage's recorded Model and Provider configs in the stage
pane's always-visible headline instead of leaving them inside the
collapsed Definition section, so the operator sees them without expanding
anything, and stop rendering them twice.
- StageDetailPane.kt gains the pure STAGE_CONFIG_HEADLINE_LABELS
({"Model", "Provider"}), stageConfigHeadlineFields(definition) and
remainingDefinitionFields(definition). StageDetailBody renders
headlineFields(runFields) + stageConfigHeadlineFields(definition) as the
headline and remainingDefinitionFields(definition) inside the collapsed
Definition section; both derivations are remember(definition)-keyed and
the run-evidence split stays runStepFields/headlineFields/evidenceFields.
- The definition-only, never-visited stage keeps its existing look; the
Definition section no longer repeats Model/Provider because they are now
headline facts, and everything else stays as before.
- StageDetailSheetTest adds
definitionModelAndProviderArePromotedToTheHeadlineWithoutDuplication and
aDefinitionWithNoConfigsPromotesNothing.
- android/README.md records the pass: the reported "content lost" symptom
is not reproducible at 791d3dd (the run-61 definition-only screenshots
are the Pipelines destination), the promoted facts are the real gap, and
the unit tests (132/0), assembleDebug, device verification on
emulator-5554 and the APK publish are noted with what was not verified.
Selecting a section in a run or pipeline detail now cross-fades the body in
place rather than sliding it sideways, so a tap on the rail or tab row is an
ordinary tab change with no lateral motion and nothing to swipe.
- DetailTabs.kt drops the HorizontalPager for section bodies and renders only
the selected section behind a short Crossfade (SECTION_SWAP_MILLIS = 180).
Level navigation (list -> detail -> stage pane) still slides via the
unchanged SlidingPaneStack.
- Each section's saved state (its LazyColumn scroll) is kept under its stable
tab key with rememberSaveableStateHolder().SaveableStateProvider, so
returning to a section restores where the operator left off instead of
resetting it.
- The rail/tab-row selected state and tab semantics are unchanged.
- Update the two call sites' stale "pager" comments and refresh the README
section describing the section selector.
Replace the per-level peek with a fixed total peek budget on wide windows
and drop the stack entirely on narrow ones, so a folded phone loses no
width to dead peek space and a deep stack never reserves more than the
budget.
- SlidingPaneStack gains a `wide` parameter (the callers pass the existing
isWideLayout value). On a narrow window the budget is 0dp, so every
pane's open offset is 0 and each opened pane is a full-window screen
that springs in over the last; Back, the gesture and the pane's own back
control pop one level and nothing is left on the left.
- On a wide window peekBudgetDp (PEEK_BUDGET_DP, 224dp) is the fixed total
space shared between the covered panes, independent of depth, so the
active pane's left edge is always exactly the budget and its width
(hostWidth - budget) stays constant as levels are added. paneOpenOffsetsDp
widens the leftmost strip first so it stays tappable after the start
inset (min of PEEK_WIDTH_DP and the platform minimum interactive size),
then splits the rest evenly. peekBudgetDp clamps so the active pane never
collapses below MIN_ACTIVE_PANE_WIDTH_DP and paneWidthDp is never
negative. All geometry is derived from the named tokens, the measured
host width and the system insets - no new literals.
- The peek-strip hit targets now come from the shared offsets, and panes
remain opaque, inset inside the safe area, hidden from accessibility when
covered, and opening/closing stay exact mirrors through the same
animators. PaneState documents the narrow (no peek) rule.
- SlidingPaneStackTest is rewritten around the pure budget geometry (narrow
spends no peek, the wide active pane is constant width, four levels share
one budget with every strip tappable, the budget clamps, tiny hosts never
go negative), and android/README.md records the pass, its evidence and
what was not verified.
Turn the stage detail into the rightmost pane of a bounded three-level
stack and show every run artifact in a summary gallery.
- The stage detail opens as a real level-2 pane from both entry points (a
Timeline row and a graph node). StageDetailPane is wrapped in the same
Scaffold/TopAppBar with a back arrow as the other panes, and its
identity/result facts (status, outcome, target, duration, visit, model
target) render outside any collapsible so a fresh pane is never empty.
StageDetailSheet, ModalBottomSheet and RightSlidingPanel are removed.
- SlidingPaneStack replaces SlidingMasterDetail: pane 0 fills the host,
panes 1 and 2 overlay at peek*level, each covered pane keeps one
tappable peek strip, and MasterPane/backStep/popTo/MAX_PANE_DEPTH are
the pure model. The peek tap, the pane back arrow, the system Back
button and the predictive-back gesture all pop exactly one level.
- New pure runArtifactGroups(steps) groups a run's artifacts by stage and
visit (stable order, duplicates kept, empty run -> empty) and
artifactsEmptyMessage distinguishes the running "capture pending" case.
ArtifactGallery renders image thumbnails (tap opens full size) and
non-image rows with name, size, content type and open/copy; urls resolve
through ServerUrl, never a hardcoded host.
- Run Summary shows the run gallery and the stage pane shows that visit's
group, keeping the existing per-visit artifacts summary and notes.
- Tests updated/added (PaneStateTest, SlidingPaneStackTest,
ArtifactGroupsTest, ArtifactGalleryTest, StageDetailSheetTest, refreshed
DetailTabsTest/PipelinesNavTest, CollapseRemovalTest kept green) and
android/README.md records the pass, evidence and not-verified list.
Implements four Android-only client changes (no server, Go, installer or
Docker changes; nothing under android/ was left uncommitted).
- Per-visit artifacts: model StageArtifact{name, size_bytes, content_type,
url} plus artifacts/artifacts_skipped/artifacts_truncated on RunStep with the
exact internal/protocol/runs.go wire names, covered by ProtocolModelTest.
Add a dedicated artifacts section to the stage detail sheet: one row per
file with name, humanBytes size and content type, open (ACTION_VIEW) and
copy-link actions, resolving the server-relative url against the configured
server URL (never a hardcoded host) and disabling those actions with a hint
when none is set. Images render an inline thumbnail with a full-size view on
tap; other types get a type icon. Empty/partial copy matches the TUI
("capture pending", "not recorded for this visit", partial-capture notes).
Timeline rows carry a subtle AttachFile indicator via a pure hasArtifacts
helper. Pure helpers (humanBytes, resolveArtifactUrl, isImageContentType,
artifactsSummary, artifactCaptureNotes, artifactMetaLine) carry unit tests.
- Collapsed defaults and self-describing titles: rememberSectionExpansion now
tracks the set of expanded keys (default emptySet) so every inner section in
the run detail and pipeline detail starts collapsed while operator choices
still persist across configuration changes. Evidence sections are titled
from the correlated step/stage/visit and backend identity instead of a bare
index; field sections fall back to their prefix so a blank key never yields
an empty title. Covered by DetailTabsTest.
- Single top inset: zero the outer Scaffold contentWindowInsets so the inner
Material 3 app bars own the status-bar inset once; the connection banner
owns the status-bar inset while visible (NavHost consumes it below), and the
floating destinations pill clears the navigation bar.
- Publish the debug APK as a run artifact named by the short SHA, documented
with the verified LAN URL and sha in android/README.md.
Verification (unit tests, assembleDebug, live-server APK and run 55 step 4
artifact fetches, emulator narrow/wide drives) is recorded in android/README.md.
Native installs left Docker-era harness profiles in harnesses.json, so every
authoring launch failed trying to reach a Docker service, and a retained draft
bound to the old Docker server was silently projected onto the configured one.
- harness: add Profile.Mode and VerifyDockerLink as the single mode/verification
helpers. `harness setup --host` configures or converts a host profile and
clears docker_directory; reconfiguring a Docker-linked profile re-verifies the
recorded directory still owns compose.yaml and fails naming it instead of
saving a link that cannot launch. Setup's summary and `harness list` (via the
new List/ListView shape) report the resulting mode and, for Docker, the
directory, without changing the stored Config schema.
- setup-native.py: after build/install-skill it writes host (no docker_directory)
profiles for the detected harnesses, defaulting to the detected OpenCode profile
rather than a stale pi default, taking models from --model or the existing valid
profile and never inventing one; it clears a stale Docker link and preserves
unrelated keys/profiles. Detection-only: no harness install, upgrade or download.
- draft: add Draft.Resolve, the shared mismatch helper, which projects a draft
onto the configured server and returns a dual-URL notice. CLI validate/submit
and the TUI draft browser use it so a foreign draft is never silently
retargeted; the TUI pre-wraps the notice to the panel width.
- Tests cover the Docker->host and host->host transitions, the missing-directory
failure, installer write/migration (Python), and the CLI/TUI notice, using the
real config file path in a temp dir.
- Update help text, README, docs and the packaged authoring skill reference to
describe host as the default and the Docker-linked case.
- GraphPalette: a curated fixed palette plus a deterministic outcome-to-index
mapping (no hashCode() % n); every colour is measured at >= 4.5:1 against the
dark surface. Node fills differ by kind, and selection inverts the fill.
- Run detail: the Steps tab becomes Timeline, one compact line per recorded
visit. The stage detail sheet takes the ordered visits plus an
initialVisitIndex and shows a visit 1..N tab row only when there is more than
one visit; the timeline opens the tapped visit, the graph the most recent.
- List pane: pipelines and runs share one ListRow (flat surface, thin divider,
leading element, title plus secondary line) with a tonal selected row, and the
wide list pane collapses to a 56dp strip.
- Navigation: the bottom bar becomes a floating three-icon destination pill at
the bottom right with Role.Tab selected semantics, used on both window widths,
with 88dp reserved so nothing scrolls under it.
- Icons come from the already-declared material-icons-extended; no new
dependency.
Implemented by pipeline run 55 (pipeline 9 v6). Its ui_reviewer stage failed on a
malformed model result rather than on this work, so the change was verified by
hand: assembleDebug plus 93 unit tests pass, and the run's captures were
reviewed (graph colours per outcome, Timeline entries, visit tabs, selected list
row, floating pill).
Fix four stage failure-handling and observability defects (A2, A3, A6, A9).
- A2: add safeToReplay(def) as the single definition of retryable post-admission
work - only an explicit tools block that selects neither edit nor shell. The
agent/pi WorkStarted guards now break only when the stage is not safe to
replay, so read-only stages genuinely retry a post-admission timeout while
mutating and legacy-bundle stages still never replay admitted work.
- A6: re-emit a malformed final result on an explicit read-only stage up to the
retry budget, preserving format_repairs evidence; mutating stages keep the
immediate return and their session.
- A3: timed-out stages retain usable evidence. waitForSessionIdle records one
bounded sanitized OperationEvidence on deadline; the agent deferred cleanup
does a bounded best-effort latest-assistant readback and settles knowable V2
usage; RetainSession adds a retained_session pointer to failed step
transcripts so the session is visible beneath the BoundTranscript threshold.
- A9: a stage outcome routed to #failure now yields a non-empty run diagnostic
("stage <name> returned outcome <outcome>") while preferring an existing step
diagnostic.
Adds focused stage and server tests for retry safety, malformed-result
re-emission, timeout evidence retention and run-level diagnostics; updates the
packaged skill references and docs/cli.md, docs/model-results.md.
Every agent stage now writes into a per-run/step artifacts directory under
the data dir (<data>/artifacts/<run>/<step>), passed to Pi as
PIPELINES_ARTIFACTS_DIR, exposed on the OpenCode client env seam, and stated
in the agent prompt boilerplate so agents save images, screenshots, reports
and logs there.
After each step the server scans that directory with a bounded, symlink- and
traversal-safe inventory (os.OpenRoot + Lstat + O_NOFOLLOW) recording name,
size_bytes, content type (extension then 512-byte sniff fallback) and URL,
enforcing max files, per-file bytes and total bytes while counting skipped
and truncated entries. A missing, unreadable or oversized directory yields
only a best-effort diagnostic and never changes the step outcome.
The list is carried on protocol.RunStep as Artifacts []StageArtifact plus
skipped/truncated counters (omitempty, backwards compatible), persisted in a
new step_artifacts table keyed (run_id, sequence) alongside the
notifications/file-changes tables and loaded by GetRun.
GET /artifacts/{run}/{step}/{name} on the existing handler serves the bytes
with http.ServeContent, so Content-Type, Content-Length, HEAD and Range
(206/416) come from the stdlib; unknown runs/steps, absolute paths,
traversal, symlink escapes and non-regular files are refused.
The TUI lists each selected step's artifacts (name + human size) in the
retained-evidence section and adds an artifacts summary in the style of the
file-changes summary. Adds docs/stage-artifacts.md linked from README and an
artifacts subsection to the packaged operations skill reference.
Tests cover the scan records and caps, missing/oversized directories,
HTTP HEAD/Range/traversal/symlink/unknown refusals and protocol round-trips.
DetailTabs: give every tab a meaningful ImageVector from the core Material
icon set and turn the wide rail into a collapsible one. A rememberSaveable
railExpanded flag plus an accessibility-labelled "Collapse tabs"/"Expand
tabs" control shrink the rail to a narrow icon-only strip and back; the
collapsed tile still names its tab via the icon's content description and
still marks the selected tab by container colour and tab semantics, and the
content box reclaims the rail width. Narrow windows keep the top
PrimaryScrollableTabRow. railWidthDp is a pure, unit-tested predicate.
RunDetailScreen: render a step's metadata as aligned label/value rows
(KeyValueRow) instead of a ragged stack of lines, paired into two columns on
wide windows (status/outcome, duration/visit, target/session, agent/model
target) and a single column on narrow ones. Evidence (input, output,
transcript, file changes, notifications, control diagnostics) fills its card
in full-width monospace with a shared padding/line height, and the vertical
rhythm is one bottom gap per step with no doubled gap for a step without
expandable detail. The timeline glyph and connector stay aligned with the
step title. All previously shown fields are retained.
PipelineDetailScreen/CodeBlock: the Source tab now fills the whole tab area
with the tab's single LazyColumn owning all scrolling (CodeBlock gains an
optional maxHeight = null that renders unbounded; the default bounded
behaviour is unchanged for other callers). It renders the parsed definition
as one collapsible section per stage (key, type) built from the same
stageDefinitionFields/StageFieldRow the stage detail sheet uses, covering
prompt, output, tools, configs, edges (outcomes with resolved targets and
#success/#failure terminals), memory, limits and notify policy while skipping
absent fields. A Raw toggle reveals the exact markdown and a copy action
copies the whole definition.
Extract shared formatting helpers (fileChangeLine, notificationLine,
fileChangesSummary, controlVisitLabel) into Format.kt and expose
StageFieldRow/StageTypeChip/stageDefinitionFields so the sheet and the Source
tab agree. Add StageDetailSheetTest and StepMetaTest, extend DetailTabsTest
(icon distinctness, rail width) and FormatTest, and record the build,
unit-test and emulator-screenshot verification in android/README.md; the
captures stay in the git-ignored android/captures/space_pass/.
Assisted-by: DeepSeek V4.1 Flash
Allocate a distinct source port, target port, across-run lane and vertical
track per edge in the pure layoutGraph (stable edge-id order), mirroring the
TUI's per-edge routing, so no two routes share a row or column; each outcome
label follows its own edge's track. Rewrite routePoints to build every
polyline from those precomputed ports/lanes/tracks instead of shared corridor
constants, keeping runs axis-aligned and the layout deterministic.
Add pure hitTest/toGraphPoint plus a tap detector that maps taps back through
the current transform: tapping a node calls onStageTap, tapping empty space
does nothing, and pan/zoom keep working. Add StageDetailSheet, a Material 3
ModalBottomSheet overlay (near full height, scrollable, responsive on wide
windows) showing the stage definition and, on a run graph, that run's step;
wire it into the pipeline and run graph tabs.
Extend WorkflowGraphTest with the no-shared-collinear-run invariant, distinct
port, determinism and hit-test cases.
The per-workspace concurrency added in 2618f0d exposed three places that assumed a
single run, and the second concurrent run failed with 'agent quiescence not
confirmed' because of them.
- ActiveAgentSessionsForRun(runID) scopes the end-of-step quiescence check to the
run's own sessions, so another run's legitimately active agent no longer fails
this one. A run still fails when its own session cannot be confirmed idle.
- The startup guard now uses ActiveSessionOwners (which carries the owning run id)
and refuses only an ORPHANED session - one whose run is not active now - which is
what restart recovery is actually about. A session owned by a currently active
run no longer blocks new work.
- sessionActive examines only the target session: foreign entries in the
/api/session/active map are ignored, the target's absence is inactive, and the
target present with an unsupported state still fails closed.
Verified: go build, go vet and go test ./... pass, including ten concurrency tests
(two workspaces run concurrently, same-workspace refusal, symlink and default-cwd
equivalence, idempotent repeats, restart recovery, retry scoping, overlapping runs
not failing quiescence, and a run's own active session still failing it).
Operator verification, which a stage cannot perform because restarting the server
would abort the run doing it: the service was rebuilt and restarted on this
commit, then two runs in separate workspaces (/tmp/ws-c and /tmp/ws-d) executed
concurrently - both reported executing at the same time, a third run in ws-c was
refused naming run 46, and both finished succeeded with no diagnostic.
Track each active run's resolved workspace alongside its cancel function
in a single runner.active struct map. A new request key is now refused
only when an already-active run is changing the same resolved workspace;
the refusal names the conflicting run id and advises waiting or using a
different workspace. Workspace resolution is unchanged (default cwd,
absolute request workspace, EvalSymlinks), so two spellings of one
directory still compare equal. The conflict check and registration stay
inside the existing r.mu critical section, so concurrent starts for one
workspace cannot both pass. Idempotent repeats of an active request key
and the restart-recovery guard are unchanged.
Add concurrency_test.go covering concurrent different-workspace runs,
same-workspace refusal, symlink/default-cwd equivalence, idempotent
repeats, restart recovery and retry workspace scoping; strengthen the
runner_test.go refusal assertion. Update docs/cli.md,
docs/first-version-testing.md and the packaged operations skill reference
to describe per-workspace concurrency.
Assisted-by: DeepSeek V4.1 Flash
- Pipeline detail and run detail are now tabbed: run detail has Summary, Graph,
Input, Output, Evidence and Steps, pipeline detail has Summary, Graph and Source,
with the version list in Summary. The graph gets a tab of its own, so it uses the
whole content area with its Fit and expand controls. Selection is remembered and
the tabs carry real tab semantics.
- The code-like blocks (Input, Output, Source, prompt, transcripts) are styled
content cards with a label header, monospace body, a copy action and a bounded
height that scrolls internally, instead of a raw bordered div.
- Content inside a tab breaks down into collapsible inner sections (DetailTabs.kt,
CodeBlock.kt), reusing the existing section component with remembered state.
- Foldable layout is driven by window width (WindowSize.kt): narrow windows keep
the single-pane tabs, wide windows use list-and-detail side by side with the
detail capped to a readable width.
Verified: :app:assembleDebug and :app:testDebugUnitTest succeed offline with 60
tests and 0 failures (new WindowSizeTest and DetailTabsTest), and the reviewer
drove every tab plus both a narrow and a wide window on the emulator (captures in
android/captures/tabs_pass/view/). The implementer's own capture set in that
directory is unusable: it wrote screencap's multi-display warning into the files
(they begin with ASCII '[Warning', not the PNG magic), so only the reviewer's
captures were reviewed.
Four related UI changes, all requested after using the app on a phone.
- Graph pinch zoom is now anchored to the gesture centroid. The handler dropped
the centroid and the canvas scaled about the content origin, so a pinch slid
the graph away from the fingers. zoomAbout() keeps the content point under the
fingers fixed, applies the pan and then clampOffset, with unit tests proving
the centroid point is unchanged and the scale and bounds are respected.
- Pipeline detail and run detail now use a LazyColumn of collapsible sections
(shared Sections.kt header, rotating chevron, animateContentSize) whose titles
stick to the top while their content scrolls beneath, with per-section state
remembered and exposed to accessibility. Steps and session evidence stay lazy
list items instead of nested scrollables.
- The Runs list is rebuilt: the raw result preview is gone, failures show a
two-line diagnostic in the error colour, each run has a colour-coded status
chip with a matching icon per state (RunStatus.kt, core Material icons - no new
dependency), the usage aggregates render as a metrics block with a formatted
average instead of a run-on line of seconds, and runs are grouped by day under
sticky date headers.
- Run detail steps are a timeline: a status dot joined to the next step, the
stage and visit number, an outcome chip and the duration, with input, output,
transcript, file changes and notifications behind a per-step 'Show details'.
- One centralised type hierarchy (Typography.kt) for screen title, section
header, card title, subtitle, body and monospace data, applied across the list,
the cards and both detail screens.
Verified: :app:assembleDebug and :app:testDebugUnitTest succeed offline with 53
tests and 0 failures (new FormatTest, RunStatusTest and RunGroupingTest;
WorkflowGraphTest 23 to 27), and the app was driven on the emulator with
screenshots of the runs list states, the sticky date header, the steps timeline,
an expanded step, a collapsed section and the sticky section header.
A user reading the graph on their phone said it was not clear what happened, and
asked for the TUI's straight arrows and a larger panel.
- Edges are now axis-aligned orthogonal polylines instead of Bezier curves: the
stage-to-stage runs and the routes into the bottom-row #success/#failure
terminals are horizontal/vertical segments joined at right angles, matching the
Go TUI's routing, and every arrowhead now points along the direction of its
final segment instead of the straight source-to-target chord (which pointed
wrongly as soon as a route turned a corner). Routing is a pure function.
- The graph panel is a sensible share of the window height on both screens
instead of 360dp/340dp, and a new expand/collapse control beside 'Fit graph to
view' grows it to nearly the full height.
Verified: :app:assembleDebug and :app:testDebugUnitTest succeed offline with 42
tests and 0 failures (WorkflowGraphTest 15 to 23, covering the orthogonal routing
and arrowhead direction), and the app was driven on the emulator with before/after
screenshots of a pipeline graph, a run graph with the executed route highlighted,
a panned state and the expanded panel.
The native install hardcoded -addr 127.0.0.1, so the server was unreachable from
the phone: the emulator worked because it proxies to the host loopback, but a
real device could not connect even though ntfy (bound to 0.0.0.0:8090) worked.
The bind address is now a manifest setting (server_address() in manage.py, with
older manifests still defaulting to loopback) and setup-native.py records it,
defaulting to 0.0.0.0 like the Docker install did and offering
--bind-address 127.0.0.1 for a loopback-only server. An invalid address is
rejected, and setup prints the phone client URL.
Verified: scripts test suite 116 tests OK, and after reinstalling the server
listens on *:8080 and answers {"healthy":true} on 127.0.0.1, 10.0.0.75,
10.0.0.249 and the tailnet address.
Three UI changes requested after reviewing the first on-device screenshots:
- Dark-first theme: the app now owns its colour scheme instead of following the
system wallpaper. Theme.kt defaults to a deliberate darkColorScheme built from
a mint/teal seed with an amber tertiary (new Color.kt) so it matches the dark
Pipelines TUI; dynamic colour is gone and a complete light scheme is retained
for when it is explicitly requested. themes.xml/colors.xml give the app a dark
window background and dark system bars with light icons, so launching never
flashes light.
- Workflow graph matches the TUI: the #success/#failure terminals now share a
lower row under the stage row, with arrows entering their top borders and the
error -> #failure route leaving the bottom of its source stage, mirroring
internal/tui/graph_layout.go ('Terminals share a lower row...') and graph.go's
'[FAILURE] [SUCCESS]' bottom row. Fit-to-content, pan clamping, the Fit
action, run highlighting and the TalkBack description are preserved.
- More style: consistent Material 3 top app bars for Pipelines, Runs and
Settings, the new colour scheme applied across the screens and state
components, and monospace retained for hashes, source and run input/output.
Verified on the host and on the device: :app:compileDebugKotlin, :app:assembleDebug
and :app:testDebugUnitTest succeed offline with 34 tests and 0 failures
(WorkflowGraphTest grew to 15 tests covering the terminal row, bottom exits and
fit/clamp), and the app was run on the Pixel_Fold_API_36 emulator in dark mode
against the live server: the whole 4-stage graph renders with its terminal row,
and the list, detail and settings screens use the new theme.
An emulator run against the live server exposed four usability defects and one
legibility defect, all fixed here:
- The workflow graph was not fit-to-content: 3- and 4-stage graphs showed only the
first columns until the user panned. The initial view now fits and centres the
whole graph, scaling down when it is wider than the viewport.
- A panned graph could be dragged completely out of view with no way back. Pan is
now clamped so content stays visible, and a 'Fit graph to view' action restores
the fitted view.
- The app did not connect on launch even with a saved server URL. It now connects
from the saved URL using the existing bounded backoff; an explicit Disconnect
still stays authoritative for the session.
- The runs list said 'N steps' while run detail said 'N recorded visits'. Both now
use the server's own vocabulary ('N completed visits' / 'N recorded visits')
through one shared helper in Format.kt.
- Outcome labels: labels are drawn after all curves so none is crossed, dimmed
labels use onSurfaceVariant, and executed labels no longer resolve to
near-invisible container accents ('rejected' measured ~1.2:1 before).
Verified: :app:compileDebugKotlin, :app:assembleDebug and :app:testDebugUnitTest
succeed offline with 28 tests and 0 failures (WorkflowGraphTest grew to 9 tests
covering fitScale, clampOffset extremes and label slots), and the app was driven
on the Pixel_Fold_API_36 emulator against the live server with before/after
screenshots and no FATAL or Compose exception in logcat.
Running the client on an emulator against a live server exposed real defects in the
workflow graph, all fixed here:
- DrawScope.drawText's string overload measured against the draw scope's constraints
and threw when a node or edge label fell outside them (wide or panned graphs),
crashing the pipeline-detail and run-detail screens. Both call sites now draw a
pre-measured TextLayoutResult.
- The graph Canvas was not clipped, so panning drew nodes and edges over the
'Versions' row and the 'Workflow graph' heading. The viewport now clips its
children.
- Outcome labels overprinted when a stage had more than one outgoing edge ('error'
over 'success'). Labels are now laid out in one row per source edge, with a
backing rect for legibility.
- Stage columns followed an iterative rank relaxation, so graphs with a back edge
rendered out of order (planner before reviewer). rankStages now returns
declaration order, matching internal/tui/graph_layout.go.
Verified: :app:compileDebugKotlin, :app:assembleDebug and :app:testDebugUnitTest
succeed offline with 20 tests and 0 failures (new WorkflowGraphTest covers the
rank order and label slots), and the app was driven on the Pixel_Fold_API_36
emulator against the live server with no FATAL or Compose exception in logcat.
Kotlin and Jetpack Compose Material 3 client that speaks the existing WebSocket
protocol: settings requiring an explicit server URL and workspace, pipeline list and
detail with the workflow graph, run history, run detail and evidence, start and
cancel run, reconnect, and the loading/empty/error/disconnected states. It stores no
credentials and keeps execution, definitions and run history on the server.
Verified on the host: :app:compileDebugKotlin and :app:assembleDebug succeed and
:app:testDebugUnitTest passes 19 tests. Ignore Gradle outputs and re-include the
net.awan.pipelines.data package, which the repository runtime data/ rule would
otherwise exclude.
Add scripts/setup-native.py and make ./install (and --native) build the server, the CLI
and ntfy from source into ~/.local/share/pipelines, detect an existing host OpenCode
and Pi instead of installing them, install the packaged authoring skill, migrate an
existing Docker database and ntfy auth store, save the host client default and start
both services. ./install --docker keeps the previous Docker server + ntfy
installation unchanged.
ntfy is compiled from its pinned Go module on every host because upstream publishes
no macOS server binary (its darwin asset is built with -tags noserver); its cgo
SQLite driver is why a C compiler is now required natively. The ntfy credential
bootstrap and the client default writer are shared by both installers,
installation.Load resolves symlinked prefixes, the Docker migration copies the
SQLite write-ahead log so the newest definitions and runs are not lost, and the
account subcommands read the generated configuration through NTFY_CONFIG_FILE.
Verified on macOS: 115 Python tests, go build/vet/test, and scratch installs that
migrate 9 pipelines and 31 runs, build ntfy v2.30.0 and start both services healthy
on spare ports before stopping them.
Install current verified harness releases inside Docker, preserve persistent accounts and settings, and provide separate interactive and pipeline model defaults with terminal onboarding and fuzzy pickers.
Add Docker-aware authoring transport, Pi stage execution, bounded workflow controls, reliable final-result readback and usage settlement, and finite short-lived CLI pipe draining. Keep dated installation evidence and packaged authoring guidance consistent.
Verified with a real Docker installation, both harness stages and interactive authors, the built-in plan/implement/review starter, independent host race/vet checks, installer tests, and packaged skill tests. Generated release receipts stay ignored in clean checkouts.
Make OpenCode authoring responsive and expand the managed skill references. Add conflict-aware import/export, real-provider reference workflows, and tracked V2 generation for reliable budget accounting.