Skip to content

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

Merged
hidb4ai merged 7 commits into
oceanbase:masterfrom
yydawx:feat/1928-exp-search
Oct 22, 2026
Merged

hidb4ai merged 7 commits into
oceanbase:masterfrom
yydawx:feat/1928-exp-search

Conversation

@yydawx

@yydawx yydawx commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

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 tests/test_dashboard_profile_handoff.py tests/test_dashboard_markdown.py → 100 passed.
  • ruff check, ruff format --check, and ty check src/powercontext/server/dashboard passed.
  • scripts/dashboard_browser.cjs passed against a local Server; a targeted Playwright matrix covered search/pagination, detail back, language/theme, compare/rollback and malformed return contexts.

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.

@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
@yydawx
yydawx force-pushed the feat/1928-exp-search branch from ce2bd6e to 54cb847 Compare October 19, 2026 05:57

@hidb4ai hidb4ai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please preserve the new Experience search state through detail/back navigation and retry links; the two reproduced failures are described inline.

@yydawx
yydawx force-pushed the feat/1928-exp-search branch 2 times, most recently from 230edd9 to 110e654 Compare October 20, 2026 07:39
@yydawx
yydawx requested a review from hidb4ai October 20, 2026 07:43
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.
@yydawx
yydawx force-pushed the feat/1928-exp-search branch 2 times, most recently from 4043966 to b579437 Compare October 20, 2026 13:50
Return from an Experience or Skill detail page to the result page the reader
came from: collection links carry a validated return_to for the Methods page,
and the detail back link, its error state, revision comparison and rollback
keep it. Return navigation applies the current interface language.

Retry after a failed search request keeps experience_page because the
same-page link allowlist includes it, while a new query still starts on the
first page. Both families share the Methods template, so Skill detail pages
gain the same return path.
@yydawx
yydawx force-pushed the feat/1928-exp-search branch from b579437 to f0ba4f3 Compare October 21, 2026 03:35
@yydawx
yydawx marked this pull request as draft October 21, 2026 03:39
@yydawx

yydawx commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

I converted this pr to draft for now as I will test more

Cover supported query text and its encoded size, rejected scope, path, kind
and page contexts, Skill result-page restoration, and the detail read-error
back path.
Assert the Skill detail back link returns to the filtered Methods page instead
of only checking the kind.
@yydawx

yydawx commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

I now add more tests and do more E2E tests. It's ready for review

@yydawx
yydawx marked this pull request as ready for review October 21, 2026 08:31
A 404 from an out-of-range Experience or Skill result page kept the invalid
page in the Retry link, so retrying could never recover. Drop result-page
parameters on 404 while keeping them for transient failures.
Share detail and retry link extraction, merge the experience paging and
detail-back cases, and cover the edge query strings in one parametrized case.
Comment thread tests/test_dashboard.py Resolved
Build the oversized query inside the test and use short ids for edge query
cases so PYTEST_CURRENT_TEST stays within Windows' environment limit.

@hidb4ai hidb4ai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hidb4ai
hidb4ai merged commit b9f16e6 into oceanbase:master Oct 22, 2026
44 checks passed
@yydawx

yydawx commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

#1925

@yydawx

yydawx commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

#1928

1 similar comment
@yydawx

yydawx commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

#1928

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

5 participants