Skip to content

feat(dashboard): add text search to the Experience list - #2033

Open
yydawx wants to merge 1 commit into
oceanbase:masterfrom
yydawx:feat/1928-exp-search
Open

yydawx wants to merge 1 commit into
oceanbase:masterfrom
yydawx:feat/1928-exp-search

Conversation

@yydawx

@yydawx yydawx commented Oct 16, 2026

Copy link
Copy Markdown

Which issue or RFC does this PR close?

Closes #1928

Rationale for this change

The Methods page supports Skill search but only allows browsing Experiences, even though the family-scoped Artifact search added in #1862 already covers the family. A long Experience collection therefore cannot be narrowed, while the Skill tab can.

What changes are included in this PR?

  • DashboardAPI.records() loads the Experience collection through POST /v1/scopes/{scope_id}/artifacts/experience/search when the Methods page carries a query, and adapts each hit (content and lineage) to the exact-revision record shape the existing card, detail and paging path already renders.
  • An empty query keeps the current cursor-based browsing. A query windows the results with the same page size and link helper as Skill search, so a broad query cannot render hundreds of cards at once.
  • Result-page links keep the kind and the query; the clear action resets the search position.
  • No-match and read failures stay distinct, with new search_experiences, experiences_limit and experiences_no_match labels in both catalogues.
  • Document the Experience search entry point on the Dashboard page/API table (en and zh).

The page still reads through the public HTTP surface with the caller's credentials, so scope authorization, result limits and content validation are unchanged.

Are there any user-facing changes?

Yes. The Experience tab on the Dashboard Methods page gains a search form: a query returns matching approved, active Experiences in the selected scope, and clearing it restores browsing. No API, storage or migration change.

How was this change tested?

  • uv run pytest tests/test_dashboard.py → 25 passed, including four new behavior tests: filter and clear in both languages, query retained across result pages, and request failures distinguished from no matches.
  • uv run pytest tests/test_dashboard_profile_handoff.py tests/test_dashboard_markdown.py → pass; uv run pytest tests/test_artifact_search_server.py tests/test_atomic_artifact_search_server.py tests/e2e/test_local_dashboard_access.py → pass.
  • ruff check, ruff format --check, and ty check src/powercontext/server/dashboard → pass.
  • Manual browser check against a local Server (SQLite, dashboard enabled) for Chinese and English search, cleared and no-match states.
  • Not run here: scripts/dashboard_browser.cjs (needs a running Server with reviewer-owned data) and the website docs build.

AI usage statement

Built with OpenAI Codex (GPT-5-class coding agent) in the Codex desktop app, working in a local clone of this repository. I used it to read the issue and the #1862 search API, locate the Dashboard read path (dashboard/api.py, content.py, pagination.py, methods.html, the label catalogues), draft the implementation and the behavior tests, and run the checks locally. Every change was reviewed before submitting, and the commit contains no generated code that I did not read.

Two useful corrections from the tool: its first version of the pagination test asserted a specific card order after search, which the retrieval order does not guarantee, so the test now checks the union of result pages instead. It also first assumed the "distinct messages" requirement needed a new error surface, when the existing read_error component already separated read failures from empty results, which kept the diff small.

The Methods page lets users search Skills but only browse Experiences, even
though the family-scoped Artifact search added in oceanbase#1862 covers the family.

Load the Experience collection through
POST /v1/scopes/{scope_id}/artifacts/experience/search when the Methods page
carries a query, and adapt each hit to the exact-revision record shape the
existing card, detail and paging path already uses. An empty query keeps the
cursor-based browsing, and the result window follows the Skill search so a
broad query cannot render hundreds of cards at once.

Page links keep the kind and the query, the clear action resets the search
position, and no-match and read failures stay separate with matching Chinese
and English labels. Document the search entry point on the Dashboard page-API
table.
@CLAassistant

CLAassistant commented Oct 16, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@AlexStocks AlexStocks added the 1.4.1 v1.4.1 release tracking label Oct 17, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.4.1 v1.4.1 release tracking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(dashboard): add text search to the Experience list

3 participants