Skip to content

feat(app-shell): a Studio rail search that matches nothing names the query and offers to clear it - #26959

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-30qcwz
Oct 28, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-30qcwz

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Warren · project thread
Fixes #26733

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:Studio 的数据、自动化、权限三个侧栏共用一个「搜索无结果」状态:写出搜不到的关键词,并给一个「清除搜索」按钮,点了清空搜索框、列表恢复。
  • 为什么改:之前数据和权限侧栏搜不到时整列空白,看起来像加载失败;自动化侧栏有一句提示但没有退路。
  • 风险与回滚:只动侧栏的显示,不改任何过滤或排序;回滚即 revert 本 PR,i18n 包只多一个文案键。
  • 先看:StudioRail.tsx(新状态与 matchCount 判定),StudioDesignSurface.tsx(三处侧栏只传匹配数;数据侧栏的过滤原样上提成常量),新测试文件。
  • 两分钟验证:pnpm --dir ui exec vitest run packages/app-shell/src/views/studio-design/StudioRail.noMatches-26733.test.tsx,预期 13 条全绿。
  • 需要你做的:无,席位落地。

What changes

  • StudioRail (shared by every Studio pillar) gains search.matchCount: how many rows the pillar's own filter left. When the query is non-blank, matchCount is 0 and the list was not empty before searching (count !== 0), the rail shows one state under the list: the existing engine.list.emptyQuery sentence naming the trimmed query, and a Clear search button that calls search.onChange('') and focuses the box again.
  • Data rail: the object filter is hoisted, unchanged, into shownObjects so its length can be handed to the rail; Automations passes shownFlows.length; Access passes filtered.length. No rail filters or sorts differently.
  • The Automations rail's own copy of the no-matches sentence is removed: the rail now says it, once, for all three.
  • @object-ui/i18n studio namespace: new row engine.studio.rail.clearSearch (en "Clear search", zh "清除搜索"); patch changeset.
  • A blank query, or an empty package, never shows the line: each pillar's existing empty sentence keeps speaking there.

Why

A builder who mistyped a rail search saw an empty column on Data and Access and could not tell a failed load from no matches (card #26733, from the studio-qa-2026-10-27 batch).

Tests

New StudioRail.noMatches-26733.test.tsx renders the real Data, Automations and Access pillars. Per rail: a query that matches nothing shows the state naming the query and no row; Clear search empties and focuses the box and restores every row; a matching query shows no state; an empty package keeps its own sentence with no no-matches line, with or without a query. Plus a zh case (the state's sentence and the button read in Chinese).

Readings at head 66aa3c5
  • New file: Test Files 1 passed, Tests 13 passed.
  • pnpm --dir ui exec vitest run packages/app-shell/src/views/studio-design/ (includes the existing Automations rail search pin): Test Files 234 passed, Tests 1703 passed.
  • pnpm --dir ui exec vitest run packages/i18n/: 89 files passed, 1373 passed, 13 skipped.
  • pnpm --filter @object-ui/app-shell run type-check and pnpm --filter @object-ui/i18n run type-check: exit 0.
  • Ablation: the rail's noMatches branch replaced with false through scripts/ablation-replace.mjs (anchor 1 to 0, blob 805aceee to a4f216f0): 7 failed, 6 passed. The 7 are every positive case (three rails times two, plus zh); the 6 green are the matching-query controls and the empty-package cases, as expected. Restored: blob equals HEAD, git diff HEAD empty.

Acceptance notes

  • Measured before the fix on origin/main 5ec398d: Data and Access rendered nothing under a non-matching query; Automations already printed engine.list.emptyQuery but had no clear action. The card's premise holds for Data and Access and half-holds for Automations.
  • The sentence reuses the existing engine.list.emptyQuery row (straight quotes around the query), so no new sentence row was added and the existing Automations pin still reads the same text.

Verification

Derived gates (34) at head 66aa3c5

node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 34 families; all 34 ran with exit 0, and --ran reconciled 34 derived, 34 run, 0 NOT-MEASURED, 0 UNRUN. Also run: check:i18n-designer-parity exit 0, check:new-line-citations exit 0 (0 new citations), eslint on the five touched source files exit 0 (0 errors; 16 warnings, all on untouched lines of StudioDesignSurface.tsx).

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic.
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint passes. (No formatter ran; eslint is clean on the touched files, and the repo-wide pnpm lint is CI's run.)
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: its generated artifacts are regenerated and committed. (not touched)
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JQwxbZPJiXo3QSt3ShH9c1


Generated by Claude Code

…query and offers to clear it

The shared StudioRail draws one empty-search state for the Data, Automations
and Access rails from the match count each pillar hands it: a sentence naming
the query and a Clear search action that empties the box and restores the
list. The Automations rail's own copy of the sentence retires.

Claude-Session: https://claude.ai/code/session_01JQwxbZPJiXo3QSt3ShH9c1
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Oct 27, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对

ACCEPT · seat domain:ui#1 · session_01JQwxbZeBv2y91towxasSUT · head 66aa3c5d · 2026-10-27T23:33Z

席位意见:三条可搜索的 Studio 侧栏(数据、自动化、访问)现在共用一个“无匹配”状态,由侧栏统一说出查询词并提供“清除搜索”;空查询或本来就空的列表不显示这一行,各支柱原有的空状态照旧。

  1. Shape: Fixes #26733; 6 files, +337/−34. Source: StudioRail.tsx +38/−1 and StudioDesignSurface.tsx +37/−33 (three rail call sites). One new test file (248 lines), one row each in studio en/zh, and a patch changeset for @object-ui/i18n.
  2. Premise measured: the seat read the source diff on the head. StudioRailSearch.matchCount is optional, so a rail that does not pass it says nothing. The no-matches line shows only when matchCount === 0, the trimmed query is not blank, and count !== 0. All three callers pass count: objects.length, flows.length, perms.length. So a pillar's own empty state (no objects, no flows, no sets) is never doubled. "Clear search" calls onChange('') and refocuses the box. The sentence reuses the existing engine.list.emptyQuery; only engine.studio.rail.clearSearch is new. Dev: new file 13/13; studio-design 234 files / 1703 tests green; ablation 7 red, restored.
  3. Gates / check-runs: PR check-runs on 66aa3c5d: 43 success, 9 skipped, 0 failure; mergeable_state: clean. Dev's local run: 34/34 derived gates exit 0, --ran reconciled.
  4. Accepted deviations: two call-site edits go beyond "props only", both inside the Claim's surface. The Data rail's inline filter is hoisted verbatim into shownObjects (same predicate, same order) so its length can be passed. The Automations rail's own no-matches paragraph is deleted, so the sentence is drawn once, by the rail; the premise half-held there, since it had the sentence but no clear action.
  5. Out of scope: none filed. Skills-docs: none — UI only.
  6. Landing: not Tier H; the seat readies and arms auto-merge.

Generated by Claude Code

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 27, 2026 23:34
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 27, 2026 23:34
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit ee2aaf0 Oct 28, 2026
53 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-30qcwz branch October 28, 2026 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Studio rails: a search with no matches shows a blank list with no "no matches" message (object rail, permission-set rail)

2 participants