android: add omni-search type icons with a kind filter and sorting
The search results panel replaces each row's text type badge (LabelChip,
removed) with a glyph derived from the result kind and, for an artifact,
from its content type. The artifact branch reuses the gallery's own
artifactKind/artifactIcon mapping in ui/graph/ArtifactType.kt instead of
a second table, and the glyph's contentDescription carries the kind in
words so a screen reader hears what the icon cannot show.
The panel's header gains the runs list's FilterMenu and SortMenu: a kind
filter (All kinds, Pipelines, Runs, Steps, Fields, Artifacts, Versions)
that sends the server's SearchRequest.kind verbatim, and Relevance /
Newest / Name sorting. The server's search takes no sort, so Newest and
Name order the results in hand and say so ("Sort results in hand", the
collapsed summary's "(in hand)"); no Prompts option is offered because
the server's search kinds cannot produce one. The chosen kind and order
persist via SettingsRepository, surviving query changes and streaming.
Tests: OmniSearchResultsTest covers the per-kind and per-content-type
glyph (checked against the gallery mapping), the kind label, filter
narrowing, Relevance/Newest/Name ordering with ties, and the empty-state
line; ArtifactTypeTest covers artifactKindLabel.
Checked before committing:
- Packaged templates: none describes the app's search panel; unchanged.
- README/topic docs: android/README.md gains the "Search type icons, a
kind filter and sorting" section; docs/cli.md and docs/ui-ux-review.md
describe only the TUI/server search, so they stay accurate and are
unchanged.
- Packaged authoring skill references: internal/author/skill/references/
contains no Android search-panel documentation (operations.md's "omni
search" is the TUI), so none needs updating; install.go's inventory is
untouched.
Evidence: gradle :app:testDebugUnitTest --rerun 433 tests 0 failures;
:app:assembleDebug successful, APK published to the run artifacts; the
API-27 NewApi lint errors are pre-existing and unrelated.
(cherry picked from commit b808158d499912e09872c31b5259205ee6cd8838)
This commit is contained in:
@@ -4424,6 +4424,92 @@ and a selection navigating (the visual review owns the device, per the brief's
|
||||
device policy); the panel's pure logic is exercised by the unit tests and the
|
||||
compile only.
|
||||
|
||||
## Search type icons, a kind filter and sorting (17 Oct 2026)
|
||||
|
||||
The omni-search results panel replaces each row's text type badge with a glyph and
|
||||
gains the runs list's filter and sort controls. `android/` only; no new dependency
|
||||
(the glyphs and the `FilterList`/`Sort` menu icons are from the already-declared
|
||||
`material-icons-extended`), no Pipelines server/Go/installer/Docker file touched,
|
||||
no run started from the app, and the operator's phone was never used.
|
||||
|
||||
- **Type glyph per result.** `OmniSearchResults.searchResultIcon` maps a hit to a
|
||||
glyph: pipeline → the app's pipeline icon (`AccountTree`), run → `History`,
|
||||
version → `Commit`, step → `Segment`, field → `Subject` (text lines, distinct
|
||||
from the gallery's `Description` document glyph), and an unknown kind →
|
||||
`HelpOutline`. An artifact reuses the gallery's own
|
||||
classification (`artifactKind`/`artifactIcon` in `ui/graph/ArtifactType.kt`)
|
||||
rather than a second mapping, so a search artifact and a gallery tile never
|
||||
disagree. The glyph replaces the `LabelChip` badge (the chip is removed); the
|
||||
payload decides the branch exactly as `searchRow` does.
|
||||
- **Kind in words.** The glyph's `contentDescription` is `searchResultKindLabel`
|
||||
("Pipeline", "Run", "Pipeline version", "Step", "Field", or "<Type>
|
||||
artifact", e.g. "PDF artifact" via the new `artifactKindLabel`), so a screen
|
||||
reader hears the type the icon alone cannot carry. The row and the filter use
|
||||
the same kind vocabulary ("Fields").
|
||||
- **Kind filter, narrowing server-side.** `SearchKindFilter` lists the filter
|
||||
options - All kinds, Pipelines, Runs, Steps, Fields, Artifacts, Versions - and
|
||||
each carries the server's own `SearchRequest.kind` value, sent verbatim
|
||||
(`PipelinesRepository.search(query, kind)`). There is deliberately no "Prompts"
|
||||
option: the server's search kinds are pipeline/version/run/step/field/artifact
|
||||
only (`internal/protocol/search.go`), so a prompts filter could never match and
|
||||
would visibly do nothing.
|
||||
- **Sort, honest about its reach.** `SearchSort` offers Relevance (the server's
|
||||
own score/recency/tie-break order, left untouched), Newest first (by `recency`)
|
||||
and Name (by the displayed title). The server's search command takes no sort, so
|
||||
Newest and Name order the results already in hand; the sort menu carries a
|
||||
"Sort results in hand" caption, the collapsed summary appends " (in hand)" for
|
||||
those two orders, and the icon's description reads "Sort results in hand". A
|
||||
server-side sort would need a `sort` field on `SearchRequest`/the search
|
||||
command.
|
||||
- **Shared controls, remembered choice.** The panel header uses the same
|
||||
`FilterMenu` and `SortMenu` the runs list uses (no new pattern), plus a one-line
|
||||
`searchControlsSummary` ("All kinds · Relevance") so the collapsed controls show
|
||||
the active choice. The header row carries a top inset so the filter's count badge
|
||||
stays inside the panel's rounded surface. The kind and order persist as `search_filter_kind`/
|
||||
`search_sort` in `SettingsRepository`, so they survive a query change, the
|
||||
results streaming in, and a restart.
|
||||
- **Tests.** `OmniSearchResultsTest` now covers the glyph per kind and per
|
||||
artifact content type (checked against the gallery's
|
||||
`artifactIcon(artifactKind(...))`), the kind-in-words label, the kind filter
|
||||
narrowing a mixed list, the Relevance/Newest/Name ordering including a recency
|
||||
tie and a title tie, the in-hand summary suffix, the filter-aware empty-state
|
||||
line (`searchPanelEmptyMessage`, which replaced the panel's now-orphaned
|
||||
`isEmptyResult` and names the active kind filter), and the stored-value
|
||||
fallbacks; `ArtifactTypeTest` covers `artifactKindLabel`.
|
||||
|
||||
Evidence (macOS, JDK 17 from Homebrew `openjdk@17`,
|
||||
`ANDROID_HOME=/Users/alan/Library/Android/sdk`, Gradle 8.11.1 from the wrapper
|
||||
cache, every command `--no-daemon --offline --console=plain`; this build includes
|
||||
the visual-review fixes: the header's badge inset, the visible in-hand sort
|
||||
caption/summary, and the consistent "Field" vocabulary with a distinct glyph):
|
||||
|
||||
- `gradle :app:testDebugUnitTest --rerun` → `BUILD SUCCESSFUL`; the 47 result XMLs
|
||||
aggregate to **433 tests, 0 failures, 0 errors, 0 skipped**
|
||||
(`OmniSearchResultsTest` 28, `ArtifactTypeTest` 7).
|
||||
- `gradle :app:assembleDebug` → `BUILD SUCCESSFUL`;
|
||||
`app/build/outputs/apk/debug/app-debug.apk` is **18,715,466 bytes**, sha256
|
||||
`f4cee0d4949ac587601f01a96733b3d865431bd5376ac6d7d182222a40999bf5`.
|
||||
- **APK publish.** Copied to
|
||||
`~/.local/share/pipelines/data/artifacts/231/4/pipelines-debug-wip-f31f150.apk`
|
||||
(`f31f150` = `git rev-parse --short HEAD`). The LAN URL
|
||||
`http://10.0.0.75:8080/artifacts/231/4/pipelines-debug-wip-f31f150.apk` returned
|
||||
`HTTP/1.1 200 OK`, `Content-Type: application/vnd.android.package-archive`,
|
||||
`Content-Length: 18715466`, and the downloaded bytes' sha256
|
||||
`f4cee0d4949ac587601f01a96733b3d865431bd5376ac6d7d182222a40999bf5` matched the
|
||||
local file.
|
||||
- `gradle :app:lintDebug` fails on two pre-existing `NewApi` errors
|
||||
(`res/values{,-night}/themes.xml`: `windowLightNavigationBar` requires API 27,
|
||||
min is 26), unrelated to and not introduced by this change; the report names no
|
||||
file touched by this change.
|
||||
- No packaged template and no packaged authoring skill reference
|
||||
(`internal/author/skill/references/*`, `internal/author/install.go`'s inventory)
|
||||
documents the app's search panel - the only "omni search" reference describes
|
||||
the TUI - so none needed updating.
|
||||
|
||||
Not verified in this pass: device frames of the panel and the open controls (the
|
||||
visual review owns the device, per the brief's device policy); the pure logic is
|
||||
exercised by the unit tests and the compile only.
|
||||
|
||||
## Chat destination and multiple conversations (16 Oct 2026)
|
||||
|
||||
The first Chat slice: the destination, the server session list and several
|
||||
|
||||
Reference in New Issue
Block a user