🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
📝 docs(skills): restructure ux-audit skill with layered audit references (#16595)
Arvin Xuea50d58f9486
diff --git a/.agents/skills/review-checklist/SKILL.md b/.agents/skills/review-checklist/SKILL.mdindex 332785eade2..9009a660753 100644--- a/.agents/skills/review-checklist/SKILL.md+++ b/.agents/skills/review-checklist/SKILL.md@@ -35,6 +35,7 @@ user-invocable: false## SPA / routing- **`desktopRouter` pair:** If the diff touches `src/spa/router/desktopRouter.config.tsx`, does it also update `src/spa/router/desktopRouter.config.desktop.tsx` with the same route paths and nesting? Single-file edits often cause drift and blank screens.+- **Single-source the nav/tab catalog:** A menu/tab list defined in more than one hand-maintained copy drifts. The settings catalog is duplicated across `settings/hooks/useCategory.tsx`, `WorkspaceSetting/hooks/useCategory.tsx`, and `(mobile)/me/settings/features/useCategory.tsx` — the mobile copy has already lost Devices / Messenger / Notification. Adding/removing a tab must touch every copy (or, better, derive them from one source). Flag new parallel catalogs.## Reusediff --git a/.agents/skills/ux-audit/SKILL.md b/.agents/skills/ux-audit/SKILL.mdindex 6bca59891ce..6b77223664d 100644--- a/.agents/skills/ux-audit/SKILL.md+++ b/.agents/skills/ux-audit/SKILL.md@@ -1,8 +1,8 @@---name: ux-audit-description: 'Audit a page / surface against the Designing Interfaces pattern language + the ux skill checklists, then land findings. Use to run a repeatable, standards-based UX review of one screen.'+description: 'Audit a page / surface against the Designing Interfaces pattern language + the ux skill checklists, then land findings. Three layers — static (code), visual (screenshots), dynamic (automated user journey + perf). Use to run a repeatable, standards-based UX review of one screen.'disable-model-invocation: true-argument-hint: '<page-or-surface>'+argument-hint: '<page-or-surface> [--l1 | --l2 | --l3]'---# UX Audit@@ -11,111 +11,231 @@ A repeatable, standards-based UX review of **one surface at a time**. The benchmtwo things together:1. **Jenifer Tidwell, _Designing Interfaces_** — the pattern language for what a good- interface is _made of_ (navigation, layout, input, commands, data display, feedback).- See [`references/pattern-catalog.md`](references/pattern-catalog.md).+ interface is _made of_. See [`references/pattern-catalog.md`](references/pattern-catalog.md).2. **The [`ux`](../ux/SKILL.md) skill** — LobeHub's execution checklists for how a flow- should _behave_ (empty/loading/error, loading-can-fail, draft safety, forward- momentum, one primary button, live streams, …).+ should _behave_.-The audit answers two questions for the surface: **which patterns does it use** (and how-well), and **where is the experience weak** (each gap tied to a checklist item). It also-feeds back: recurring gaps become new `ux` checklist items; the audit itself can become a-worked-example reference.+The audit answers: **which patterns does the surface use** (and how well), and **where is+the experience weak** (each gap tied to a checklist item). Recurring gaps feed back as new+`ux` checklist items; the audit itself becomes a worked-example reference.Do **one surface per run** — a full-app sweep is too much for a single pass. Re-run perpage as the product grows; that's the "continuous" part.-## Ground rule: evidence, not vibes--Every finding cites `file:line`. Before you assert a load-bearing claim ("no error-state", "draft not persisted"), **open the code and confirm it** — don't trust a summary-or a screenshot. A wrong "it's missing" is worse than no finding. When you delegate the-surface map to an Explore agent, still re-read the 2–3 files behind your top findings-yourself.--## Procedure+## Three layers — pick by what you need to catch-### 1 — Scope & map the surface+An audit is not one activity. A finding is only trustworthy from a layer that can actually+_see_ it. Each layer has its own procedure file; run the ones the surface needs.-Pin down exactly what's being audited (the route + its feature tree). A screenshot from-the user is the ideal anchor — enumerate every block the user sees, top to bottom, plus-the surrounding chrome (nav, header, sidebar).+| Layer | File | What it does | Catches | Cost |+| -------------- | --------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- |+| **L1 Static** | [layer-1-static.md](references/layer-1-static.md) | Read the code | Missing states/branches (empty/error/retry), no draft persist, absent patterns, structural issues | cheap, offline, **every audit** |+| **L2 Visual** | [layer-2-visual.md](references/layer-2-visual.md) | Screenshots of the rendered surface | Real visual hierarchy & dominant control, spacing/contrast/alignment, truncation/overflow, how empty/loading/error actually look, responsive breakpoints, dark/light | medium; needs a render |+| **L3 Dynamic** | [layer-3-dynamic.md](references/layer-3-dynamic.md) | Drive the real user journey via **agent-testing** + instrument | In-progress/locked states, forced error/empty states, does step N lead to N+1, focus/keyboard, **quantified CLS / LCP / INP / long-tasks** | high; needs a running env + auth |-- Find the route segment (`src/routes/**`) and the feature components (`src/features/**`)- it delegates to. An **Explore** agent is good here — ask it to return the component- tree, and for each block: the data-fetching mechanism, and which of empty / loading /- error / retry states exist or are **missing**, with `file:line`.-- Produce a block list: `[greeting] [composer] [banner] [chips] [feed] [sidebar…]`.+### Coverage matrix — which layer can conclude what-### 2 — Inventory patterns in use+The core rule: **a verdict must come from a layer that can see it.** Don't tick a visual or+runtime verdict off the code.-Walk [`references/pattern-catalog.md`](references/pattern-catalog.md) family by family.-For each block, tag the Tidwell pattern(s) it implements and rate the execution:+| Finding type | L1 | L2 | L3 |+| ------------------------------------------------------------------------- | :---------: | :--------------: | :-------------: |+| Missing empty/error branch, no retry, draft not persisted, absent pattern | ✅ | — | — |+| Real visual hierarchy / is the dominant control the primary action | ❌ misleads | ✅ | ✅ |+| Spacing / alignment / contrast / truncation / overflow / dark mode | ❌ | ✅ | — |+| Off-screen selection; what empty/loading/error actually render as | ❌ | ✅ | ✅ |+| Responsive breakpoints (narrow / mobile) | ❌ | ✅ | ✅ |+| In-progress / locked states; forced error / empty; capability-gated | ❌ | ❌ | ✅ |+| Journey stitching (forward momentum across steps) | weak | weak | ✅ |+| Focus order / keyboard reachability | ❌ | ❌ | ✅ |+| **CLS / LCP / INP / long-task numbers** | ❌ | qualitative only | ✅ |+| **Which of two variants is _better_ (A/B winner)** | ❌ misleads | ❌ misleads | ✅ (+analytics) |-- **✅ solid** — used well.-- **⚠️ partial / misused** — the pattern is there but incomplete or fighting its intent.+> ⚠️ The recurring trap this prevents: ticking "one primary button" or "empty is a real+> page" from a `variant` prop in the code. Those are **L2** verdicts — confirm them on the+> render, never from L1 alone.-Output a table: `Pattern | Where (block + file) | ✅/⚠️ | one-line note`. This is the-"patterns in use" half of the report — it also surfaces **missing** patterns (a data feed-with no _Update Indicator_; a list with no _empty state_).+### Tiering — don't run all three every time-### 3 — Audit states & flows against the ux checklists+- **L1 always** — fast, complete-coverage baseline for every surface.+- **Add L2** when the findings are about layout, hierarchy, rendered states, or responsive.+- **Add L3** when you need to walk a journey, force states L1/L2 can't reach, or measure+ performance (CLS etc.).-For every block, walk the relevant [`ux`](../ux/SKILL.md) module (Read / Edit / Act /-Feedback / Grow). Record each gap as **present / missing / misleading** with `file:line`-evidence. High-yield checks, in order of how often they're the real problem here:+`--l1 / --l2 / --l3` scopes a run to one layer; default is L1 (+ L2 if screenshots are+supplied).-- **Loading can fail** (Feedback §4.2) — does every fetch have a terminal failure + retry,- or does it spin forever / silently degrade? Watch for an init-flag set _only_ on success- → permanent skeleton on error.-- **Empty vs failed vs not-loaded** (Read §1.1) — are the variants distinguished, or does a- failed load masquerade as "nothing here"?-- **Draft safety** (Edit §2.1) — is typed input persisted across reload/crash, or in-memory- only?-- **Forward momentum & action states** (Act §3.1) — confirm → in-progress (locked) →- done/error; success leads forward.-- **One primary button per surface**, **pinned actions outside scroll** (Act §3.2 / §3.3).-- **Live / polling streams** (Read §1.7) — new-item indicator, manual refresh, no reorder- under the user.-- **Predictable affordances** — is anything randomized / rotating / ephemeral where the- user needs a stable mental model (promo slots, placeholders holding real content)?--### 4 — Rank by severity+## Ground rule: evidence, not vibes-- 🔴 **Breaks trust** — data or input loss, stuck/permanent states, misleading "empty" that- hides a failure, silent send failure.+Every finding cites its evidence — `file:line` (L1), a screenshot you **verified with the+Read tool** (L2), or a captured value / snapshot (L3). Before asserting a load-bearing+claim, confirm it in the layer that owns it; a wrong "it's missing" is worse than no+finding.++## Ground rule: benchmark the surface _class_, not just our own artifact++Reading our code can only surface flaws in **what we built** — it is structurally blind to a+capability we **never built at all**, because an entirely-absent affordance leaves no+`file:line`, no dead branch, no half-wired button to grep for. The checklists guard the+_quality of the states that exist_; they do **not** tell you which states a surface of this+_class_ is expected to have.++So before (or alongside) reading code, name the surface's **class** and its domain+conventions: how do the mature, comparable products build this exact screen, and what do+they offer that a first version forgets? An **OAuth consent** screen's class norms, for+example (GitHub / Google / Okta): show _which identity_ you're authorizing as **and let the+user switch account / re-authenticate**, name the requesting app, list the scopes, allow+deny, and point to later revocation. A **file picker**, a **checkout**, a **share dialog**+each carry their own class norms. Write this expected-capability list _first_, then audit+gaps against it — otherwise the audit only ever polishes the paths that already exist and+silently blesses a missing one.++> ❌ The first pass of the OAuth audit measured consent against our internal state+> checklists only and reported button-hierarchy / retry gaps, while missing the **biggest**+> one: the consent screen locks the user into the current identity with **no switch-account**+> path (`OAuthConsent/Login.tsx`) — a class norm every comparable OAuth provider ships. A+> competitor-norms pass catches this on minute one; a code-only pass never can.++## Ground rule: comparing two variants — the winner is an outcome verdict, not a craft verdict++When an audit compares **two variants of the same surface** ("is Agent or Classic onboarding+better?"), the trap is judging **which is better _made_** (more polished, more patterns, more+AI) when the real question is **which better gets the user to their goal**. For a+gateway / interstitial surface — onboarding, consent, paywall, a loading gate — the two+diverge hard: the best version is often the _least_ version, because the surface stands+_between_ the user and what they came for. Craft is not outcome, and the richer artifact is+routinely the worse one.++So a variant comparison must:++1. **Name the success metric _first_, then judge against it.** Onboarding = completion rate ++ time-to-value + drop-off, not pattern richness. A checkout = conversion. Write the metric+ before scoring, or you'll default to scoring craft.+2. **Gate the winner verdict on L3 / analytics.** "Which variant is better" is a behavioral+ outcome — it lives in the coverage matrix's L3 row alongside CLS/INP. From L1/L2 you may+ compare **mechanics** ("A's error recovery is more complete", "B is fewer steps"); you may+ **not** declare a winner. No funnel data → say "insufficient evidence, here's what I'd+ need", and stop. A confident winner call with a buried "needs L3" caveat is the failure —+ the caveat does not license the verdict.+3. **Cost to the user is a first-class axis, inverse-weighted for gateway surfaces.** Time,+ steps, tokens, latency. Past a threshold, richness is a _liability_ on any surface the user+ wants to get _through_, not _into_.+4. **Anchor 意义感 on the user's real goal, not the feature's richness.** A flow that detains+ the user in itself when their goal is elsewhere is _less_ Meaningful even if more engaging —+ read correctly, 意义感 and 自然 favor the fast path there. Don't mistake "more conversational+ /more AI /more crafted"for"more meaningful".+5. **Read the org's revealed preference as evidence.** Feature flags, which variant is the+ **fallback**, which the most-constrained platform is forced onto (desktop), recent reverts.+ When the universal fallback _is_ variant B, B is the trusted baseline and the burden of+ proof is on A — don't explain these signals away as "ceiling vs floor".+6. **Pick the right reference class, and weight by the real intent distribution.** An AI+ tool's first-run benchmarks against ChatGPT / Claude / Cursor (near-zero onboarding, straight+ to the box), not SaaS setup wizards (Notion / Linear) that reward thorough onboarding.+ Score the modal user (who wants to skip), not the ideal engaged one.++> ❌ This skill's own miss: an L1 read judged **Agent onboarding "better" than Classic** because+> it was more polished /conversational (richer completion panel, name suggestions, view+> transitions), citing 意义感 ≳ 自然 > 确定性. In production Agent's effective-guidance completion+> was **not high**, users found it too slow (they wanted the tool, not a chat), and the org+> **rolled back to Classic**. Every error above was present: craft mistaken for outcome, 意义感 scored+> backwards, cost footnoted, a winner declared from L1 on what is an L3/analytics metric, and the+> flag-gated /degrades-to-Classic/desktop-excluded signals explained away.++## Ground rule: report the good, not only the gaps++An audit that only lists what's broken has drifted into a bug report. The mandate is+**patterns in use _and how well_** — so the strengths are first-class findings, not table+decoration. A well-built state machine, a draft that survives a failed save, an+open-redirect guard, a smart default: these are the **good cases**. Name them, cite their+`file:line`, and mark the standouts **✅ 亮点**, for three reasons:++- **They teach.** A good case is the ✅ half of the 回灌 loop — it becomes the positive+ example a `ux` checklist item cites, exactly as a gap becomes the ❌ one. An audit that+ reports no good cases can only ever sharpen the ❌ side of the checklists.+- **They protect.** "Don't regress this" is a finding. The next refactor needs to know+ which behaviors are load-bearing — the **Strengths worth preserving** block in+ [`example/tasks.md`](references/example/tasks.md) (the loading/not-found state machine,+ comment-draft-preserved-on-failure, the run-all preview → confirm flow) and the **✅ 亮点**+ rows in [`example/home.md`](references/example/home.md) (empty-send → day's-hint fallback,+ drawer-not-navigate surface contract) are exactly that list.+- **They calibrate severity.** A gap reads differently against a surface that is otherwise+ strong than against one weak throughout; the good cases are the baseline the gaps rank on.++> ❌ The drift this prevents: an audit whose "Patterns in use" ✅ rows are one-word ticks+> ("persistent", "strong", "textbook") while every gap gets a paragraph — the good cases+> demoted to checkboxes. [`example/tasks.md`](references/example/tasks.md) is the model to+> match: each standout pattern carries its `file:line` and a **✅ 亮点** call-out, so the+> strengths are as legible as the gaps.++## Severity rubric (shared)++- 🔴 **Breaks trust** — data / input loss, stuck / permanent states, a misleading "empty"+ that hides a failure, silent send failure.- 🟠 **Dead-ends or misleads** — no forward path, ambiguous state, missing in-progress- feedback, empty state that isn't a real page.+ feedback, an empty state that isn't a real page.- 🟡 **Friction / inconsistency / missed delight** — predictability, redundant controls,- progressive-disclosure gaps.--### 5 — Output the report--Use the two-part shape (see the worked example,-[`references/example-home.md`](references/example-home.md)):--1. **Patterns in use** — the table from step 2, grouped by pattern family, with a- one-line overall read.-2. **Experience gaps** — ranked list; each item names the finding, the `ux` checklist- item (or catalog pattern) it violates, `file:line` evidence, and a one-line remedy.-3. **Skill feedback** — which findings are real instances of existing checklist items- (good worked examples) vs **new generalizable gaps** worth adding to `ux`.--### 6 — Land the findings--Don't let the audit evaporate:--- **Concrete bugs** → fix the top 🔴 in the same or a follow-up branch, or file them.-- **Generalizable gaps** → add / strengthen a checklist item in the `ux` skill (put the- rule + a ✅/❌ example in the right module reference, and mirror a line into the `ux`- Quick review checklist). Cite the audited surface as the ❌ example.-- **The audit** → optionally save it as a `references/example-<page>.md` here so the next- run has a template.+ progressive-disclosure gaps, CLS jank.++## Output (shared)++See the worked example, [`references/example/home.md`](references/example/home.md). Note+**which layers ran**, then:++1. **Patterns in use** — table (from L1/L2), grouped by pattern family, with a one-line+ read; mark each standout ✅ row **亮点** and back it with real evidence (`file:line`),+ never a one-word tick.+2. **Strengths / good cases (don't regress)** — a **dedicated section** (`## … — Strengths /+good cases`), not a table footnote: bulleted **✅ 亮点** items, each naming the behavior+ this surface gets _right_, its evidence (`file:line`), and _why_ it's load-bearing — the+ ✅ half of the 回灌 loop and the "don't regress" list for the next refactor. Flag the ones+ strong enough to land as **✅ examples** in `ux` (annotate `→ landed as ux <ref> ✅`, wired+ to the Skill-feedback section). **Every audit produces this section** — if a surface is+ genuinely weak throughout, say that explicitly rather than omit it. See+ [`example/fleet.md`](references/example/fleet.md) §2 for the shape.+3. **Experience gaps** — ranked; each names the finding, the `ux` checklist item / catalog+ pattern it violates, the **layer + evidence** it came from, and a one-line remedy.+4. **Skill feedback** — real instances of existing checklist items vs new generalizable gaps+ worth adding to `ux`, **and** good cases worth landing as ✅ examples (see 回灌 below).++## Land the findings (shared)++An audit is not finished when the findings are written — it is finished when they are+**landed**. All three steps below are **required** to close a run:++- **Concrete bugs** → fix the top 🔴, or file as Linear sub-issues under the "UX Audit"+ parent (per-page container issue → one sub-issue per finding).+- **Generalizable gaps → 回灌 `ux` (mandatory).** Every run **must** close the loop back into+ the `ux` skill: for each finding that generalizes beyond this surface, add / strengthen a+ `ux` checklist item (rule + ✅/❌ example in the right module, **and** mirror a line into the+ ux Quick review), citing the audited surface as the ❌ example. This is what makes the audit+ _continuous_ — each run leaves the checklists sharper than it found them. If a run genuinely+ surfaces **no** generalizable gap, say so explicitly in the report's Skill-feedback section+ (only validated-existing-rule instances) — silence is not an acceptable close.+- **Exemplary good cases → 回灌 `ux`, refining the rule (not just decorating it).** The 回灌+ loop has two halves: a gap sharpens a checklist item's ❌ example, a good case sharpens its ✅+ one. But a good case is only worth landing if it **teaches the rule something** — the ✅+ example is the floor; **the goal is to sharpen the rule text or extract a latent sub-rule /+ checklist item** the current rule doesn't yet state. So when an audit finds a pattern done+ notably well, ask: _what technique does this do that the rule doesn't already demand?_ and+ fold that back — refine the prose, split a one-trigger rule into its real cases, add a+ checklist line — citing the surface as the ✅ example. A good case that merely re-illustrates+ an already-complete rule adds little; a good case that reveals a missing distinction is the+ point. (e.g. Fleet's scroll-into-view extracted "the re-run trigger has two flavors — async+ arrival vs. imperative-add-then-paint" and "the scroll axis follows the list direction" into+ Read §1.3; its skeleton extracted "match the text's **width proportion**, not just height"+ into Feedback §4.1 — neither was stated before.)+- **The audit** → save it as `references/example/<page>.md` so the next run has a template.++> The audit and the `ux` skill are a **closed loop**: `ux` is the benchmark the audit measures+> against, and the audit is the mechanism that keeps `ux` honest. Skipping the 回灌 breaks the+> loop and reduces the audit to a one-off review.## Related skills-- **[ux](../ux/SKILL.md)** — the execution checklists this audit measures against, and- where generalizable findings get landed.+- **[ux](../ux/SKILL.md)** — the execution checklists this audit measures against, and where+ generalizable findings get landed.+- **agent-testing** — the automation framework L3 drives (agent-browser CDP: snapshot / eval+ / screenshot / GIF). L3 assumes its Step 0 env + auth are green.- **review-checklist** — code-level review; this skill is its design-level sibling.- **skills-audit** — the same "periodic, evidence-based audit" shape, applied to the skill- catalog instead of a UI surface.+ catalog.diff --git a/.agents/skills/ux-audit/references/example/community-list.md b/.agents/skills/ux-audit/references/example/community-list.mdnew file mode 100644index 00000000000..8627da08d92--- /dev/null+++ b/.agents/skills/ux-audit/references/example/community-list.md@@ -0,0 +1,295 @@+# Worked example — Discover / Community **list surfaces** audit (Round 1 of LOBE-11148)++A real run of this skill against the Desktop **Discover / Community** area's **8 list+surfaces**, 2026-07 — `home · agent · model · provider · skill · mcp · workspace ·+ws-settings` (`src/routes/(main)/community/(list)/**` + the workspace pages under+`(detail)/`). Use it as a **template for the output shape**, not as current-state truth+(the code moves; re-verify before citing). Round 2 (the 8 **detail** surfaces) is separate.++**Surface class:** a **marketplace / registry browse** area (class peers: VS Code+Marketplace, npm / npmjs, HuggingFace Hub, Raycast Store, Ollama library, GitHub Topics;+the two workspace pages are an **org/team public profile** + **org settings** — GitHub /+HuggingFace orgs). The class benchmark is what catches the entirely-absent capabilities L1+can't see from code (installed-state on cards, verified badges, contribute-to-marketplace).++**Layers run:** L1 (static / code) ✅ — everything below, from a 5-way parallel read (one+reader owned the shared store/service seam). L2 (visual) / L3 (dynamic + CLS) ⏳ not yet+run — see §5. Verdicts about the render (dominant control, does empty _read_ as a real+page, spacing, number overflow) are L1 inferences here, tagged **pending L2**.++**The one root cause under most of this.** Every Discover list is powered by+`useSWR(key, fetcher, { revalidateOnFocus: false })` with **no `onError`, no init flag, and+no `error` field in the store** (uniform across all 8 slices in `store/discover/slices/*`),+and **every call site destructures `{ data, isLoading }` and discards `error`**, then gates+`if (isLoading || !data) return <Loading/>` (`(list)/agent/index.tsx:18,29` + the 7 twins).+The fetcher rejects on failure (`services/discover.ts:106-119`) **and explicitly suppresses+the fallback notification** (`{ context: { showNotification: false } }`, `discover.ts:117`).+So a failed market fetch → `data` stays `undefined` → `!data` is permanently true → the+skeleton spins **forever**, no error, no retry, no toast, on the primary content of every+Discover tab. Fixing this once — at a shared list-shell / call-site convention that reads+`error` and renders failed/empty/loading uniformly — closes gaps ①②③④ at once.++## 1 — Patterns in use (consolidated across the 8 surfaces)++| Pattern (family) | Where (block + file) | Rating | Note |+| -------------------------------------------------- | ----------------------------------------------------------------------------------- | ------- | ------------------------------------------------------------- |+| Global Navigation (nav) | sidebar `_layout/Sidebar/Header/Nav.tsx:36-77` (6 tabs) | ✅ | persistent, workspace-aware |+| Clear Entry Points / Hub (nav) | home `(home)/index.tsx:37-45` featured sections + "more →" | ✅ | home spokes into agent / mcp lists |+| Deep-linking (nav) | search/sort/page/category/source all in URL → SWR key | ✅ | state fully URL-restorable |+| Grid of Equals / Card (layout) | every `features/List/index.tsx` `<Grid>` of `Item` | ✅ | equal-weight clickable tiles |+| Overview + Detail (data) | card `Item.onClick → navigate(detail)` | ✅ | card → detail; add/install lives on detail |+| Dynamic Queries — server filter/sort/search (data) | `Search.tsx:38`, `SortButton/index.tsx:181-183`, `Category/index.tsx` | ✅ | **server re-query, not client reorder** — highlight |+| Pagination at scale (data) | `(list)/features/Pagination.tsx`, pageSize 21 (home 12) | ✅ | server-paged; scroll-to-top on change |+| Loading Skeleton (feedback) | `Loading/ListLoading/GridLoadingCard.tsx` | ⚠️ | chrome-matched, but **permanent on error** (gap ①) |+| **Failure + Retry (feedback)** | every list fetch | — abs. | **the dominant gap** — no surface reads `error` (①②) |+| Empty-state (growth) | 5 `*Empty.tsx` + workspace lists | ⚠️ | real page but **no CTA**, **no-match variant dead** (③④) |+| Verified / official badge (data) | mcp `Item.tsx:157-191` (`OfficialIcon`+`isValidated`); **skill: none** | ⚠️ | present on mcp only — **skill card has no trust mark** (⑦) |+| Number abbreviation (data) | skill/mcp `MetaInfo.tsx` raw `{installCount}`/`{stars}`; agent `TokenTag.tsx:43` | — abs. | no `formatShortenNumber` roll (gap ⑥) |+| Card "installed / added" state (data) | every list `Item.tsx` | — abs. | marketplace class norm missing on the tile (gap ⑤) |+| Contribute / submit (growth) | header `CreateButton/Inner.tsx:44-50` | ⚠️ | opens a docs modal → **GitHub**, no in-app submit (gap ⑧) |+| Source / registry switch (nav) | `agent/features/MarketSourceSwitch.tsx` | — orph. | built but **never mounted** — source only settable by URL (⑨) |+| Modal Panel (nav) | `WorkspaceProfileModal` (`createModal`, base-ui) | ⚠️ | `maskClosable:true` + in-memory draft (gap ⑩) |+| Autosave save-state (feedback) | `CommunityWorkspaceSettings.tsx:310-352` per-field Save | ✅ | explicit Save + toast — the §4.4 pattern done right |+| Follow / social (growth) | workspace page: `FollowButton/FollowStats` **unused**; `followersCount:0` hardcoded | — abs. | org profile isn't followable (class norm) (gap ⑪) |++**Read:** the **browse spine is mature** (server filter·sort·search·paginate, chrome-matched+skeletons, working card→detail). The weakness clusters, in order: **Feedback — failure+handling** (①②, every fetch resolves only to success or hangs), **Read — empty-state+fidelity** (③④, no-match collapses into first-run onboarding; no CTA), **marketplace class+norms** (⑤⑦⑧, no installed-state, no verified-badge parity, contribute dead-ends to GitHub),+**consistency** (provider structurally diverges, skill vs mcp cards disagree), and a set of+**dead / orphaned controls** (⑨ + `Client.tsx`, `VirtuosoGridList`, `SearchResultCount`).++## 2 — Strengths / good cases (don't regress)++Unlike the Task / Eval / Memory / Pages audits, the **browse spine is genuinely strong** —+these are the ✅ half of the 回灌 loop and the "don't regress" list for the next refactor:++- **✅ 亮点 — Search・sort・category・pagination are all URL-driven and re-query the+ server** (→ landed as ux **Read §1.2** ✅, and _sharpened_ the rule with the latent sub-rule+ it teaches). `q` / `sort` / `page` / `category` flow into the SWR key (`libs/swr/keys.ts`;+ `Search.tsx:38`, `SortButton/index.tsx:181-183`, `Pagination.tsx`), so **none** of the+ client-side-filter-over-a-partial-page false-empty traps that bit every other list audit+ apply here — and the full browse state is URL-restorable. The teaching folded back: the+ **URL-as-source-of-truth mechanism** is _why_ server-query + deep-link + restore all hold at+ once.+- **✅ 亮点 — Skeletons reuse card chrome.** `ListLoading.tsx` / `GridLoadingCard.tsx` mirror+ the loaded card for a low-CLS in-place load→content swap (Feedback §4.1) — the read side's+ one solid piece of feedback hygiene (the failure branch above it is gap ①).+- **✅ 亮点 — Workspace write side is mature (→ cited as ux Feedback §4.4 ✅).** the profile+ modal, per-field settings Save, member sync, and avatar / banner uploads all do+ `try/catch/finally` + success/error toast (`CommunityWorkspaceSettings.tsx:310-352`,+ `WorkspaceProfileModal/Content.tsx:129-262`) — the discipline the read side should copy.+- **The no-match empty variant is already built.** The 5 `*Empty` components carry a `search`+ variant in their API (`AssistantEmpty.tsx:11-27` + twins); it's just never wired (gap ④), so+ fixing the false first-run empty is one-prop wiring, not a from-scratch build — a quiet+ head-start worth not regressing.++## 3 — Experience gaps (ranked)++**① Every list fetch can't fail → permanent skeleton, no retry, no toast — Feedback §4.2 / Read §1.1** 🔴+All 8 surfaces call `const { data, isLoading } = useXxxList(...)` and render+`if (isLoading || !data) return <Loading/>` — **`error` is never read**+(`(list)/agent/index.tsx:18,29`; `mcp/index.tsx:18,27`; `model/index.tsx:18,27`;+`provider/index.tsx:18,26`; `skill/index.tsx:18,27`; `(home)/index.tsx:20-32`; workspace+via a NotFound variant, gap ②b). The slices register **only** `revalidateOnFocus:false`+(`store/discover/slices/assistant/action.ts:69-83` + 7 twins) — no `onError`, no init flag;+`!data` **is** the success-only gate. The service both rejects **and** suppresses the+fallback notification (`services/discover.ts:117` `showNotification:false`). So when the+market fetch 500s / times out, SWR exhausts retries → skeleton (`ListLoading`) spins+**forever**, no reason, no Reload, not even a toast, on the primary content of every Discover+tab. This is the Eval/Task/Memory `onSuccess`-only trap in its **purest** form. Home+compounds it: `(home)/index.tsx:32` gates the whole page on **both** the assistant **and**+mcp lists, so one failed list hangs the entire home. _Remedy:_ read `error` at the call site+(or a shared list-shell); render a failed state with Reload (SWR `mutate` — already returned)+**before** the `!data` branch; gate each home section independently.++**② The list body never renders empty-or-error — only Loading or data; and workspace turns a failure into a 404 — Read §1.1** 🔴+Because the page gate is `!data`, the `<List>`'s own empty branch+(`agent/features/List/index.tsx:17` `if (data.length === 0) return <AssistantEmpty/>`) is+**only reachable on a successful empty response** — a failed fetch renders Loading, never+Empty, never error, and the route `error.tsx` boundary only catches _thrown_ render errors,+which a discarded SWR rejection is not. **(②b, the workspace spelling)** the public page+drops `error` (`workspace/index.tsx:40-46` destructures `{ data, isLoading, mutate }`) and+gates `if (!contextConfig) return <NotFound/>`, so a transient 500 tells the user the+**workspace doesn't exist** with no Reload (`mutate` is right there, unused) — the+failure-as-404 masquerade (Read §1.1). _Remedy:_ branch `error` to a reload state distinct+from a resolved not-found; keep the empty branch for genuine zero-rows.++**③ Category-count fetch failure silently coerces `error → []` → counts vanish, total reads 0 — Read §1.1** 🟠+Every category rail does `const { data: items = [] } = useXxxCategories(...)`+(`agent/features/Category/index.tsx:25` + model/skill/mcp twins) — `error` discarded. A+failed categories fetch renders the rail with **every count gone and the "all" total+computed to 0** (`:49`), telling the user the catalog is empty rather than "couldn't load".+The `data ?? [] → looks-empty` trap on the filter rail. _Remedy:_ read `error`; show counts+as unknown / a retry, not a false 0.++**④ The "no search results" empty is dead code — every zero-result search reads as first-run "nothing here yet" — Read §1.1 (empty variants) / §1.2** 🟠+All 5 `*Empty` components take a `search?: boolean` that swaps to the "no match" copy ++`type='default'` (`AssistantEmpty.tsx:11-27` + McpEmpty/ModelEmpty/ProviderEmpty/SkillEmpty+twins; i18n keys exist). **No List ever passes it** (`grep 'search={' ` over the area → 0+hits; every `features/List/index.tsx` renders `<XEmpty/>` bare). So `q=zzznomatch` returns+zero rows and shows the **onboarding "discover / create your first…" page** instead of "no+results for zzznomatch — clear filters," with no clear-filters affordance — the two distinct+screens the checklist requires collapsed to the wrong one, the built variant unreachable.+Also `SearchResultCount.tsx` ("N results for X") is imported by nothing, so a successful+search gives no "you searched X → N" affirmation either. _Remedy:_ thread `search={!!q ||+!!category}` (the query is already in scope) page → `List` → Empty, and add a clear-filters+action. One-prop wiring; the component work is done.++**⑤ Cards carry no "installed / added / owned" state — marketplace class norm miss — Act §3.4 / class benchmark** 🟠+No list `Item.tsx` reflects whether the user already has this agent / model / provider /+skill / mcp — an owned item looks identical to a new one, and the add/install lives only one+level down on the detail (`(detail)/mcp/.../ActionButton/index.tsx` already knows+`pluginSelectors.isPluginInstalled`; the list just doesn't read it). Every class peer (VS+Code Marketplace "Installed", Raycast "Added", Ollama) badges owned items on the browse+tile. An entirely-absent capability L1 catches only via the class benchmark (no `file:line`+to grep). _Remedy:_ read owned/installed state into the card; badge it (and/or offer inline+add for bulk↔single parity). **Note** skill "install" is a copy-prompt-to-agent flow+(`(detail)/skill/.../Platform.tsx:196`), so "installed" needs its own definition there first.++**⑥ Install counts / stars / tokens render raw — no K/M/B roll — Read §1.5** 🟠+skill/mcp `MetaInfo.tsx` render `{installCount}` / `{stars}` / `{commentCount}` verbatim+(a 40 000-install server prints `40000`), and agent `TokenTag.tsx:43` uses+`formatIntergerNumber` rather than the `formatUsageValue` ladder — while the shared+`formatShortenNumber` is already imported one directory over in `features/LikeButton.tsx`.+Registry install/star counts are exactly the "scan, don't account" case §1.5 names.+_Remedy:_ wrap the counts in `formatShortenNumber` (one-line import); token usage in+`formatUsageValue`. **(pending L2** for whether large values actually overflow the tag.)++**⑦ Cross-surface inconsistency — provider diverges structurally; skill vs mcp cards disagree on trust & meta — Certainty / consistency-is-semantic (Read §1.1)** 🟠+Two seams a per-surface split would miss: **(a)** of the five lists, agent/model/skill/mcp+each have a `_layout` mounting a `Category` rail; **provider has neither** (registered as a+bare route element, `desktopRouter.config.tsx:249-258`), so moving Models → Providers+silently drops the category facet and the whole layout shape changes. **(b)** the mcp card+shows an `OfficialIcon` + verified/validated badge (`mcp/Item.tsx:157-191`) and an+`InstallationIcon`; the **skill card has no trust mark at all** though skills are equally+installable third-party code, and the two meta rows disagree (skill: install+stars+comments;+mcp: install+stars) as do avatar shapes (round vs square). _Remedy:_ record+provider-has-no-category as an intentional decision or add the rail for parity; define **one+registry-card contract** (verified badge, install count, star count, what's-inside) and+apply it to both skill and mcp.++**⑧ "Create" is a dead-end docs modal → GitHub, not an in-app submit — Grow §5.3 / Act §3.1** 🟠+The header "Create" (`CreateButton`, shown on every non-custom-branding Discover page via+`_layout/Header.tsx:29`) opens a modal whose only action opens **GitHub** in a new tab+(`CreateButton/Inner.tsx:44-50` `window.open(AGENTS_INDEX_GITHUB)`). On a marketplace this is+the primary "contribute" affordance and it hands the user to an external repo with no+in-product path — the browse → contribute loop dead-ends. _Remedy:_ wire an in-app submit if+one exists, else rename the button (it over-promises "Create" for a docs link). **(pending+L2** for whether the GitHub button reads as the modal's dominant CTA.)++**⑨ Orphaned & dead controls/components — Certainty / maintenance** 🟡+`MarketSourceSwitch.tsx` is a complete, correct source toggle that **nothing mounts** — the+new/legacy market source is settable **only by hand-editing `?source=`** (the UI to change it+is orphaned). Alongside it: `agent/Client.tsx` (a near-duplicate of `index.tsx`, imported+nowhere), the `VirtuosoGridList` / `VirtuosoList` virtual-scroll components (imported+nowhere), `SearchResultCount.tsx` (gap ④), and the fully-built-but-commented-out+`WorkspaceSkillList` + `SubmitRepoModal`. _Remedy:_ mount `MarketSourceSwitch` (into+`(list)/_layout/Header.tsx`, agent-tab only) or delete it; prune the rest or gate it clearly.++**⑩ Workspace read-side & write-draft gaps — Read §1.1 / Edit §2.1 / Act §3.4** 🟠+The workspace pages are the exception to "read-only browse" (they edit), and their gaps are+read-side: **(a)** filtered/searched-empty renders a bare `<Grid>` with a `0` count — each+list gates `isEmpty` on the **raw** array not the **filtered** result while the status filter+defaults to `published` (`WorkspaceAgentList.tsx:56`, `filterWorkspaceMarketItems.ts:29`), so+an owner whose agents are all unpublished sees a titled section over blank space with no+"no match" state; **(b)** members table + settings have **no error branch** (a failed member+fetch reads as "no members yet", `CommunityWorkspaceSettings.tsx:202-216`; a failed profile+load renders a near-blank page, `:424-426`) — stub-blind on the closed hook, but the consumer+has no path regardless; **(c)** the profile modal is `maskClosable:true` over an in-memory+`useState` draft (`WorkspaceProfileModal/index.tsx:31`, `Content.tsx:75-81`) so a backdrop+misclick vaporizes a filled-out org profile incl. an uploaded banner (Edit §2.1, twin of the+create-task draft ❌); **(d)** members are display-only (Sync, no invite/role/remove — Act+§3.4, possibly intentional but should be surfaced copy); **(e)** settings doesn't close the+config→manage loop back to the public page (Grow §5.3). _Remedy:_ gate empty on the filtered+length + a `search`-variant empty; give members/settings a real error branch; `maskClosable:+false` (or a dirty-guard) on the modal; a "View public page →" link in settings.++**⑪ Org public profile isn't followable — class norm — Grow / class benchmark** 🟡+The workspace page hardcodes `followersCount:0 / followingCount:0`+(`workspace/index.tsx:71-72`) and renders no `FollowButton`/`FollowStats` (the user-profile+page has them, unused here). GitHub / HuggingFace orgs are followable — for an org public+profile, follow is a class norm. May be intentional for orgs; flag it. **(pending L2.)**++**⑫ Robustness / polish minors — correctness / i18n / Meaningful** 🟡++- provider card "view source" link hardcodes the **legacy `lobehub/lobe-chat`** path+ (`provider/Item.tsx:92`) — very likely 404; config now lives in `model-bank`. _(confirm the+ 404 at L3.)_+- `ModelTypeIcon.tsx:32` `icon={icons?.[type]}` over a fixed 8-key map → an unknown/new model+ type renders a **blank badge** with a tooltip.+- model `Item.tsx:162` `date={releasedAt || dayjs().toISOString()}` fabricates **"published+ today"** for a model with no release date, on a sortable-by-release list.+- footer sign-in (`(list)/_layout/Footer.tsx:34-42`) `catch {}` conflates user-cancel with a+ real OAuth/network failure → a genuine sign-in error is swallowed silently (Feedback §4.2 /+ Act §3.5).+- search box seeds `word` from `q` once via `useState` (`Search.tsx:36`) → stale after tab+ switches (minor desync, Edit §2.2); and `handleSearch` **replaces** the whole query with+ just `q` (`:38-43`), dropping the active `category`/`sort`/`source` — searching inside a+ filter throws you back to the full catalog.+- skill card resource tag `{(resourcesCount||0)+1}` (`skill/Item.tsx:186`) is an unlabeled+ magic number.+- hardcoded `defaultValue: '创作的群组'` (`WorkspaceGroupList.tsx:61`) flags a possibly-missing+ i18n key. _(most of these are pending L2 for visual impact.)_++## 4 — Skill feedback (回灌)++- **Landed as strengthened `ux` items** from this audit:+ - Read **§1.1** — new ❌ example (a distinct sub-shape): the empty component **ships a+ `search`/no-match variant but the call site never passes it**, so a legitimate+ zero-result search renders the first-run onboarding empty — the 5 Discover `*Empty`+ components + bare `<XEmpty/>` at each `features/List/index.tsx:17` (gap ④). Mirrored into+ the Quick review.+ - Feedback **§4.2** — new ❌ example (the **purest** form yet): 8 Discover list slices+ register only `revalidateOnFocus:false`, `error` is discarded at every `{data,isLoading}`+ call site, `!data` **is** the success-only gate, and the service suppresses even the+ fallback toast (`showNotification:false`) — one root cause, 8 surfaces (gap ①).+ - Read **§1.5** — new ❌ example: registry **install/star counts render raw**+ (`{installCount}`/`{stars}` in skill/mcp `MetaInfo.tsx`) though `formatShortenNumber` is+ imported one directory over (gap ⑥).+ - Read **§1.9 (new)** — a **marketplace / registry browse-card class-norm** item: the tile+ must reflect **owned/installed state** and **trust badges (verified/official) consistently+ across sibling registries**, distinguish no-results from first-run, and route "contribute"+ to an in-app submit — named as a class norm so the absent affordance is caught (gaps+ ⑤⑦⑧). Mirrored into the Quick review.+- **Landed as ✅ good-case examples (the other half of 回灌 — each _sharpens_ the rule, not just decorates):**+ - Read **§1.2** — the good case (search·sort·category·page all URL-driven, §2) extracted a+ **latent sub-rule the rule didn't state**: making the **URL the single source of truth for+ list read-state and deriving the fetch key from it** is what makes server-query ++ deep-link + restore fall out _by construction_ — added as prose + a new checklist line ++ the Discover ✅ example + mirrored to the Quick review. (This is why the surface's only+ read-side gap is failure handling, not query correctness.)+ - Feedback **§4.4** — the workspace write side (§2) sharpened the rule from "**autosave**+ must surface state" to "**any** save mechanism must — and an **explicit per-field `Save`**+ is an equally valid convention that still owes the failure signal": added the distinction ++ the `CommunityWorkspaceSettings.tsx:310-352` ✅ example + updated the checklist line.+- **Validated existing rules** (good ❌ examples to cite): Read §1.1 failure-as-404 masquerade+ (gap ②b, workspace `!contextConfig → NotFound`); Read §1.1 always-rendered-chrome / real+ empty with CTA (gap ②/⑩a, bare `<Grid>` over a `0` count); Edit §2.1 in-memory draft lost+ on `maskClosable` close (gap ⑩c); Act §3.4 listed-entity lifecycle / installed-state (gap+ ⑤); Feedback §4.4 — the workspace **write side is a ✅** to cite (per-field Save ++ toast done right).+- **Noted, not yet landed** (promote if a second surface repeats): search that **replaces**+ the active filter scope instead of composing with it (gap ⑫); orphaned/dead UI controls as+ a Certainty smell (gap ⑨).++## 5 — Pending: L2 visual + L3 dynamic++L1-only; a later pass should confirm / quantify:++- **L2 (visual)** — does the permanent skeleton (gap ①) read as "still loading" indefinitely;+ do the `*Empty` "page"-type states read as real pages or dead space (gaps ②④⑩a); is the+ CreateButton GitHub button the dominant CTA (gap ⑧); does provider's missing category rail+ leave obvious dead space vs the model page (gap ⑦a); do raw counts overflow the tag (gap ⑥);+ dark mode + narrow width of the grids; CLS across skeleton → grid at pageSize 21.+- **L3 (dynamic)** —+ - Force any list fetch offline → **confirm gaps ①②** (permanent skeleton, no retry, no+ empty, no error) on every list; force the workspace fetch to 500 → **confirm gap ②b**+ (shows NotFound, no Reload).+ - Search a no-match term → **confirm gap ④** (onboarding empty, no clear-filters); force the+ categories fetch to 500 → **confirm gap ③** (counts silently vanish).+ - Seed a 40k-install server → **confirm gap ⑥** (raw `40000`); click a provider "view+ source" → **confirm gap ⑫** (404 on the legacy path).+ - **Measure list CLS/LCP** across skeleton → grid, and the source-switch / page-change+ refetch.diff --git a/.agents/skills/ux-audit/references/example/create.md b/.agents/skills/ux-audit/references/example/create.mdnew file mode 100644index 00000000000..b9dd28bf54e--- /dev/null+++ b/.agents/skills/ux-audit/references/example/create.md@@ -0,0 +1,185 @@+# Worked example — Create surfaces (视频创作 / 图像创作) audit++A real run of this skill against the two desktop **generation** surfaces —+`src/routes/(main)/(create)/video` and `.../image` — 2026-07 (LOBE-11151, under the+desktop-main-area audit LOBE-11098). Use it as a **template for the output shape**, not as+current-state truth (the code moves; re-verify before citing).++The two surfaces are **near-identical**: both compose the shared shell+`src/routes/(main)/(create)/features/` (`CreateGenerationPage` → `GenerationWorkspace` →+`Content` / `EmptyState`, `GenerationLayout` sidebar) over a per-medium store+(`src/store/{video,image}`) with the same four slices (`generationConfig` /+`generationTopic` / `generationBatch` / `create{Video,Image}`). So most findings are+**shared code → both surfaces at once**, and several live in the shell, meaning any future+generation surface inherits them.++Surface = left topic sidebar → center workspace (skeleton → empty(composer) → feed of+generation batches) → PromptInput composer (prompt + inline reference upload + ConfigPanel+popover).++**Layers run:** L1 (static / code) ✅ — everything below. L2 (visual) / L3 (dynamic ++CLS + navigate-away behavior) ⏳ not yet run — see §5.++**Surface-class benchmark (named first, per SKILL.md ground rule).** Generation surfaces+(Midjourney / DALL·E / Ideogram / Leonardo / Runway / Kling / Sora) carry class norms a+code-only read is blind to: prompt history/reuse ✅ (the durable batch feed + Reuse+Settings / Copy Prompt), batch + variations ⚠️ (Reuse-Settings-then-regenerate, no+"vary"), seed reproducibility ✅ (Copy/Apply Seed), persistent gallery ✅ (server-side+batches), reference/frame upload ✅ (ImageUpload / FrameUpload), capability gate ✅+(`image/NotSupportClient.tsx`), **cancel a running job ❌** (gap ②), **result→input reuse+❌** (gap ⑤), **async-completion signal for long video jobs** ⏳ (pending L3), cost/quota+before generate ⏳ (not surfaced; out of L1 scope).++## 1 — Patterns in use++| Pattern (family) | Where | Rating | Note |+| ----------------------------- | -------------------------------------------------------------------- | ------ | ----------------------------------------------------------- |+| Global Navigation (nav) | `GenerationLayout/Sidebar` topic list | ✅ | persistent, per-medium |+| Center Stage (layout) | composer centered on empty; feed + bottom composer when populated | ✅ | textbook creation-tool shape |+| Card Stack / Grid (data) | `GenerationFeed` batch items; image N-up grid | ✅ | |+| Overview + Detail (data) | batch → per-generation success/loading/error item | ✅ | |+| Skeleton loading (feedback) | `SkeletonList` while `!isCurrentGenerationTopicLoaded` | ⚠️ | **success-only gate → permanent on error** (gap ①) |+| Progress Indicator (feedback) | `VideoLoadingItem` circular %, `ElapsedTime` (sessionStorage-backed) | ✅ | elapsed survives remount |+| **Cancelability** (action) | — | — | **absent-but-expected**: no stop/abort, only delete (gap ②) |+| Failure + Retry (feedback) | `VideoErrorItem` / `ErrorState` render reason + Copy Error | ⚠️ | **no in-place Retry** — only delete + re-create (gap ②/③) |+| Good / Smart Defaults (input) | model/provider restored from `globalStore.status`; seed randomizer | ✅ | last model persists (config does not — gap ⑥) |+| Button Groups (action) | hover row: Reuse Settings / Copy Prompt / Delete | ✅ | |+| Prominent "Done" (action) | Generate button | ✅ | one primary (pending L2) |+| Capability gate (feedback) | `image/NotSupportClient.tsx` (CLI / self-hosted upsell) | ✅ | class-norm gate present |+| Empty-state as onboarding | `EmptyState` = centered composer, **no examples/showcase** | ⚠️ | bare first-run (gap ④) |++**Read:** navigation, feed, progress and defaults are solid. Weakness clusters in+**Feedback (failure paths)** — the same family this codebase is repeatedly weak in — and in+two absent generation-class affordances (cancel, result→input).++## 2 — Strengths / good cases (don't regress)++The surface is strong where it counts — these are the ✅ half of the 回灌 loop and the "don't+regress" list for the next refactor. Most live in the **shared shell**+(`src/routes/(main)/(create)/features/`), so any future generation surface inherits them; two of+them (marked `→ landed as ux … ✅`) taught the checklists a latent sub-rule this run — see §4:++- **✅ 亮点 — Durable batch feed as persistent gallery.** Submitted batches are server-side and+ survive reload, so `GenerationFeed` is a real gallery, not an in-session scratchpad — this is+ what carries the class-norm "prompt history / persistent gallery" affordance a code-only read+ usually finds absent. Load-bearing because the whole result→reuse story (Copy Prompt / Reuse+ Settings / seed) depends on results still being there after a refresh.+- **✅ 亮点 — Generation-class reproducibility on every row.** The hover row exposes Copy / Apply+ Seed + Reuse Settings + Copy Prompt (Button Groups pattern), so any past generation can be+ reproduced or nudged. Seed reproducibility + settings reuse are generation-class norms (Copy /+ Apply Seed), and they're present on **every** batch row rather than buried in a detail view.+- **✅ 亮点 — Reference /frame upload accepted inline.** `ImageUpload` / `FrameUpload` let the+ composer take reference images and video frames inline — the reference-upload class norm is met.+ Load-bearing precisely because gap ⑤ is about the _missing_ bridge back: the accept side is+ already built, so result→input reuse is a wiring gap, not a from-scratch feature.+- **✅ 亮点 — Capability gate present. → landed as ux Feedback §4.3 ✅** `image/NotSupportClient.tsx`+ renders a full-surface CLI / self-hosted explainer **with the remedy** (self-host-DB + hosted-app+ links) instead of a broken composer when the client build lacks the generation backend. This+ sharpened §4.3: its "soft inline warning, never a hard block" rule silently assumed a+ **user-fixable-here (model/config)** gap; this is a **platform/deployment** gap the user _can't_+ flip on-screen, so a full-surface gate carrying the remedy is correct — a distinction §4.3 didn't+ draw before.+- **✅ 亮点 — Elapsed time survives remount. → landed as ux Feedback §4.1 ✅** `ElapsedTime` reads+ `generation_start_time_{generationId}` from sessionStorage on mount and `removeItem`s it when the+ job leaves active (`image/…/GenerationItem/ElapsedTime.tsx:33-49`), so the per-job clock recovers+ true duration across a remount rather than resetting to zero. This extracted a latent §4.1 rule+ the skeleton-focused prose didn't state: a long-op elapsed / progress readout must derive from a+ **persisted start-timestamp keyed by job id** (survives remount) and clear it on completion, never+ a local counter that restarts at 0.++## 3 — Experience gaps (ranked)++**① Failed batch-list fetch → permanent skeleton — ux Feedback §4.2 + Read §1.1** 🔴+`useFetchGenerationBatches` registers **`onSuccess` only, no `onError`**+(`store/video/slices/generationBatch/action.ts:242-266`, `store/image/…/action.ts:165-191`)+and writes `generationBatchesMap[topicId]` only on success. The "loaded" gate is+`isCurrentGenerationTopicLoaded = Array.isArray(map[topicId])` (`…/selectors.ts:23-27`) — a+success-only init flag wearing an `Array.isArray` disguise. The **shared** shell renders+`!loaded → <SkeletonList/>`, `!hasGenerations → <EmptyState/>`, else feed+(`features/GenerationWorkspace/Content.tsx:39-45`) with **no error branch**. So a failed /+timed-out batch fetch never flips the flag → **permanent skeleton, no retry**, on **both+surfaces and any future one built on the shell**. (Sidebar `useFetchGenerationTopics` is the+same success-only shape — same risk on the topic list.)++**② No cancel for an in-progress generation — ux Act §3.1 + Cancelability pattern** 🟠 No+cancel / abort / stop action exists in either store (grep across `store/{video,image}` is+empty); the only way to stop a running job is **delete the batch**+(`BatchItem` delete → `console.error`-only, gap ③). Video jobs run minutes and cost tokens;+Cancelability is a generation-class norm (Runway / Kling / Sora all cancel a queued/running+job) and Act §3.1's async machine expects a **locked in-progress state that can be+cancelled**, not deleted after the fact. Also there is **no in-place Retry** on the error+item — recovery is "Reuse Settings → Generate again" by hand.++**③ Download & delete failures are silent, while sibling copy actions toast — ux Act §3.1** 🟠+Within the same file, `handleCopyPrompt` / `handleCopyError` / `handleCopySeed` surface+failure with `message.error(...)`, but `handleDelete` / `handleDeleteBatch` / `handleDownload`+only `console.error` (`video/…/GenerationFeed/BatchItem.tsx:81,113,129`;+`image/…/GenerationItem/index.tsx:47`), and image's `handleDownloadImage` has **no try/catch+at all** (`image/…/GenerationItem/index.tsx:~62`). A failed download (large video, flaky+net) gives the user zero feedback — a dead button. Inconsistent error feedback inside one+surface is itself the smell.++**④ Bare first-run empty state — ux Read §1.1** 🟡 `EmptyState` renders only the centered+`PromptInput` (`features/GenerationWorkspace/EmptyState.tsx:18-22`) — no example prompts,+model showcase, or "what you can make here". Generation tools teach first-run with a sample+gallery (Midjourney explore, DALL·E / Ideogram samples). The composer _is_ a defensible+empty state, so this is mild — **pending L2** for how bare it actually reads.++**⑤ A generated result can't be reused as input — ux Act §3.1 (forward momentum) / Grow** 🟡+Success items offer download / delete / copy-seed / reuse-settings, but no "use this+image/video as reference / edit / vary" — the artifact is terminal (`SuccessState` /+`VideoSuccessItem`). Both surfaces _accept_ reference uploads yet offer no one-click bridge+from a result back into the composer (img2img continuation, "vary", video frame reuse — all+generation-class norms). The forward path dead-ends at download.++**⑥ Draft (prompt + config) is in-memory only — ux Edit §2.1** 🟡 Neither store uses+`persist` (grep empty); prompt text and every config param (model / aspect / dimensions /+seed / steps) live in memory and vanish on reload/crash. _Nuance that lowers severity:_+submitted generations persist server-side (the feed is durable) and the prompt is+intentionally cleared post-submit, so the loss window is only the **unsubmitted** draft —+but a long crafted prompt + a tuned ConfigPanel wiped by an accidental refresh is real+effort lost. Second validated instance of §2.1 (after the home composer).++**⑦ A failed status poll is invisible — ux Read §1.7** 🟡 `useCheckGenerationStatus`+`onError` → `console.error` + doubled backoff (`…/generationBatch/action.ts:164-167,231-233`);+the item keeps showing the loading spinner with no "checking failed / still retrying" hint,+so a persistently failing poll is indistinguishable from a slow generation. Self-heals on+retry, hence minor — but "failed refresh ≠ still in progress" is the §1.7 rule.++## 4 — Skill feedback (回灌)++- **Validated existing rules** (good ❌ examples now cited in `ux`): Feedback **§4.2** (gap ①+ — permanent skeleton, and the new `Array.isArray(map[id])`-as-init-flag shape), Act **§3.1**+ (gap ③ — action-failure must surface, and the sibling-actions-toast-but-these-don't+ inconsistency), Edit **§2.1** (gap ⑥, second instance).+- **Landed as a new/strengthened `ux` item (from a gap ❌):** Act **§3.1** — a **long-running /+ costly async op (generation, export, upload) needs a Cancel affordance**, not+ delete-after-the-fact (gap ②); mirrored into the Quick review. This is the generalizable one —+ it recurs on any surface with a minutes-long, billable background job.+- **Landed from a good case ✅ (the other half of 回灌 — each sharpened a rule, not just decorated+ it):**+ - Feedback **§4.1** — extracted a latent sub-rule from `ElapsedTime`: a long-op elapsed /+ progress readout must derive from a **persisted start-timestamp keyed by job id** (survives+ remount) and clear it on completion, never a local counter that restarts at 0. The old §4.1+ prose was skeleton/CLS-only and never stated this.+ - Feedback **§4.3** — `NotSupportClient` split the capability-gate rule in two: the existing+ "soft inline warning, never a hard block" assumed a **user-fixable-here (model/config)** gap;+ a **platform/deployment** gap the user can't flip on-screen instead wants a **full-surface+ gate carrying the remedy**. §4.3 didn't draw this distinction before.+- **Noted, not yet landed** (promote if a second surface repeats): result→input reuse for+ generation surfaces (gap ⑤); example-gallery first-run for creation tools (gap ④).++## 5 — Pending: L2 visual + L3 dynamic++- **L2 (visual)** — does the Generate button read as the single dominant control on the+ composer (gap: pending-L2 verdict); how bare the empty state actually looks (gap ④); feed+ card CLS on the loading→success image/video swap; N-up image grid at narrow width; the+ circular-progress loading item vs loaded video (height match).+- **L3 (dynamic)** —+ - Force the batch fetch offline to **confirm gap ① live** (permanent skeleton, no retry) —+ the highest-value confirmation.+ - Start a long video generation, **navigate away, and check for any completion signal** on+ return (polling is per-mounted-item; there may be no async-done notification — a+ generation-class expectation for minute-long jobs).+ - Drive delete/download offline to **confirm gap ③** (silent failure).+ - **Measure create-workspace CLS** across skeleton→feed and loading-item→result swaps.diff --git a/.agents/skills/ux-audit/references/example/eval.md b/.agents/skills/ux-audit/references/example/eval.mdnew file mode 100644index 00000000000..185110fa52e--- /dev/null+++ b/.agents/skills/ux-audit/references/example/eval.md@@ -0,0 +1,126 @@+# Worked example — Eval (评测) module audit++A real run of this skill against the **Eval module**, 2026-07 — a benchmark / evaluation+platform: benchmark list (overview) → benchmark detail (datasets + runs tabs) → run detail+(long-running execution) → single test-case detail; plus dataset detail. Five surfaces under+`src/routes/(main)/eval/**` (feature-in-route layout), backed by+`src/store/eval/slices/{benchmark,dataset,run,testCase}`. Use it as a template for the output+shape, not current-state truth (re-verify before citing).++**Surface class:** eval / experiment platform — benchmark against OpenAI Evals UI / LangSmith+/ Braintrust.+**Layers run:** L1 (static / code) ✅. L2 / L3 ⏳ not run.++**Headline:** the **write side is mature** (run-execution state machine, delete lifecycle,+dataset-import wizard), but the **read side has no error handling at all** — one root cause+(every fetch resolves only on success) hangs all five surfaces on failure.++## 1 — Patterns in use++| Pattern (family) | Where | Rating | Note |+| -------------------------------------- | ------------------------------------------------------------------ | ------ | --------------------------------------- |+| Overview + Detail (nav) | overview → bench → run → case; dataset detail | ✅ | clean multi-level drill |+| Empty-as-onboarding (growth) | overview empty (`eval/index.tsx:83-95`), Datasets/Runs tab empties | ✅ | real pages + CTA |+| Loading Skeleton (feedback) | overview `SkeletonGrid` reuses card chrome | ✅ | textbook §4.1 |+| **Failure + Retry (feedback)** | every fetch | — abs. | systemic root cause (gap A) |+| **Loading state on detail (feedback)** | run / case / dataset detail | — abs. | `return null` → blank (gap B) |+| Run state machine (act/feedback) | idle / pending / external / running / finished | ✅ | mature — highlight |+| Progress + Live poll (data) | run detail 3s poll while active + progress bar | ✅ | §1.7 |+| Entity lifecycle — delete (act) | benchmark / dataset / testCase / run delete | ✅ | confirm + success/error toast |+| Entity lifecycle — create/edit (act) | RunCreate / RunEdit / BenchmarkEdit / BatchResume modals | ⚠️ | several lack error toast (gap F) |+| Wizard (input) | DatasetImportModal (Upload → Mapping) | ✅ | progress, validation, toast — highlight |+| Draft safety (edit) | all form modals | ⚠️ | in-memory only, no unsaved warn (gap H) |++**Read:** run-execution + delete + import are solid. The weakness clusters entirely in the+**read side** — list/detail `error` + `loading` — plus an inconsistent band of create/edit+mutations that surface success/failure unevenly.++## 2 — Strengths / good cases (don't regress)++The write side is mature where it counts — these are the ✅ half of the 回灌 loop and the "don't+regress" list for the next refactor. They're the validated ✅ baseline against which §3's read-side+❌ gaps are measured — keep them, don't "fix":++- **✅ 亮点 — Run-execution state machine.** idle / pending / external / running / finished with a+ 3 s poll while active + progress bar, plus retry-errors / batch-resume / per-case resume — each+ path confirm + loading + toast. Mature enough to be the module's flagship ✅ (act/feedback,+ §1.7).+- **✅ 亮点 — Full delete lifecycle.** benchmark / dataset / testCase / run delete all pair a+ confirm with a success/error toast — the consistent baseline the uneven create/edit writes+ (gap F) fail to match.+- **✅ 亮点 — DatasetImport two-step wizard.** `DatasetImportModal` (Upload → Mapping) runs upload+ progress, a parse-error toast, mapping validation gating the button, and an import lock with a+ success/error toast — textbook staged input.+- **✅ 亮点 — Overview empty-with-CTA + chrome-reusing skeleton.** the overview empty state is a+ real page + "create your first benchmark" CTA (`eval/index.tsx:83-95`), and its `SkeletonGrid`+ reuses the card chrome for an in-place load→content swap with no relayout (textbook §4.1).+- **No antd `Spin` anywhere.** loading is always a chrome-matched skeleton rather than a bare+ spinner — a quiet correctness win worth keeping.++## 3 — Experience gaps (ranked)++**🔴 A — No error/retry anywhere; every fetch resolves only on success → permanent skeleton /+blank / false-empty.** Systemic: each slice inits `isLoadingX: true` / `xInit: false` and+flips them **only in `onSuccess`, with no `onError`** across all 9 fetches+(`benchmark/action.ts:106-130`, `dataset/action.ts:35-67`, `run/action.ts:151-209`,+`testCase/action.ts:42-72`). Consumers hang differently:++- **overview false-empty** — reads SWR `isLoading`; failure → empty list → "create your first+ benchmark" onboarding (`eval/index.tsx:81-95`).+- **sidebar permanent skeleton** — gated on `benchmarkListInit` (success-only)+ (`_layout/Sidebar/Body/BenchmarkList.tsx`, `benchmark/initialState.ts:17`).+- **bench detail permanent skeleton** — `if (!benchmark) return <Skeleton>`+ (`bench/[benchmarkId]/index.tsx:114`).+- **run / case / dataset detail permanent blank** — `if (!record) return null`+ (`runs/[runId]/index.tsx:85`, `cases/[caseId]/index.tsx:79`, `datasets/[datasetId]/index.tsx:202`).+ → Feedback §4.2 + Read §1.1 (error before empty). The module's flagship ❌ example.++**🟠 B — run / case / dataset detail have no loading state (`return null` → blank flash).**+Even on the happy path the first frame is blank, not a skeleton (`runs/[runId]/index.tsx:85`,+`cases/[caseId]/index.tsx:79`, `datasets/[datasetId]/index.tsx:202`). → Read §1.1 ("loading is+a skeleton, never a blank flash"). Distinct from A: A = no error, B = no loading.++**🟠 C — case detail deep-linked to a non-existent case → permanent blank, no not-found.**+`caseResult` comes from `results.find(testCaseId === caseId)`; a miss stays `null` → blank, no+"case not found" (`cases/[caseId]/index.tsx:41-46,79`).++**🟠 F — several async writes lack an error toast, inconsistent with the delete paths.**+Delete (benchmark/dataset/testCase/run) all confirm + success/error toast; but RunCreateModal,+RunEditModal, BatchResumeModal, and BenchmarkEditModal surface nothing on failure (rely on+silent store handling); BenchmarkEdit also shows no loading button state. Same "submit" intent,+uneven feedback. → Act §3.1 (done/error), Feedback §4.4.++**🟡 D — i18n: hardcoded English strings.** `'Failed to start run'` fallback ×3+(`RunsTab/RunCard.tsx:220`, `runs/[runId]/features/RunHeader/index.tsx:231`,+`runs/[runId]/features/IdleState/index.tsx:122`); `'Awaiting for external evaluation'`+(`CaseResultsTable/index.tsx:211`, also should read "Awaiting external evaluation"); two+DatasetEditModal placeholders (`features/DatasetEditModal/Content.tsx:204,207`).++**🟡 E — same data, two loading sources.** The benchmark list loads via SWR `isLoading` in the+overview but via store `benchmarkListInit` in the sidebar → failure diverges (false-empty vs+permanent skeleton). Consolidate to one loading/error/empty source.++**🟡 G — async actions signal success only via polling, no explicit forward feedback.** start+run / resume case / batch resume give no success toast; the user waits on the 3s poll to see+the status change (`runs/[runId]/index.tsx`). → Act §3.1.++**🟡 H — form modals keep in-memory drafts only; no unsaved-changes warning on close.** All+create/edit/import modals lose their input on accidental close (`features/**Modal/Content.tsx`).+→ Edit §2.1 (lighter for modals).++## 4 — Skill feedback++- **Landed as ❌ examples on existing rules** (no new rules — Eval is a textbook instance):+ - Feedback **§4.2** — the whole-module `onSuccess`-only / no-`onError` pattern (gap A).+ - Read **§1.1** — Eval overview added to the error-before-empty example (gap A); a new ❌+ that a detail `return null` is not a loading state (gap B), plus a checklist clause.+- **Validated existing rules:** §4.2 permanent-skeleton, Read §1.1 empty-vs-failed, Act §3.1+ done/error feedback (gaps F/G).++## 5 — Pending: L2 + L3++- **L2** — how the permanent skeleton / blank actually look; the run-detail report layout;+ narrow-width of the benchmark card grid.+- **L3** — force each fetch to fail to confirm gaps A/B/C live (permanent skeleton / blank);+ run a real eval to watch running→finished, progress, and a mid-run poll failure (gap: silent,+ keeps polling); force a create/resume failure to confirm gap F (no toast).diff --git a/.agents/skills/ux-audit/references/example/fleet.md b/.agents/skills/ux-audit/references/example/fleet.mdnew file mode 100644index 00000000000..0dbc5f91f34--- /dev/null+++ b/.agents/skills/ux-audit/references/example/fleet.md@@ -0,0 +1,175 @@+# Worked example — Fleet view (`/fleet`) audit++A real run of this skill against the **Fleet view** ("Observation Mode"), 2026-07 — a+side-by-side, drag-reorderable **column board of running agent tasks**: a left running-task+sidebar portaled into the global NavPanel + a horizontally-scrolling board where each running+topic is an independently-scrollable, resizable conversation column, auto-populated from a+live poll of the account's running topics. Use it as a template for the output shape, not as+current-state truth (the code moves; re-verify before citing).++**Surface class:** live multi-column dashboard — benchmark against **TweetDeck / column+dashboards**, CI run boards (GitHub Actions), and Kanban boards (Trello). Class norms: each+column + the board have empty/loading/**error** states; a live feed **signals new items** and+offers **manual refresh**; add / remove / reorder / persist columns; a "keep this column"+marker actually protects it.+**Layers run:** L1 (static / code) ✅ — everything below. L2 (visual) / L3 (dynamic + CLS)+⏳ not yet run — see §5. Verdicts about the render are L1 inferences here, pending L2.++**Load-bearing files:** `routes/(main)/fleet/index.tsx`, `features/Fleet/{index, ColumnsBoard,+AgentColumn, RunningTaskSidebar, AddColumnButton, RowsSwitcher, FleetPanelCollapseSync}.tsx`,+`features/Fleet/{store, useRunningTopics, idleColumns, runningStatus, types}.ts`,+`libs/swr/index.ts` (`useClientDataSWR` — non-suspense).++## 1 — Patterns in use++| Pattern (family) | Where | Rating | Note |+| ------------------------------------ | ---------------------------------------------------------------- | ------ | ------------------------------------------------- |+| Movable Panels / Card Stack (layout) | `ColumnsBoard` dnd-kit columns + bands (`ColumnsBoard.tsx`) | ✅ | reorder + cross-band drag, drag overlay preview |+| Overview + Detail (data) | sidebar running list → board column (`RunningTaskSidebar`) | ✅ | click an item opens/focuses its column |+| Deep-linking (nav) | `/fleet`, `/:workspaceSlug/fleet` | ✅ | route restores the board (columns from persist) |+| Movable Panels persistence (layout) | `store.ts` `persist` (columns/widths/rows/pins) | ✅ | layout survives reload — highlight |+| News/Activity Stream (data) | `useRunningTopics` focus-poll (`focusThrottleInterval: 1000`) | ⚠️ | **no new-item signal, no manual refresh** (gap ④) |+| Loading Skeleton (feedback) | `SidebarTaskSkeleton` (mirrors the row), page `BrandTextLoading` | ✅ | skeleton reuses row chrome — good |+| **Failure + Retry (feedback)** | running-topics poll | — abs. | `error` dropped entirely — the dominant gap (①) |+| Empty state — board (data) | `ColumnsBoard.tsx:151-163` (Layers icon + title + desc) | ⚠️ | real text, **CTA is a bare 52px "+"** (gap ⑤) |+| Empty state — sidebar (data) | `RunningTaskSidebar.tsx:284` `fleet.noRunningTasks` | ⚠️ | plain text; **doubles as the failure state** (①) |+| Selection-into-view (data) | `handleActivate` / `AddColumnButton` double-rAF `scrollIntoView` | ✅ | new/focused column scrolls in — §1.3 done right |+| Cancelability / Progress (feedback) | `RunningStatus` live elapsed clock + ring; `StatusDot` | ✅ | per-task elapsed time — highlight |+| Smart Menu Items (commands) | `CloseIdleColumnsButton` disabled/counted by idle set | ⚠️ | **ignores pins; unsafe on error** (gaps ②③) |+| Pin / keep marker (commands) | `AgentColumn` pin `ActionIcon` + `pinnedKeys` | ⚠️ | **purely cosmetic — protects nothing** (gap ③) |++**Read:** the board's **layout/persistence/drag** machinery and **per-task progress** (live+elapsed clock, scroll-into-view) are mature and a highlight. The weakness clusters exactly+where every audit so far has hit — **Feedback (the poll can't fail)** and **Read (a failed /+unloaded live feed masquerading as "empty/idle")** — and here that soft spot feeds a+**destructive** bulk action, which is what makes ① + ② a trust break rather than cosmetic.++## 2 — Strengths / good cases (don't regress)++The board is strong where it counts — these are the ✅ half of the 回灌 loop and the "don't+regress" list for the next refactor. Two are strong enough to land as **✅ examples in the `ux`+checklists** (see §4):++- **✅ 亮点 — Layout /persistence/drag.** dnd-kit reorder + cross-band drag with a portaled+ drag-overlay preview (so the moving card escapes each band's `overflow` clipping),+ `ColumnsBoard.tsx` + `ColumnDragPreview`, over a `persist` store that survives reload —+ columns / widths / rows / pins (`store.ts` `partialize`). Movable-Panels done to spec.+- **✅ 亮点 — Per-task live progress.** `RunningStatus`'s live elapsed clock + ring+ (`RunningTaskSidebar.tsx:47-107`) reads the runtime's real visible-start time and even hides+ the spinner in the `visible_output_end` tail (`runningStatus.ts`), so each column honestly+ shows how long its run has worked rather than a static "running" label.+- **✅ 亮点 — Selection-into-view done right (→ landed as ux Read §1.3 ✅).** `handleActivate` /+ `AddColumnButton` scroll a (re-)opened / newly-added column into the horizontal band via a+ **double-`requestAnimationFrame`** `scrollIntoView({ block: 'nearest', inline: 'end' })`,+ mirrored across **both** entry points so neither can regress alone.+- **✅ 亮点 — Skeleton reuses row chrome (→ landed as ux Feedback §4.1 ✅).**+ `SidebarTaskSkeleton` mirrors `SidebarTaskItem` exactly (28 px square avatar + two text lines+ at 70 % / 45 % width, same padding), an in-place load→content swap with no relayout.+- **Reply area's loaded-state gating.** `ReplyArea` reads the conversation's _real_ loaded state+ (`messagesInit`) rather than the raw `dbMessagesMap` (where `undefined` = "still loading"), so+ the reply affordance never blanks out mid-load — a stable "回复" placeholder holds the slot+ (`AgentColumn.tsx:255-292`). A quiet correctness win worth keeping.++## 3 — Experience gaps (ranked)++**① Running-topics poll swallows `error` → false "no running tasks" + every status collapses to idle + no retry — Read §1.1 / §1.7, Feedback §4.2** 🔴+`useRunningTopics` destructures only `{ data, isLoading }` and drops `error`+(`useRunningTopics.ts:36`); `isInit: !isLoading` (`:61`). `useClientDataSWR` is **not** suspense+(`libs/swr/index.ts:22-52`), so a poll error is never thrown to the route `<ErrorBoundary>` and+never represented. On error SWR sets `error` + flips `isLoading` false → `isInit` becomes+**true** with `data === undefined` → `columns = []`, `statusByColumnKey = {}`. Consequences:++- **Sidebar** renders `fleet.noRunningTasks` (`RunningTaskSidebar.tsx:281-284`, since+ `isLoading = !isInit = false`) — a **failed poll is indistinguishable from "no running+ tasks"**, the `data ?? [] → empty` trap on the read side of a live feed (§1.7: a failed+ refresh must never look like "no new items").+- **Board** keeps its persisted columns but every `StatusDot` / elapsed clock reads the empty+ `statusByColumnKey` → all columns silently **collapse to idle**; the live error is invisible+ on the board entirely.+- **No retry** anywhere. Fix: read `error`; drive a distinct failed state (sidebar + board+ banner) with a **Reload** that re-runs the SWR `mutate`; keep `isInit` gated so+ "errored/unknown" ≠ "loaded-empty".++**② "Close idle columns" becomes a one-click board-wiper on poll error — Act §3.4 / Feedback §4.2 (blast radius of ①)** 🟠+`getIdleColumnKeys` marks every column whose `statusByColumnKey[key] !== 'running'` as idle+(`idleColumns.ts:18`). It gates on `isStatusLoading` — but that's wired to `isLoading = !isInit`+(`RunningTaskSidebar.tsx:266-268`), which is **false on error** (see ①). So when the poll fails+the status map is `{}`, nothing loads as running, and **every open column reads as idle** — the+button lights up "close N idle columns" and one click removes the whole board+(`removeColumns(idleKeys)`, `:208`). A destructive bulk action must treat "unknown/errored"+status as _not eligible_, not as _idle_: gate on the query's real error/loading, never on a+success-only init flag.++**③ Pin is decorative — it protects nothing, and "close idle" overrides it — Act §3.4** 🟠+`pinnedKeys` is only toggled (`togglePin`) and filtered out on removal; **no code path gates on+it** — `syncRunningColumns` is append-only (never auto-removes) and `getIdleColumnKeys` never+consults pins. So the pin `ActionIcon` (`AgentColumn.tsx:422-428`, titled _"pin / keep this+column"_) merely highlights an icon: a **"keep this" affordance that keeps nothing**, and worse,+"close idle" (gap ②) will happily close a **pinned-but-idle** column — directly contradicting the+store's own comment that a pin is "a deliberate 'keep this column' marker" (`store.ts:47`). Fix:+either honor the pin (exclude `pinnedKeys` from `getIdleColumnKeys` / any future auto-cleanup) or+remove the affordance; a protective marker must be honored by **every** removal path.++**④ Live board has no new-item signal and no manual refresh — Read §1.7** 🟡+The board is an explicit polling feed (`focusThrottleInterval: 1000`, refetch on focus) and+`syncRunningColumns` **silently auto-appends** each newly-running topic as a column to the+least-full band (`store.ts:176-201`) — often off the right edge of the horizontal scroll. There's+no _"N new"_ indicator that a column appeared beyond the fold, and no manual **refresh** control+(the user is hostage to focus + the 1 s throttle). Class norm for a TweetDeck-style board; L1 can+name it, L2 confirms how invisible the off-screen append reads.++**⑤ Board empty state has value-prop text but no clear CTA button — Read §1.1** 🟡 (pending L2)+The board empty renders an icon + `fleet.empty` + `fleet.emptyDesc`+(`ColumnsBoard.tsx:151-163`) — real explanation — but the only add affordance is the bare 52 px+`AddColumnButton` "+" strip beside it (`AddColumnButton.tsx:85-90`), not a labeled "Add a column /+Create task" CTA in the empty region. Whether the "+" reads as _the_ next action is an **L2**+verdict — confirm on the render.++## 4 — Skill feedback++The 回灌 loop has two halves — a gap sharpens a checklist item's ❌ example, a good case sharpens+its ✅ one. Both landed from this run:++- **New ❌ rules landed** from this audit:+ - Read **§1.7** — new rule + Fleet ❌: a control **derived from a live-status map** (a "close+ idle" / "clear inactive") must gate on that query's **loaded/error** state — an errored or+ still-loading map reads every row as inactive, turning the bulk action into a wiper; treat+ "unknown" as ineligible, never as the inactive value (gaps ①②).+ - Act **§3.4** — new rule + Fleet ❌: a **protective marker** (pin / keep / lock) must be+ honored by _every_ removal path (bulk close, auto-cleanup); a decorative pin a "close idle"+ ignores is a broken promise (gap ③).+ - Each mirrored into the SKILL.md Quick review.+- **New ✅ good cases — each _refined the rule_, not just decorated it** (the good half of 回灌+ — see §2). A good case is only worth landing if it teaches the rule a distinction it didn't+ state:+ - Read **§1.3** — Fleet's scroll-into-view extracted **two** new sub-rules the rule was+ missing: (a) the re-run trigger has **two flavors** — async-arriving rows (key off row+ count) vs. a row **added imperatively in the same handler** (defer to the paint via+ rAF / double-rAF, since a synchronous `scrollIntoView` fires before React commits the+ node); and (b) the scroll **axis follows the list direction** — `inline: 'nearest'/'end'`+ for a horizontal band, not just `block`. Both folded into the prose + checklist; Fleet is+ the ✅ example.+ - Feedback **§4.1** — Fleet's `SidebarTaskSkeleton` extracted "match the real text's **width+ proportion**, not just its height" (long title line over a shorter subtitle, not two equal+ bars) — the rule previously said only "height ≈ real". §4.1 also had **no** ✅ example before.+- **Validated existing rules** (fresh ❌ examples to cite): Read §1.1 error-before-empty /+ false-empty (gap ①, sidebar), §1.7 failed-refresh-shown-as-empty (gap ①), Feedback §4.2+ init-flag-not-gated-on-success (`isInit: !isLoading`, gap ①), Read §1.1 empty-needs-CTA+ (gap ⑤).++## 5 — Pending: L2 visual + L3 dynamic++L1-only; a later pass should confirm / quantify:++- **L2 (visual)** — how the board empty (gap ⑤) reads (is the "+" the obvious CTA, or dead+ space?); whether a poll-error collapse (gap ①) is visibly distinguishable from a genuine idle+ board; the collapsed-status board vs a real running board; narrow-width + dark-mode of columns.+- **L3 (dynamic)** —+ - Force the running-topics poll offline to **confirm gap ①** live (sidebar shows "no running+ tasks", board statuses go idle, no retry) and **gap ②** (does "close idle" then light up and+ wipe the board?).+ - Pin a column, let its task go idle, click "close idle" → **confirm gap ③** (pinned column is+ closed).+ - Start a new task while scrolled left → **confirm gap ④** (a column appears off-screen with no+ signal).+ - **Measure CLS/LCP** across the skeleton→columns swap and a live column auto-append.diff --git a/.agents/skills/ux-audit/references/example-home.md b/.agents/skills/ux-audit/references/example/home.mdsimilarity index 69%rename from .agents/skills/ux-audit/references/example-home.mdrename to .agents/skills/ux-audit/references/example/home.mdindex 14501cf8c82..f3650d7f152 100644--- a/.agents/skills/ux-audit/references/example-home.md+++ b/.agents/skills/ux-audit/references/example/home.md@@ -5,6 +5,10 @@ Use it as a **template for the output shape**, not as current-state truth (the cre-verify before citing). Surface = center column (agent greeting → composer → onboardingbanner → "上新" model chips → "简报" feed) plus the left sidebar (nav / 最近 / 助理).+**Layers run:** L1 (static / code) ✅ — everything below. L2 (visual) / L3 (dynamic ++CLS) ⏳ not yet run — see §5 for what they'd add. Verdicts about the render (e.g. "one+primary button") are L1 inferences here, pending L2 confirmation.+## 1 — Patterns in use| Pattern (family) | Where | Rating | Note |@@ -29,7 +33,27 @@ banner → "上新" model chips → "简报" feed) plus the left sidebar (nav /**Read:** navigation & layout are mature; defaults have real craft. Weakness clusters in**Feedback (failure states)** and **Input (draft safety, placeholder)**.-## 2 — Experience gaps (ranked)+## 2 — Strengths / good cases (don't regress)++Navigation & layout are mature and the defaults have real craft — these are the ✅ half of the+回灌 loop and the "don't regress" list for the next refactor of this page. Two land as **✅+examples in the `ux` checklists**:++- **✅ 亮点 — Empty-send falls back to the day's hint (→ landed as ux Read §1.1 ✅).** Sending+ an empty composer doesn't no-op — it falls back to the day's hint (`useSend.ts`), a+ Smart-Default that turns a dead action into a useful one instead of a silent nothing.+- **✅ 亮点 — Overview + Detail preserves the surface contract (→ landed as ux+ Preserve-the-surface-contract ✅).** Cards and 最近 open a portal /drawer (`TopicChatDrawer`,+ `AllRecentsDrawer`) rather than navigating away, so the home surface keeps its promise and the+ user never loses their place.+- **✅ 亮点 — Persisted, reorderable accordions.** 最近 / 助理 are collapsible, reorderable, and+ persisted, so the sidebar's shape survives reload and reflects how the user arranged it rather+ than resetting to a default order.+- **✅ 亮点 — Broad skeleton coverage.** Every section plus a `NeuralNetworkLoading` revalidate+ path has a skeleton, so the initial load reads as "loading" across the whole page rather than+ as scattered blank slots.++## 3 — Experience gaps (ranked)**① No error/retry anywhere — ux §4.2** 🔴 The 简报 feed has only `!isInit` skeleton /empty / success branches, **no error branch** (`src/features/DailyBrief/index.tsx:32`).@@ -63,12 +87,31 @@ clickable, and a rotating hint "seen once" can't be retrieved.**⑧ Agent list has no first-run empty state — ux Read §1.1** 🟡 Empty pinned-agents rendersa bare empty list, no "create your first agent" guidance.-## 3 — Skill feedback+## 4 — Skill feedback- **Validated existing rules** (good ❌ examples to cite): §4.2 (gap ①, the permanent-skeleton), §2.1 (gap ②), Read §1.1 (gap ③).- **Landed as new `ux` items** from this audit: Read **§1.7 Live / polling streams** (gap⑤), Edit **§2.2 Stable input affordances** (gap ⑦), and a strengthened §4.2 note on theinit-flag-gated-on-success failure mode (gap ①).+- **Good cases landed as ✅ examples:** empty-send → day's-hint fallback cited as the ✅+ Smart-Default beside Read §1.1 (a default that makes a dead action useful); card / 最近 →+ drawer-not-navigate cited as the ✅ example under _Preserve the surface contract_.- **Noted, not yet landed:** predictable promo slots (gap ⑥) — captured here; promote to achecklist item if a second surface repeats it.++## 5 — Pending: L2 visual + L3 dynamic++This audit is L1-only; several verdicts are inferences a later pass should confirm or+quantify. What the other layers would add on this surface:++- **L2 (visual)** — confirm the composer send button truly reads as the single dominant+ control; check the rendered 简报 skeleton vs loaded card (height match, CLS symptom); the+ typewriter greeting's wrapping /truncation; narrow-width layout of the model chips row.+- **L3 (dynamic)** —+ - Force the 简报 fetch offline to **confirm gap ① live** (permanent skeleton, no retry).+ - Drive the send journey to **confirm gap ④** (is an in-progress/locked state shown; does+ success lead forward).+ - **Measure home CLS** across the loading→content swap (inject the layout-shift observer+ from [layer-3-dynamic.md](layer-3-dynamic.md)) and report the number + verdict — the+ skeleton coverage looks good in code, but only the metric proves it.diff --git a/.agents/skills/ux-audit/references/example/memory.md b/.agents/skills/ux-audit/references/example/memory.mdnew file mode 100644index 00000000000..878b7daccb3--- /dev/null+++ b/.agents/skills/ux-audit/references/example/memory.md@@ -0,0 +1,182 @@+# Worked example — Memory (记忆) module audit++A real run of this skill against the **Memory module**, 2026-07 (LOBE-11150) — a personal-AI-memory+management area: a **home persona** dashboard + five isomorphic list surfaces+(identities / contexts / preferences / experiences / activities), each with a filter bar, grid /+timeline views, a right-side detail panel, and an "Analyze" flow that extracts memory from chat+history. Surfaces under `src/routes/(main)/memory/**`, backed by+`src/store/userMemory/slices/{home,identity,context,preference,experience,activity,base}`. Use it+as a template for the output shape, not current-state truth (re-verify before citing).++**Surface class:** personal AI memory / personalization store — benchmark against ChatGPT "Manage+memories", Gemini personalization, Mem0, Personal.ai, CRM "customer 360".+**Layers run:** L1 (static / code) ✅. L2 / L3 ⏳ not run.++**Headline:** two axes fail. (1) The **read/write error side has no handling at all** — one root+cause (every `useUserMemoryStore` fetch resolves only on success, no `onError`) hangs list pages on+a **permanent skeleton**, the home page as a **false-empty**, and detail panels as a **permanent+blank**; the edit modal spins forever on a failed save. (2) The **surface-class trust-repair /+data-control axis is absent** — for a store of data _about the user_ there is no way to correct a+wrong memory (only blind-edit or delete), no retain-without-use (pause/exclude), no export, and no+undo — exactly what this product class is judged on, and exactly what a code-only read is blind to.++## 1 — Patterns in use++| Pattern (family) | Where | Rating | Note |+| ---------------------------------- | --------------------------------------------------------- | ------ | ------------------------------------------------- |+| Overview + Detail (nav) | home → 5 list tabs → right-panel detail | ✅ | clean drill; sidebar `Nav.tsx` |+| Empty-as-onboarding (growth) | list/home empty → `MemoryEmpty` + `MemoryAnalysis` CTA | ⚠️ | **activities empty has no CTA** (gap X1) |+| Loading Skeleton (feedback) | list `Loading.tsx` reuses card chrome; `DetailLoading` | ✅ | chrome-reusing skeleton (home uses full-page) |+| **Failure + Retry (feedback)** | every fetch (5 lists + persona/tags + detail + load-more) | — abs. | systemic root cause (gap A) |+| Search / filter (read) | per-tab `FilterBar`; `q → queryMemories` server-side | ✅ | server-side search — no false-empty on unfetched |+| Lists at scale (read) | grid + timeline via Virtuoso, page-12 load-more | ✅ | virtualized + load-more spinner |+| Selection visibility (read §1.3) | card click → `?xId=` + right panel | — abs. | no scroll-into-view, no active highlight (gap D) |+| Live/polling (read §1.7) | analysis task poll (`useTask.ts`) | ⚠️ | failed poll not distinct from running (gap E) |+| Entity lifecycle — delete (act) | `*Dropdown` delete → `confirmModal` (danger) | ⚠️ | confirm ok; **no undo**, no failure toast |+| Entity lifecycle — edit (act/edit) | `EditableModal` → `EditorModal` | ⚠️ | failed save spins forever (gap B); volatile draft |+| Entity lifecycle — correct / add | — | — abs. | can't mark-wrong or add manually (gap C, X3) |+| Wide-blast confirm (act §3.7) | `PurgeButton` (delete ALL) | ⚠️ | one-click danger, no type-to-confirm (gap C) |+| Provenance (source link) | `SourceLink.tsx` → chat topic | ✅ | the one class-norm we ship (backward-only) |+| Data control (export / pause) | — | — abs. | no export, no off-switch, no undo (gap C) |+| Cross-tab consistency (semantic) | 5 list tabs | ⚠️ | activities diverges; sort vanishes on timeline |++## 2 — Strengths / good cases (don't regress)++This surface is strong on the **read happy-path** and on **one write flow (analysis)**, but weak on+**error handling** and **data-control** — the gaps in §3 rank against that mixed baseline. Keep the+following; don't "fix" them.++- **✅ 亮点 — `DateRangeModal` submit state machine.** Double-submit guard + try/catch/finally ++ success toast + close (`MemoryAnalysis/DateRangeModal.tsx:42-60`). Load-bearing: this is the exact+ ✅ contrast to gap B's `EditorModal` no-`finally` trap — the model every memory write should copy+ (reset busy in `finally`, toast on `catch`). → **landed as ux Feedback §4.2 ✅**.+- **✅ 亮点 — Server-side per-tab search.** `q` is passed straight to `queryMemories`+ (`contexts/index.tsx:57-62`, mirrored per tab), so search queries the full set — no client-filter+ false-"no results" over the loaded page. Load-bearing: search correctness at scale.+ → **landed as ux Read §1.2 ✅**.+- **✅ 亮点 — `SourceLink` provenance.** Each item links back to its source chat topic+ (`SourceLink.tsx:16-40`, rendered in every `*RightPanel`). Load-bearing: the one class-norm we+ ship on the trust axis ("why does it know this") — it anchors the axis gap C says is otherwise+ absent, so _keeping and extending_ it (backward source → forward "used in N chats") is the move.+- **✅ — Virtualized grid + timeline with a real load-more spinner.** Virtuoso lists+ (`features/GridView`, `features/TimeLineView`); page-2 shows a footer skeleton (uncached SWR key →+ `isLoading`). Load-bearing: lists-at-scale — the load-more path itself is sound; only its _failure_+ is silent (part of gap A).+- **✅ — Chrome-reusing list skeleton** (`Loading.tsx` keeps card container / border / radius and+ swaps only text); **single-item delete confirm** (`*Dropdown.tsx:33-44`, danger `confirmModal`);+ **analysis running / error Alert** (`Status.tsx`). Solid, not standout — keep.++## 3 — Experience gaps (ranked)++**🔴 A — No `onError` / error state anywhere; every fetch resolves only on success.** Systemic:+each slice sets `xSearchLoading=false` / `xInit=true` **only in `onSuccess`** with no `onError`+(`context/action.ts:88`, `activity/action.ts:90`, `identity/action.ts:125`, `preference/action.ts:91`,+`experience/action.ts:88`; persona/tags `home/action.ts:27,50`; detail `base/action.ts:238`). No+`*Error` field exists in any `initialState`. Consumers hang differently:++- **list permanent skeleton** — gate is `showLoading = xSearchLoading || !xInit`+ (`contexts/index.tsx:80`); on failure the flag never flips → skeleton forever, no retry.+- **home false-empty** — home gates on SWR `isLoading` (resolves after retries) then falls to+ `MemoryEmpty` when `!persona && !roles.length` (`(home)/index.tsx:52-63`) → a failed load reads+ as "analyze to get started", inviting redundant re-analysis.+- **detail permanent blank** — 5 panels read only `{data, isLoading}`; `content` is set only in+ the `isLoading` / `data` branches (`ContextRightPanel.tsx:32-34` + 4 twins) → error _and_+ not-found both render an empty panel body.+- **load-more silent no-op** — a failed page-2 fetch appends nothing, footer spinner vanishes,+ reads as "that's all there is" (`context/action.ts:44-55`).+ → Feedback §4.2 + Read §1.1 (error before empty; error ≠ not-found). The module's flagship ❌.++**🔴 B — Edit save failure: the modal OK button spins forever, no error, no retry, edit discarded+on close.** `EditorModal onOk` runs `setConfirmLoading(true) → await onConfirm → setConfirmLoading(false)`+with **no try/catch/finally** (`src/features/EditorModal/index.tsx:35-40`), and `updateMemory` has+no `.catch` / failure toast (`base/action.ts:157-236`). A rejected write leaves OK permanently+loading; closing / reloading loses the edit. → Feedback §4.2 (awaited write, no `finally`), Act §3.1.++**🔴 C — Surface-class trust-repair & data-control axis is absent (data _about the user_).** For a+store of what the AI believes about you, the class contract is: correct a wrong belief, keep a fact+without using it, take your data out, undo a mistake. None exist:++- **No "this is wrong" / report** — dropdowns offer only edit + delete (`*Dropdown.tsx:47-61`); edit+ is a blind single-field overwrite, and a deleted fact can be re-extracted identically.+- **No retain-without-use** — the only way to stop the AI using a fact is to permanently delete it;+ schema has a `status` column but no UI on/off (no global "memory off", no per-item pause/exclude).+- **No export / download** — `crud.ts` exposes only get/update/delete/deleteAll; no export in UI.+- **No undo / soft-delete** — delete + `purgeAllMemories` (`base/action.ts:54`) are hard, no recovery;+ **Purge all** is a one-click danger `confirmModal` with **no type-to-confirm** (`PurgeButton.tsx:34`).+ → new ux rule (Act §3.9) + Act §3.7 (wide-blast). L1 is structurally blind to these (no `file:line`).++**🟠 X1 — `activities` empty state has no CTA, and its toolbar drops Analysis.**+`activities/features/List/index.tsx:33` renders `<MemoryEmpty>` with no children (siblings pass+`<MemoryAnalysis/>`); `activities/index.tsx:85` is `<ActionBar showPurge>` (siblings add+`showAnalysis`). So Activities has _no path to Analysis at all_ and an empty tab dead-ends. →+Read §1.1, "consistency is semantic".++**🟠 D — Deep-linked / restored active item isn't scrolled into view, and cards have no active+highlight.** `grep scrollIntoView|scrollToIndex` across the memory tree = 0; Virtuoso mounts at+`scrollTop=0` (`TimeLineView/index.tsx`, `GridView/index.tsx`); cards take no `active` prop. A+`?contextId=` below the fold = zero list feedback. → Read §1.3 (the no-anchor case).++**🟠 E — Analysis flow: failed run has no retry, and a failed poll is indistinguishable from+running.** `Status.tsx:49-71` shows an error Alert with **no Retry**; `useTask.ts` keeps last SWR+data on a poll error so a failed refresh keeps a stale running frame. → Act §3.1, Read §1.7.++**🟠 F — No global cross-layer search.** Each tab searches only itself; `searchMemory` /+`retrieveMemory` exist in the service (`services/userMemory/index.ts`) but aren't wired to any UI,+so "find everything about X" means repeating the query in 5 tabs. → Read §1.8 (class norm).++**🟠 G — Manual "Add memory" is impossible from the UI though the backend supports it.**+`add*Memory` / `createIdentity` exist (`services/userMemory/index.ts`) but no button calls them. →+Act §3.4 (lifecycle: create entry point).++**🟠 H — Sort silently vanishes on switch to timeline (4 tabs).** Sort `<Select>` renders only in+grid mode and the chosen sort is dropped on toggle with no signal (`contexts/index.tsx:52,106`). →+"consistency is semantic".++**🟠 I — Home persona is read-only and dead-ends.** The persona editor + edit trigger are+**commented out** (`Persona/index.tsx:16-35`, `(home)/index.tsx:27,36`); persona sections / role+tags don't link into the detail tabs. → Grow §5.3, Act §3.4.++**🟡 J — Edit draft is volatile; silent discard on close.** Source is in-memory+`editingMemoryContent`; `destroyOnHidden` + `onCancel=clearEditingMemory` discards with no+dirty-check (`EditableModal.tsx:9,28`). → Edit §2.1 (lighter for modals).++**🟡 K — Score / usage signals inconsistent.** Confidence shows for experiences only;+`scoreImpact` / `scoreUrgency` / `scorePriority` and `accessedCount` / `lastAccessedAt` are stored+but never surfaced. → consistency; class norm (recency/usage signals).++**🟡 L — No bulk-select; only "one" or "everything".** Between per-item delete and Purge-all there is+no multi-select. → Act §3.1 (bulk ⇄ single parity).++**🟡 M — No per-layer explanation / onboarding.** Five tabs with only generic empty copy; users get+no definition of identities vs contexts vs … → Grow §5.1.++**🟡 N — `DateRangeModal` allows an unbounded all-null range submit** with no confirm of scope+(`DateRangeModal.tsx:42-49`); the analysis trigger isn't hard-locked during an in-flight task+(`AnalysisTrigger.tsx:19`). → friction / Act §3.1.++## 4 — Skill feedback++- **New rule landed:** Act **§3.9** — _a surface holding data about the user (memory /+ personalization / profile store) owes trust-repair + data-control: correct-or-mark-wrong (not just+ delete), retain-without-use (pause / exclude), export, and undo / soft-delete._ Memory is the ❌+ example (gap C). Mirrored into the Quick review.+- **Landed as ❌ examples on existing rules** (Memory is a textbook instance — no other new rule):+ - Feedback **§4.2** — the whole `userMemory` store `onSuccess`-only / no-`onError` pattern (gap A)+ - the `EditorModal onOk` no-`finally` write trap (gap B).+ - Read **§1.1** — Memory detail panel (blank on error _and_ not-found) + home false-empty (gap A).+ - Read **§1.3** — Memory list: no scroll-into-view + no active-card highlight (gap D).+ - Act **§3.7** — `PurgeButton` one-click wide-blast, no type-to-confirm (gap C).+- **Landed as ✅ examples on existing rules** (the good-case half of 回灌,from §2):+ - Feedback **§4.2** — `DateRangeModal`'s submit machine (guard + try/catch/**finally** + toast) is+ the in-repo ✅ the write-side-`finally` rule now cites, directly beside the gap-B ❌.+ - Read **§1.2** — Memory per-tab server-side search is the ✅ contrast to the Pages client-filter ❌.+- **Validated existing rules:** §4.2 permanent-skeleton, Read §1.1 empty-vs-failed, Act §3.1+ done/error, "consistency is semantic" (gaps X1/H).++## 5 — Pending: L2 + L3++- **L2** — how the permanent skeleton / blank / false-empty actually render; home full-page loader+ CLS; whether `MemoryEmpty` reads as a real page; the persona / tag-cloud layout; dark mode.+- **L3** — force each fetch to fail to confirm gaps A/B/E live (permanent skeleton / blank /+ spinning modal / stale poll); walk analyze → running → done; deep-link a `?xId=` below the fold to+ confirm gap D; force a delete/update failure to confirm the missing toasts.diff --git a/.agents/skills/ux-audit/references/example/onboarding.md b/.agents/skills/ux-audit/references/example/onboarding.mdnew file mode 100644index 00000000000..6c21be96f1e--- /dev/null+++ b/.agents/skills/ux-audit/references/example/onboarding.md@@ -0,0 +1,202 @@+# Worked example — Onboarding module systemic audit++A real run of this skill against the **whole Onboarding module** (first-run setup), 2026-07.+Like the settings example this is a **systemic** pass across a small family of related+surfaces rather than one screen. Onboarding is the surface class the pattern catalog's+_Getting started_ family (Welcome / Guided Tour / Empty-state-as-onboarding) benchmarks.++**Layers run:** L1 (static / code) ✅ — everything below. L2 / L3 ⏳ not run (no render / no+running env this pass). Visual verdicts (real button dominance, does a progress bar render)+are tagged **pending L2**.++## Scope — three parallel flows behind two entry points++| Flow | Route(s) | Screens (in order) | Orchestrator |+| ------------------------ | ---------------------------------- | --------------------------------------------------- | ----------------------------------------------- |+| **Common prefix** | `/onboarding` (`?step=1\|2`) | Telemetry → ResponseLanguage | `features/Onboarding/Common/index.tsx` |+| **Classic** (web/mobile) | `/onboarding/classic` | FullName → Interests → \[ProSettings] → AgentPicker | `features/Onboarding/Classic/index.tsx` |+| **Agent** (web/mobile) | `/onboarding/agent` | single conversational step | `features/Onboarding/Agent/index.tsx` |+| **Desktop** (Electron) | `/desktop-onboarding` (`?screen=`) | Welcome → \[Permissions·mac] → DataMode → Login | `routes/(desktop)/desktop-onboarding/index.tsx` |++Common funnels into Classic **or** Agent via `deriveOnboardingBranchPath` (`branch.ts:18`);+build switch `AGENT_ONBOARDING_ENABLED` + runtime `enableAgentOnboarding` + `!isDesktop`+gate the Agent branch. Step chrome is shared via `routes/onboarding/_layout` (web) and+`routes/(desktop)/desktop-onboarding/_layout` (desktop).++**Persistence / resume (healthy):** classic step is server-persisted (`onboarding.currentStep`++- `finishedAt`, `onboarding/action.ts:26-137`) with an optimistic `localOnboardingStep` and a+ coalescing update queue; desktop resumes via `resolveInitialScreen` (URL → saved → everCompleted+ → Welcome, `resolveInitialScreen.ts:28`). Returning users skip via `needsOnboarding`+ (`selectors.ts:26`). Callback-URL threading survives the whole flow (`utils/onboardingRedirect`).++## 1 — Patterns in use++| Pattern (family) | Where | Rating | Note |+| ----------------------------------- | ---------------------------------------------------------------- | ------ | -------------------------------------------------------- |+| Welcome / Sign-on | Telemetry (`TelemetryStep.tsx`), desktop Welcome | ✅ | purposeful first screen, typewriter intro |+| Guided Tour / Onboarding (stepwise) | Common + Classic linear steps | ⚠️ | steps exist but **no progress/Sequence Map** (gap ③) |+| **Sequence Map / progress** | — | — abs. | up to 6 classic / 4 desktop screens, no "N of M" (gap ③) |+| Escape Hatch (skip) | AgentPicker skip; layout skip only in agent-branch mode | ⚠️ | no skip in pure classic until final step (gap ⑤) |+| Deep-linking | `?step` (web), `?screen` (desktop) restore position | ✅ | canonicalized, resumable |+| Empty-state as onboarding | AgentPicker empty vs error distinguished (`index.tsx:162-167`) | ✅ | good — but error has no retry (gap ④) |+| Loading Skeleton | AgentPicker skeleton, Agent brand loader, desktop Suspense | ✅ | project loaders, no antd `Spin` |+| Failure + Retry | desktop LoginStep full idle/loading/success/error + retry+cancel | ✅ | **exemplary** — model this elsewhere |+| Failure + Retry | web write-steps + AgentPicker install/load | — abs. | gaps ①②④⑥ |+| Progress Indicator / Cancelability | desktop LoginStep auth countdown + cancel (`LoginStep.tsx:293`) | ✅ | |+| Prominent "Done" Button | one primary per step throughout | ✅ | pending L2 for dominance |+| Illustrated Choices | Interests grid, desktop DataMode | ✅ | |++**Read:** the _state machine_ work (desktop Login, resume, optimistic queue, callback+threading, Agent bootstrap→classic fallback) is mature. Weakness clusters in **Feedback+(failure/retry on the web write-steps)** and one **Navigation** class-norm gap (no progress /+weak escape hatch).++## 2 — Strengths / good cases (don't regress)++The module is strongest exactly where gap-hunting can miss it — the state-machine and+resume plumbing. These are the ✅ half of the 回灌 loop and the "don't regress" list for the+next onboarding change; one is strong enough to land as a **✅ example in `ux`** (see §4).++- **✅ 亮点 — Desktop `LoginStep` state machine (→ ✅ exemplar for Feedback / Failure+Retry).** Full+ idle / loading / success / error with **retry + cancel + an auth countdown**, driven by main-process+ broadcasts (`authorizationSuccessful` / `Failed` / `Progress`) and reconciled against real+ remote config (`routes/(desktop)/desktop-onboarding/features/LoginStep.tsx`). This is the+ exemplary Failure+Retry pattern the web write-steps (gaps ①②④⑥) should copy.+- **✅ 亮点 — Resume /persistence.** Classic step is server-persisted (`onboarding.currentStep`+ - `finishedAt`) behind an optimistic `localOnboardingStep` and a **coalescing update queue**+ that survives rapid clicks (`store/user/slices/onboarding/action.ts:57-123`); desktop resumes+ via `resolveInitialScreen` (URL → saved → everCompleted → Welcome,+ `resolveInitialScreen.ts:28`); returning users skip entirely via `needsOnboarding`+ (`selectors.ts:26`). An interrupted onboarding reopens at the right step.+- **✅ 亮点 — Agent bootstrap error degrades to Classic, not a blank.** A failed bootstrap query+ redirects into the deterministic classic flow rather than stranding the user in a broken+ conversation (`features/Onboarding/Agent/index.tsx:330-335`) — graceful degradation to the+ reliable baseline. (Its sibling `ErrorBoundary fallbackRender={() => null}` at `:372` is the+ one weak spot — see the note under §3.)+- **✅ 亮点 — WrapUp is a proper confirm → in-progress → done with `finally`.** `WrapUpHint`+ runs `confirmModal` before finishing and resets `loading` in a `finally`+ (`features/Onboarding/Agent/WrapUpHint.tsx:35-52`) — the exact shape the language-gate write+ (gap ①) is missing.+- **✅ 亮点 — Callback-URL threading.** The signup target is stashed, survives the whole+ multi-step flow, is consumed on finish, and passes a safe-redirect guard+ (`utils/onboardingRedirect`, `AgentPickerStep/index.tsx:114`) — a first-run detour that+ returns the user to where they were headed.+- **AgentPicker empty-vs-error distinction.** Renders `failedToLoad` vs `empty` distinctly+ (`AgentPickerStep/index.tsx:162-167`) — error ≠ empty done right (the missing retry is gap ④,+ not a knock on the distinction). Resumable, canonicalized deep-links (`?step` / `?screen`).++## 3 — Experience gaps (ranked)++**① ResponseLanguage — the shared-prefix gate write has no failure path → permanent stuck+step — ux Feedback §4.2** 🔴 `handleNext` sets `isNavigating=true`, then+`await setSettings({ general: { responseLanguage } })` with **no try/catch/finally**+(`ResponseLanguageStep.tsx:37-43`). That write is _the_ signal `commonStepsCompleted` keys off+(`selectors.ts:44`). If it rejects (network blip), `onNext` never fires and `isNavigating`+never resets → both Send **and** Back stay `disabled` forever, with no error and no retry: the+user is trapped on the language screen and cannot enter the product. The one write that gates+the whole flow is the one with zero failure handling.++**② AgentPicker — agent install failure is swallowed, then onboarding finishes anyway — ux+Feedback §4.2 / Act §3.5** 🔴 `handleContinue` wraps `installMarketplaceAgents` in a+`catch { console.error }` and proceeds to `finish('continue') → finishOnboarding()` → navigate+away regardless (`AgentPickerStep/index.tsx:135-140`). The user hand-picked agents, they+silently failed to install, and they land in an app missing them with no clue. The entire+point of the final step can fail invisibly.++**③ No progress / Sequence Map in any flow — surface-class benchmark (Navigation)** 🟠 Classic+runs up to 6 sequential screens (telemetry→language→fullname→interests→\[prosettings]→+agentpicker); desktop 3–4. Neither shows "Step N of M" or a progress bar — the only `<Steps>`+in the module are **decorative feature lists** inside Telemetry/Welcome (`current={null}`,+`TelemetryStep.tsx:82`, `WelcomeStep.tsx:72`). Setup wizards (Notion / Linear / Slack / Vercel)+universally show length + position. Users can't gauge how long onboarding is. (pending L2 to+confirm nothing renders.)++**④ AgentPicker error state has no retry — ux Feedback §4.2** 🟠 Template load failure renders+bare `agentMarketplace.picker.failedToLoad` text (`AgentPickerStep/index.tsx:160-167`) — no+Reload. Empty-vs-error _is_ correctly distinguished (good), but the final step's core capability+is lost with recovery only by abandoning via Skip.++**⑤ FullName is mandatory and the classic flow has no escape hatch until the last step —+Navigation → Escape Hatch** 🟠 FullNameStep's only forward control is the SendButton, `disabled`+until a non-empty name (`FullNameStep.tsx:74`); there is no Skip / Next-without-name. The layout+Skip link only renders in agent-enabled branch mode (`_layout/index.tsx:45-50`), so a pure+classic flow forces the user through telemetry/language/fullname/interests/prosettings with no+skip until AgentPicker. Class norm: optional profile steps should be skippable; identity setup+shouldn't hard-block first entry.++**⑥ Profile-step writes are fire-and-forget with no failure feedback — ux Feedback §4.2 / Act+§3.5** 🟡 FullName (`FullNameStep.tsx:34`), Interests (`InterestsStep.tsx:72`), Telemetry+(`TelemetryStep.tsx:35`) call `updateFullName`/`updateInterests`/`updateGeneralConfig`+**unawaited and uncaught**, then immediately `onNext()`. The store actions are async+(`common/action.ts:54,59`) but the steps ignore the promise; a failed server persist is silent+and the value lost while the flow advances. (Optimistic store softens display, not durability.)++**⑦ Within-step draft not persisted across reload — ux Edit §2.1** 🟡 Typed name (FullName) and+custom interest (Interests) live in local `useState`, committed only on Next. Step-level resume+works (server `currentStep`), but a reload mid-step drops unsent input.++**⑧ Onboarding step-sync failures are swallowed — ux Feedback §4.2** 🟡+`internal_processStepUpdateQueue` catches the server write with `console.error` only+(`onboarding/action.ts:91-93`). If step persistence keeps failing the resume point silently+won't advance and the user is never told (low: self-heals on the next step).++**⑨ ComposioServerList fetch has no loading/error surface — ux Read §1.1 / Feedback §4.2** 🟡+`useFetchUserComposioConnections(true)` drives per-app connection status but the grid always+renders the static `COMPOSIO_APP_TYPES` (`ComposioServerList/index.tsx:14-37`); a failed+connections fetch silently shows every integration as unconnected — "load failed" reads as+"nothing connected." Not a dead-end (optional step). (pending L2 for per-item render.)++**⑩ Agent conversation subtree fails to a blank — ux Feedback §4.2** 🟡 The conversation is+wrapped in `<ErrorBoundary fallbackRender={() => null}>` (`Agent/index.tsx:372`), so a throw in+the chat subtree renders **nothing** — no error, no retry. The larger per-turn failure surface+is the cost the Agent flow pays for its richness; it deserves a visible error + recovery (or to+reuse the bootstrap-error → Classic degrade path, which is the ✅ 亮点 sibling above). Surfaced+during the Agent-vs-Classic comparison.++## 4 — Skill feedback++The 回灌 loop has two halves — a gap sharpens a checklist item's ❌ example, a good case sharpens+its ✅ one. Both landed from this run:++- **New ❌ rule landed:** **Grow §5.2 — Multi-step flows show progress and stay skippable.** A+ stepwise flow (>2 steps) must (a) show a **progress / step indicator** (position + total) and+ (b) make **non-essential steps skippable** with an always-visible escape hatch; mirrored into+ the SKILL.md Quick review. ❌ examples: onboarding gaps ③ + ⑤ (the module's only `<Steps>` are+ decorative, `current={null}`).+- **Existing rule strengthened + new ✅ example landed:** **Feedback §4.2** now also covers an+ _awaited_ gating write — it must reset its in-progress flag in a `finally` and offer retry on+ catch, or a failed write permanently disables the advance control. ❌ example: gap ①. ✅ example:+ the desktop `LoginStep` state machine with retry + cancel (§2 亮点) — the positive model the+ checklist now cites.+- **Validated existing rules** (fresh ❌ examples to cite): §4.2 (②④⑥⑧⑨⑩), §3.5 (②⑥),+ Edit §2.1 (⑦), Read §1.1 error-as-empty (⑨), Escape Hatch (⑤).+- **Methodology 回灌 (from the follow-up comparison):** the Agent-vs-Classic question drove a new+ **ux-audit ground rule** — "comparing two variants: the winner is an outcome verdict, not a+ craft verdict" (+ an A/B-winner row in the coverage matrix), citing this module's own miss as+ the ❌ self-example.++## 5 — Pending: L2 visual + L3 dynamic++- **L2** — confirm no progress indicator renders (③); confirm each step's primary button is the+ dominant control (pending-L2 across all steps); AgentPicker empty vs error vs loading actually+ render distinctly (④); ComposioServerList per-item connection/error render (⑨); dark + narrow.+- **L3** — force offline on the ResponseLanguage `setSettings` write to **confirm the stuck step+ live** (①); force `installMarketplaceAgents` to reject and confirm the silent finish (②); force+ AgentPicker template load failure and confirm no-retry dead-end (④); walk classic end-to-end to+ confirm forward momentum + no skip (⑤); measure step-transition INP / CLS.++## 6 — Land the findings (queue)++Landed as **LOBE-11138** ("Onboarding UX Audit", container under the UX-audit parent+**LOBE-11078**), split into the sub-issues below. Class-norm gaps (③⑤) also 回灌 'd into `ux`+Grow §5.2; the awaited-write rule (①) into Feedback §4.2 — see §4.++| Sub-issue | Finding(s) | Kind |+| -------------- | ---------------------------------------------------------------------------- | ---------- |+| **LOBE-11154** | ① language-gate stuck step (add `finally` + retry) | bug 🔴 |+| **LOBE-11155** | ②④ AgentPicker: install-fail silent finish + load-fail no retry | bug 🔴 |+| **LOBE-11156** | ③ progress / Sequence Map absent | bug + 回灌 |+| **LOBE-11157** | ⑤ mandatory FullName / no escape hatch | bug + 回灌 |+| **LOBE-11158** | ⑥⑦⑧⑨ fire-and-forget writes / draft-loss / silent step-sync / composio state | bug 🟡 |+| _unfiled_ | ⑩ Agent conversation `ErrorBoundary` → blank (fold into LOBE-11155 or new) | bug 🟡 |diff --git a/.agents/skills/ux-audit/references/example/page.md b/.agents/skills/ux-audit/references/example/page.mdnew file mode 100644index 00000000000..b62d7713cf7--- /dev/null+++ b/.agents/skills/ux-audit/references/example/page.md@@ -0,0 +1,150 @@+# Worked example — Pages module (`/page` list + editor) audit++A real run of this skill against the **Pages module**, 2026-07 — the document surface:+list sidebar (`/page`) + full-screen rich-text editor (`/page/[id]`) with version History,+AI Copilot, a collaborative edit-lock, and a public share view (`/share/page/[id]`). Use it+as a template for the output shape, not as current-state truth (the code moves; re-verify+before citing).++**Surface class:** document editor — benchmark against Notion / Google Docs / Craft.+**Layers run:** L1 (static / code) ✅ — everything below. L2 (visual) / L3 (dynamic + CLS)+⏳ not yet run — see §5. Verdicts about the render are L1 inferences here, pending L2.++**Load-bearing files:** `routes/(main)/page/{index,_layout,[id]}`,+`features/Pages/PageLayout/*` (sidebar list), `features/PageExplorer/*`,+`features/PageEditor/*` (editor + Copilot + History + lock), `store/page/*`,+`store/document/slices/editor/*`, `routes/share/page/[id]`.++**Blind spot:** the share view's error/empty shell is a **cloud-only business stub** in this+OSS repo (`business/client/features/PageShare/PublishedShell.tsx` returns `{children}`); L1+here can't audit its real states — needs the cloud build (L2/L3).++## 1 — Patterns in use++| Pattern (family) | Where | Rating | Note |+| ---------------------------------- | ------------------------------------------------------------------ | ------ | ------------------------------------------------ |+| Overview + Detail (nav/data) | sidebar list → `/page/[id]` editor | ✅ | preserves place |+| Deep-linking (nav) | `/page/:id`, `/share/page/:id` | ✅ | URL restores doc |+| Empty-state as onboarding (growth) | main-stage `PageExplorerPlaceholder` (new / upload / Notion cards) | ✅ | rich CTA — highlight |+| Empty state — sidebar (data) | `PageEmpty.tsx` | ⚠️ | bare `Empty`, **no CTA** (gap ⑦) |+| Loading Skeleton (feedback) | `Body` + `List` `SkeletonList` | ⚠️ | present but **can't fail** (gap ①) |+| **Failure + Retry (feedback)** | list / history / save | — abs. | the module's dominant gap (①②③④) |+| Autosave / Smart Defaults (input) | `performSave` / `performMetaSave`, `AutoSaveHint` | ⚠️ | saving→saved, **no failed** (gaps ②③) |+| Draft safety (edit) | `usePageDraft.ts` (sessionStorage) | ⚠️ | only snapshots while lock degraded (②) |+| Entity lifecycle (act) | delete / rename / duplicate / export / history-restore | ✅⚠️ | Header ops solid; **sidebar ops silent** (gap ⑤) |+| Command History (act) | `History/*` — list + Compare + Restore | ✅ | confirm + in-progress + error toast |+| Cancelability / lock (feedback) | `EditingIndicator` / `LockedAlert` / `LockStatusBanner` | ✅ | three-way, mature — highlight |+| Lists at scale (data) | `AllPagesDrawer` (`VList`) + `loadMoreDocuments` | ⚠️ | search filters loaded subset only (⑥) |+| Modal Panel (nav) | Copilot / History right panel (`RightPanel`) | ✅ | Copilot reuses shared Conversation |++**Read:** the editor's **entity lifecycle** and **collaborative lock** are mature; the+weakness clusters hard in **Feedback (failure states absent, save swallowed to `idle`)** and+**Read (failed load masquerading as empty; search over a partial list)** — the same+soft-spots every audit so far has hit.++## 2 — Strengths / good cases (don't regress)++The editor is strong where it counts — these are the ✅ half of the 回灌 loop and the "don't+regress" list for the next refactor. One lands as a **✅ example in the `ux` checklists** (the+Header duplicate, see §4):++- **✅ 亮点 — Three-way collaborative lock.** `EditingIndicator` / `LockedAlert` /+ `LockStatusBanner` — a mature, legible presence / lock model that makes "someone else is+ editing" visible at three altitudes rather than a single opaque flag; the one place cancelability+ / concurrency is surfaced end-to-end, so a refactor must keep all three in sync.+- **✅ 亮点 — Command History surfaces failure end-to-end.** `History/*` — list + Compare ++ Restore with confirm + in-progress + error toast; the single flow in the module that carries a+ failure state all the way to the user (the ✅ counterpoint to the swallowed save/meta/history+ failures in gaps ②③④), which is exactly why it's load-bearing as a reference.+- **✅ 亮点 — Header entity lifecycle does it right (→ landed as ux Act §3.1 ✅).** the editor+ **Header** delete / rename / duplicate / export / restore where duplicate does try/catch ++ success/error `message` (`Header/useMenu.tsx:60-70`) — the ✅ contrast to the silent sidebar ops+ in gap ⑤; same intent, but here the mutation surfaces its own failure.+- **✅ 亮点 — Main-stage empty-state as onboarding.** `PageExplorerPlaceholder` (new / upload /+ Notion cards) turns the no-doc state into a rich CTA rather than dead space — the growth-side+ "empty is a starting point" pattern done to spec (the sidebar empty in gap ⑦ is the ⚠️ foil).++## 3 — Experience gaps (ranked)++**① Sidebar list fetch failure → permanent skeleton — Feedback §4.2** 🔴+`useFetchDocuments` writes `documents` only in its success `onData`+(`store/page/slices/list/action.ts:168-190`), and `isDocumentsLoading = documents ===+undefined` (`list/selectors.ts:9`). `Body` renders `SkeletonList` while loading+(`Body/index.tsx:59-60`). On fetch error `documents` stays `undefined` → **skeleton spins+forever, no error, no retry** — the init-flag-gated-on-success trap.++**② Silent body-autosave failure + draft gap — Feedback §4.4 / Edit §2.1** 🔴+`performSave`'s catch sets `saveStatus: 'idle'` for non-lock errors+(`store/document/slices/editor/action.ts:360-364`); the enum is `idle | saving | saved` with+**no `failed`** (`editor/initialState.ts:65`). Only `CONFLICT` (lock) is surfaced; a network+/ 500 failure is indistinguishable from success. `isDirty` stays true, but `usePageDraft`+only snapshots while the lock is **unhealthy** (`usePageDraft.ts:109-118`) — so under a+healthy lock a persistent save failure gives no failed state **and** no draft backup; a+refresh loses the work silently.++**③ Silent meta (title/emoji) save failure — Feedback §4.4** 🟠+`performMetaSave` catch sets `metaSaveStatus: 'idle'` (`PageEditor/store/action.ts:189-192`)+— again no `failed`. A title/emoji edit that fails to persist shows nothing.++**④ History load failure masquerades as "no history" — Read §1.1** 🟠+The History SWR destructures only `{ data, isLoading }`, dropping `error`+(`History/index.tsx:101`); render is `items.length === 0 ? <Empty "no history"/>`. A failed+fetch → the empty state, no retry → the user reads "this doc has no versions".++**⑤ Sidebar create / rename / duplicate fail silently — Act §3.1** 🟠+`createNewPage` rethrows on error (`crud/action.ts:84-90`) but the callers+(`AddButton.tsx:17-22`, `PageExplorerPlaceholder.tsx:116-123`) are fire-and-forget — no+catch, no toast; the optimistic page flashes in and vanishes (plus an unhandled rejection).+Sidebar rename (`Editing.tsx:39-40`) and duplicate (`Item/useDropdownMenu.tsx:59-67`) only+`console.error`. **Inconsistent:** the editor **Header** duplicate does it right (try/catch ++success/error `message`, `Header/useMenu.tsx:60-70`) — same intent, two feedback behaviors.++**⑥ "All pages" search filters only the loaded subset — Read §1.2** 🟠+`AllPagesDrawer/Content.tsx:32-41` filters `allFilteredDocuments` client-side by+`title/content.includes`, and `handleScroll` bails while searching (`:49`) so it never loads+more. With 500 pages but 40 loaded, searching an unloaded page returns "no results" though it+exists — a false empty. (Read-side twin of the paginated-sort-server-side rule.)++**⑦ Sidebar empty state has no CTA — Read §1.1** 🟡+`PageEmpty.tsx` renders only a description (it does distinguish "no pages" vs "no search+match" — good), but no "create your first page" action; the rich CTA lives only in the+main-stage placeholder, so the sidebar empty is a quiet dead-end.++**⑧ Hardcoded English string — i18n** 🟡+`PageExplorerPlaceholder.tsx:298` renders literal `'Uploading...'` instead of a `t()` key.++**⏳ Share view error/empty is a cloud stub — blind spot**+`share/page/[id]/index.tsx:34-35` renders `<PublishedShell data error>{data ? viewer :+null}</PublishedShell>`; the OSS `PublishedShell` ignores `data`/`error` and returns+`{children}`, so a failed/absent share renders **blank**. Real behavior is in the business+package → confirm on the cloud build (L2/L3).++## 4 — Skill feedback++- **Landed as strengthened `ux` items** from this audit:+ - Feedback **§4.4** — new checklist line + a PageEditor ❌ example: the save-state enum+ must be able to _represent_ failure; a `catch` that resets to `idle` is the silent-write+ trap baked into the type (gaps ②③).+ - Act **§3.1** — new "optimistic mutation surfaces failure" rule + ❌ (sidebar+ create/rename/duplicate) vs ✅ (Header duplicate) example (gap ⑤).+ - Read **§1.2** — new "search over a paginated list queries the full set server-side" rule+ - `AllPagesDrawer` ❌ example (gap ⑥).+ - Each mirrored into the SKILL.md Quick review.+- **Validated existing rules** (good ❌ examples to cite): §4.2 permanent-skeleton (gap ①),+ Read §1.1 empty-vs-failed (gap ④), Read §1.1 empty-needs-CTA (gap ⑦).++## 5 — Pending: L2 visual + L3 dynamic++L1-only; a later pass should confirm / quantify:++- **L2 (visual)** — how the sidebar empty (`PageEmpty`) actually reads (dead space vs page);+ the Copilot / History right-panel layout; whether the editor's single primary affordance is+ clear; narrow-width and dark-mode of the placeholder cards.+- **L3 (dynamic)** —+ - Force the list fetch offline to **confirm gap ① live** (permanent skeleton, no retry).+ - Force a save 500 under a healthy lock to **confirm gap ②** (silent success-looking state+ - no draft → refresh loses work).+ - Force the history fetch to error to **confirm gap ④** (shows "no history").+ - Drive create/rename/duplicate failure to **confirm gap ⑤** (item vanishes, no toast).+ - Search for an unloaded page in the all-pages drawer to **confirm gap ⑥** (false empty).+ - **Measure editor CLS/LCP** across the skeleton→content swap and Copilot mount.diff --git a/.agents/skills/ux-audit/references/example/resource.md b/.agents/skills/ux-audit/references/example/resource.mdnew file mode 100644index 00000000000..f77ee2935ef--- /dev/null+++ b/.agents/skills/ux-audit/references/example/resource.md@@ -0,0 +1,156 @@+# Worked example — Resource (资源) module audit++A real run of this skill against the **Resource module**, 2026-07 (LOBE-11149) — a+knowledge-base / file-library manager: resource home (all resources) → library (a single+knowledge base) → library-slug (a folder inside a library). Three surfaces under+`src/routes/(main)/resource/**`, all delegating to one shared feature,+`src/features/ResourceManager/**`, backed by `src/store/{file/slices/resource,library,tree}`.+Use it as a template for the output shape, not current-state truth (re-verify before citing).++**Surface class:** knowledge-base / file-library / resource manager — benchmark against Notion,+Google Drive / Dropbox, NotebookLM, Mem, Obsidian. Class norms checked: upload-with-progress,+search/filter, sort, bulk-select+bulk-ops, single-item lifecycle, file preview, item metadata+(size/type/date/embedding status), empty-as-onboarding vs no-match, pagination/infinite scroll.+**Layers run:** L1 (static / code) ✅. L2 / L3 ⏳ not run.++**Headline:** the **write / ingestion side is genuinely strong** — drag-drop upload with a live+progress dock, per-folder tree loading, virtualized infinite scroll, three-mode bulk-select,+batch delete/chunk with confirm, optimistic create/rename. But the **read side has no error+path anywhere**: every one of the four data fetches (resource list, sidebar KB list, search,+folder tree) reads only `isLoading`/`data` and never `error`, so a **failed fetch renders as+the onboarding empty state** — telling the user "create your first resource" when the load+actually broke. Two more failure-swallowing traps compound it: a library-detail fetch failure+renders as **404 Not Found** (deleted vs failed-to-load conflation), and the **upload dock+auto-dismisses _failed_ uploads after 3s** with no retry.++Same "resolves only on success" root cause as the Eval module — see [eval.md](eval.md).++## 1 — Patterns in use++| Pattern (family) | Where | Rating | Note |+| -------------------------------------- | ----------------------------------------------------------------------------------------- | ------ | ------------------------------------------ |+| Overview + Detail (nav) | home → library → folder(slug); sidebar tree drill | ✅ | clean multi-level drill |+| Deep-linking (nav) | `/resource/library/:id/:slug` restores folder; tree expands ancestors | ✅ | breadcrumb-driven ancestor expand |+| Empty-as-onboarding (growth) | Explorer `EmptyPlaceholder` (Create KB / Upload File / Folder cards) | ✅ | real page + CTAs — highlight |+| Loading Skeleton (feedback) | list/masonry skeletons reuse row/card chrome; sidebar `SkeletonList`; tree `TreeSkeleton` | ✅ | textbook §4.1 |+| **Failure + Retry (feedback)** | every fetch (resource list, KB list, search, tree) | — abs. | systemic root cause (gap A) |+| Progress Indicator (feedback) | UploadDock per-file + overall progress bar | ✅ | but auto-dismisses failures (gap C) |+| List at scale (data) | `Virtuoso` / `VList` virtual scroll + infinite `endReached` + footer skel | ✅ | main list solid |+| **Search over paginated set (data)** | `SearchResultsOverlay` server query capped `limit: 50, offset: 0` | ⚠️ | no pagination past 50 matches (gap D) |+| Entity lifecycle — delete/chunk (act) | batch delete + batch chunk: confirm + async | ✅ | confirm present |+| Entity lifecycle — create/rename (act) | KB create modal, inline rename, optimistic resource ops | ✅/⚠️ | optimistic; rename draft in-memory (gap E) |+| Upload (input/act) | drag-drop zone + UploadDock | ✅/⚠️ | strong, but no retry on failure (gap C) |+| Draft safety (edit) | search query → URL+store (survives); rename input → local `useState` | ⚠️ | rename draft not persisted (gap E, minor) |++**Read:** ingestion, tree, virtualization, bulk-select and delete/chunk are solid. The weakness+clusters entirely in the **read side** — list/detail/search/tree `error` + retry — plus the+upload dock silently discarding failures.++## 2 — Strengths / good cases (don't regress)++The write /ingestion side is strong where it counts — these are the ✅ half of the 回灌 loop and+the "don't regress" list for the next refactor. Keep, don't "fix":++- **✅ 亮点 — Drag-drop upload with a live progress dock.** A drag-drop zone feeding+ `UploadDock`, which surfaces both per-file and overall progress bars while ingestion runs — the+ ingestion side never goes silent. (The one caveat is that it auto-dismisses _failed_ uploads;+ that's gap C, not a knock on the happy-path dock.)+- **✅ 亮点 — List at scale done right.** A **virtualized list _and_ masonry** (`Virtuoso` /+ `VList`) with infinite `endReached` paging plus footer skeletons, so the main list stays smooth+ at scale and the load-more affordance is honest rather than a hard cap.+- **✅ 亮点 — Per-folder lazy tree with ancestor auto-expand.** The folder tree loads per-node+ (per-folder lazy load with per-node loading state) and, on deep-link, auto-expands the whole+ ancestor chain to restore the folder in place — `/resource/library/:id/:slug` breadcrumb-driven+ ancestor expand.+- **✅ 亮点 — Three-mode bulk-select + safe batch ops.** Bulk-select across three modes+ (none / loaded / all) feeding **batch delete** and **batch chunk**, both gated behind a confirm+ and run async — destructive batch work never fires unconfirmed.+- **✅ 亮点 — Optimistic create/rename merged against server data.** KB create modal, inline+ rename and optimistic resource ops merged against the server via+ `mergeServerResourcesWithOptimistic` — the list updates instantly without diverging from+ server truth.+- **Explorer `EmptyPlaceholder` + chrome-reusing skeletons.** The Explorer `EmptyPlaceholder` is+ a real onboarding page (Create-KB / Upload-File / Upload-Folder cards), and the list / masonry /+ sidebar / tree skeletons all reuse row/card chrome for an in-place load→content swap — no antd+ `Spin` anywhere. A quiet feedback-hygiene win worth keeping.++## 3 — Experience gaps (ranked)++**🔴 A — No error/retry on any read; every fetch resolves only on success → a failed load+renders as the onboarding empty (or a blank / a false 404).** Systemic: all four consumers+read `{ data, isLoading }` (never `error`) and coerce failure into empty:++- **Explorer false-empty** — `useFetchResources` returns the full swr incl. `error`+ (`store/file/slices/resource/hooks.ts:104`), but the consumer destructures only+ `{ isLoading, isValidating }` (`Explorer/index.tsx:57`) and gates+ `showEmptyStatus = !isLoading && !isValidating && data?.length === 0` (`:89`) → a failed+ fetch → empty list → the "create your first resource" onboarding `EmptyPlaceholder`+ (`EmptyPlaceholder.tsx:65`).+- **Sidebar KB list** — `const { data, isLoading } = useFetchKnowledgeBaseList()`+ (`(home)/_layout/Body/LibraryList/index.tsx:22`); no `error`, so a failure renders either the+ "create new library" empty CTA or a blank list (`:38-48`).+- **Search overlay false-empty** — `const { data, isLoading } = useClientDataSWR(...)`+ (`SearchResultsOverlay.tsx:43`); a failed search → `!data` → "No results found" (`:113`),+ asserting "nothing matches" when the query actually errored.+- **Folder tree false-empty** — `isLoading = status[''] === 'loading'`; empty gated on+ `!isLoading && … visibleNodes.length === 0` (`LibraryHierarchy/index.tsx:60,83`) with no+ `'error'` branch → a failed tree load renders the "add folder" empty.+ → Read §1.1 (error before empty) + Feedback §4.2. The `error` signal already exists on the swr;+ it's simply never read — a cheap fix. The module's flagship ❌ example.++**🟠 B — library detail: a fetch failure renders as 404 "Not Found", conflating deleted with+failed-to-load, no retry.** `useKnowledgeBaseItem` is read as `{ data, isLoading }` and+`if (!isLoading && !data) return <NotFound />` (`resource/library/index.tsx:21,37`). A transient+network/500 → `data` undefined → the permanent "this doesn't exist" 404, so the user thinks+their library was deleted and has no Reload. → Read §1.1 (a failed load is not "not found";+distinguish deleted vs errored, offer retry).++**🟠 C — the upload dock auto-dismisses _failed_ uploads after 3s, with no retry.** The+auto-dismiss effect only guards `isUploading` and `'pending'`; the `'error'` state falls+through, so after 3s it hides the dock and `removeFiles` (`UploadDock/index.tsx:106-124`). A+failed upload therefore vanishes silently — no error kept, no Retry affordance anywhere. Auto-+dismiss should apply to **success only**; a failure must persist with retry. → Feedback §4.2+(failed state stays available + offers retry), Act §3.1 (async op ends in done/**error**, not+fire-and-forget).++**🟡 D — search results are capped at 50 with no pagination.** The search fetch hard-codes+`limit: 50, offset: 0` (`SearchResultsOverlay.tsx:52-57`) and renders a flat virtualized list+with no load-more; matches #51+ are unreachable. Server-side query is correct (not a+partial-page false-empty), but the surface silently truncates. → Read §1.2 (search over a large+set must page through all matches, not cap silently).++**🟡 E — inline rename draft is in-memory `useState`, lost if the row/popover closes+mid-edit.** Minor (per Edit §2.1 the bar is lighter for transient inline edits), but a rename+interrupted by a click-away discards the typed name with no restore+(`(home)/_layout/Body/LibraryList/Item/Editing.tsx`). → Edit §2.1.++**🟡 F — search overlay keeps its own `selectedFileIds` local state, separate from the main+explorer selection.** Selecting rows in search results doesn't carry into the normal view (and+vice versa) (`SearchResultsOverlay.tsx:34`). Consistency-of-selection gap; verify the intended+model on L2. → Act §3.1 (bulk parity), Read §1.6-ish (state continuity across views).++## 4 — Skill feedback++- **New /strengthened rules (回灌):**+ - **Feedback §4.2** — added a clause + ❌ example: _a transient / auto-dismissing status+ surface (upload dock, progress toast) must not auto-clear a **failed** item — auto-dismiss+ success only; keep the failure with a retry._ Resource `UploadDock` (gap C) is the ❌.+ - **Read §1.1** — added the **detail-fetch-failure-as-404** clause: a detail page that renders+ a fetch failure as "not found / 404" is the same error-masquerade as failure-as-empty+ (deleted vs failed-to-load); Resource `library/index.tsx` (gap B) is the ❌.+- **Landed as ❌ examples on existing rules (validated, no new rule):**+ - Read **§1.1** — Resource Explorer / sidebar KB list / search overlay / folder tree added to+ the failure-as-empty example (gap A).+ - Feedback **§4.2** — the four-fetch `error`-never-read pattern (gap A), sibling to the Eval+ `onSuccess`-only systemic root cause.+ - Read **§1.2** — search capped at 50 with no paging (gap D).+- **Validated existing rules:** §1.1 empty-vs-failed, §4.2 loading-can-fail, Act §3.1 done/error.++## 5 — Pending: L2 + L3++- **L2** — how the false-empty onboarding actually reads on a failed fetch vs a true empty; the+ masonry card grid at narrow width; the upload dock progress/error visuals; dark mode.+- **L3** — force each of the four fetches to fail to confirm gap A live (onboarding empty /+ blank / false "no results" / false "add folder"); open a library while its detail fetch fails+ to confirm gap B (false 404); force an upload to fail and watch the dock auto-dismiss it+ (gap C); search a library with >50 matches to confirm gap D truncation.diff --git a/.agents/skills/ux-audit/references/example/settings.md b/.agents/skills/ux-audit/references/example/settings.mdnew file mode 100644index 00000000000..6a779c7bf6f--- /dev/null+++ b/.agents/skills/ux-audit/references/example/settings.md@@ -0,0 +1,290 @@+# Worked example — Settings area (设置区) systemic audit++A real run of this skill against the **whole settings area** (personal `/settings/*` ++workspace `/:slug/settings/*`), 2026-07. Unlike the per-page examples, this is a+**systemic / IA-level** pass: it audits the shared shell and cross-tab _consistency_ rather+than one surface. Use it as the template for a "audit an area as a system" run; per-tab+deep-dives are separate runs (see §6).++**Layers run:** L1 (static / code) ✅ — everything below. L2 / L3 ⏳ not run.++**Scope & blind spot:** personal 26 + workspace 15 = 41 surfaces. **Business-injected tabs+are empty stubs in this OSS repo** (`return null`): workspace `general / members /+audit-log / plans / billing / credits / usage`, personal `notification / plans / credits /+billing / referral / usage` (`src/business/client/BusinessSettingPages/*`). L1 from this+repo **cannot** audit them — they need the cloud build (L2/L3) or the business package.+Findings below cover the shared shell + the \~17 code-readable tabs.++## Surface map (load-bearing files)++- **Personal shell:** `src/routes/(main)/settings/_layout/index.tsx` (SideBar + Outlet),+ `_layout/Body/index.tsx` (accordion nav), `_layout/Header.tsx` (breadcrumb),+ `features/SettingsContent.tsx` (tab dispatch + `SettingContainer` wrap), tab catalog+ `hooks/useCategory.tsx`.+- **Workspace shell:** `src/features/WorkspaceSetting/Layout.tsx`, `SideBar/Body.tsx`,+ `Container/index.tsx`, catalog `hooks/useCategory.tsx`.+- **Mobile catalog (3rd copy):** `src/routes/(mobile)/me/settings/features/useCategory.tsx`.+- **Tab enums:** `SettingsTabs` (`src/store/global/initialState.ts`),+ `WorkspaceSettingsTabs` (`src/types/workspaceSettings.ts`).++## 1 — Patterns in use (systemic)++| Pattern (family) | Where | Rating | Note |+| ---------------------------- | -------------------------------------------------------- | ------ | ---------------------------- |+| Global Navigation / Fat Menu | sidebar `Accordion`, 4 groups (`_layout/Body/index.tsx`) | ✅ | grouped, default-expanded |+| Deep-linking | `/settings/:tab`, `:tab/:sub` (messenger/discord) | ✅ | URL restores tab |+| Visual Framework | `SettingContainer maxWidth=1024`, personal + workspace | ✅ | consistent chrome |+| Breadcrumbs | `_layout/Header.tsx` — single "设置" level | ⚠️ | doesn't deepen per tab |+| **Search / Jump-to-setting** | — | — abs. | \~25 tabs, no search (gap ⑤) |+| Titled Sections / FormGroup | per-tab `Form` / `FormGroup` | ✅ | |+| Good / Smart Defaults | autosave-on-change is the dominant model | ✅ | no explicit Save button |+| **Failure + Retry** | — | — abs. | area-wide (gaps ①②) |+| Loading Skeleton | most tabs skeleton; Creds / Profile use antd `Spin` | ⚠️ | §4.1 (gap ⑥) |+| Empty-state as onboarding | Devices / Creds / Messenger have CTA empties | ✅ | highlight |+| Entity lifecycle | Devices / APIKey / Creds full CRUD, Devices bulk-select | ✅ | |++**Read:** navigation / layout / defaults are mature; data-tab empty states are good.+Weakness clusters hard in **Feedback (failure + autosave feedback)** and **cross-tab+consistency / IA**.++## 2 — Strengths / good cases (don't regress)++The settings area is strong where it counts — these are the ✅ half of the 回灌 loop and the+"don't regress" baseline for each per-tab deep-dive:++- **✅ 亮点 — Grouped accordion nav over consistent chrome.** The sidebar `Accordion` splits \~25+ tabs into 4 default-expanded groups (`_layout/Body/index.tsx`) over a `SettingContainer+maxWidth=1024` shell shared by **both** personal and workspace, so every tab wears the same+ chrome. Navigation / layout / defaults are the mature core the rest hangs off.+- **✅ 亮点 — CTA-carrying empty states on the data tabs.** Devices / Creds / Messenger render+ their "nothing here yet" branch as onboarding with a next-step CTA, not a dead end — the+ empty state doubles as the entry point to configure the feature.+- **✅ 亮点 — Full entity lifecycle with bulk-select.** Devices / APIKey / Creds ship complete+ CRUD, and Devices adds bulk-select for mass management (`DeviceManager.tsx`), the excellent+ empty + bulk-select combo the per-tab pass called out.+- **✅ 亮点 — Storage import path is well-built.** The import flow is a proper state machine+ (preview + progress), the one pocket of resilience craft in a tab whose destructive clear-all+ is otherwise the audit's biggest stakes (`Advanced.tsx`).+- **✅ 亮点 — Creds secret-masking + 2-variant empty.** Credentials mask secrets and carry a+ 2-variant empty state (`CredsList.tsx`) — the right handling for sensitive values, and the ✅+ half of a tab whose error-as-empty leg still needs fixing.+- **✅ 亮点 — Workspace Body validates the tab enum.** `SideBar/Body.tsx:25` validates the+ active tab against `WorkspaceSettingsTabs` — the ✅ contrast to personal's silent-Appearance+ fallback for unknown deep-links (`SettingsContent.tsx:40`, gap ⑧).++## 3 — Experience gaps (ranked)++**① No error/retry anywhere in the settings area — ux §4.2** 🔴 Not one tab has a terminal+failure + retry. Two failure modes: (a) init-flag set only on success → **permanent+skeleton**: Storage (`storage/index.tsx:18`), Memory (`memory/features/Memory.tsx:28`),+ServiceModel (`features/ServiceModel/ModelAssignmentsForm.tsx:64`), Profile+(`profile/index.tsx` composite `isLoading`); (b) SWR/Query error swallowed → empty or+infinite spinner: Devices (`features/DeviceManager/DeviceManager.tsx:331`), Messenger,+Creds, Stats, APIKey. Only recovery is a full app reload. The single biggest, most uniform+issue.++**② Autosave failures are silently swallowed — ux §4.2 / §3.5** 🔴 Dominant save model is+`Form onValuesChange → setSettings`. Appearance, Advanced, Hotkey (Essential/Conversation)+give **no success and no failure feedback** — a toggle that failed to persist looks+identical to one that succeeded (config-loss / trust). Profile / Desktop-hotkey / Proxy do+surface an error but offer **no retry**.++**③ Save feedback is fragmented across tabs — Certainty (consistency is semantic)** 🟠 Same+intent ("change a setting") → different feedback: silent (Appearance/Advanced/hotkey-+essential), inline `message.success` (Desktop hotkey), `notification.success` (Profile+password), toast on _test_ not save (Proxy). `Form` / `SettingContainer` / `FormGroup`+provide layout but **no save-state affordance**, so nothing forces convergence.++**④ Error indistinguishable from empty — ux Read §1.1** 🟠 Stats, Messenger, Creds render+their "no data" branch on a _failed_ fetch (`data === undefined`), so "load failed"+masquerades as "nothing configured" (Messenger `noPlatformsConfigured`, Stats empty charts).++**⑤ No settings-wide search — surface-class benchmark** 🟠 \~25 personal tabs in 4 groups;+mature settings surfaces (VSCode / Slack / GitHub / macOS) ship settings search /+jump-to-setting. The shell has only accordion nav + breadcrumb — no search input. A class-+norm gap a code-only read is structurally blind to. (pending L2 to confirm none elsewhere.)++**⑥ antd `Spin` where the design system forbids it — ux §4.1** 🟡 Profile rows+(`UsernameRow.tsx:5,95`, `FullNameRow`, `AvatarRow`) and `CredsList.tsx:6,77,97` use antd+`Spin` instead of `NeuralNetworkLoading` / skeleton.++**⑦ Tab catalog hand-duplicated 3× and drifted — Certainty / maintainability** 🟡 Defined+independently in `hooks/useCategory.tsx` (desktop personal),+`WorkspaceSetting/hooks/useCategory.tsx`, and+`(mobile)/me/settings/features/useCategory.tsx`. Already diverged: mobile omits Devices,+Notification, Messenger, Hotkey, Proxy, SystemTools — a phone user **cannot reach+Devices / Messenger / Notification settings at all**. Three parallel copies guarantee+future drift (same class the `desktopRouter.sync.test` guards for routes).++**⑧ Unknown `/settings/<garbage>` silently renders Appearance — ux Read §1.1 / Certainty**+🟡 `SettingsContent.tsx:40` falls back to `componentMap.appearance` for any unrecognized+tab; personal active-tab detection (`Body/index.tsx:20`, `pathParts[2]`, no enum+validation) highlights nothing. A bad deep-link shows Appearance with no nav highlight+instead of a not-found. Workspace Body **does** validate (`SideBar/Body.tsx:25`) — the two+halves are inconsistent.++**⑨ `Security` is a dead redirect still carried as a tab — Growth / cleanliness** 🟡+`security/index.tsx` is only `<Navigate to="/settings">`, yet `Security` remains in the+`SettingsTabs` enum, `componentMap`, and `SettingsContent`'s mobile-prop list. Real content+moved into Profile (PasswordRow / SSO / Email). Dead surface to prune.++## 4 — Skill feedback++- **Validated existing rules** (❌ examples to cite): §4.2 (①②, incl. init-flag-success-+ gated permanent skeleton), §4.1 (⑥), Read §1.1 (④⑧), §3.5 (②).+- **Landed as new / strengthened `ux` items** from this audit:+ - Feedback **§4.4 Autosave feedback & one save convention per surface** (gaps ②③).+ - Read **§1.8 Search / filter a config surface at scale** (gap ⑤).+ - Read **§1.1 strengthened** — error must be checked **before** the empty branch; a failed+ fetch never renders as empty (`data ?? [] → Empty` trap; 7 settings tabs).+ - Act **§3.7 Irreversible / high-blast-radius actions need elevated confirmation**+ (type-to-confirm + report partial failure; Storage clear-all).+ - Act **§3.8 Secrets revealed once, stored hashed, masked thereafter** (APIKey class norm).+ - Grow **§5.3 Close the config → manage loop with a near entry point** — a config surface+ for a feature with its own data/management area must link to it in-context, not just+ promise it in copy. ❌ example: Memory settings has no link to `/memory`. **Also patched the+ L1 procedure** (`layer-1-static.md` step 3) to ask this cross-surface check on every surface+ — this gap was under-framed as "dead copy" in the first pass because L1 is structurally+ blind to an entry point that was never built (no `file:line`).+ - review-checklist **"Single-source the nav/tab catalog"** (gap ⑦).+- **Noted, not yet landed:** breadcrumb that doesn't deepen per tab (⑧-adjacent) — promote+ if a second surface repeats it.++## 5 — Pending: L2 visual + L3 dynamic++- **L2** — confirm no settings search is rendered anywhere (gap ⑤); confirm the antd `Spin`+ rows read visually off from the rest (⑥); check dark-mode + narrow-width of the accordion+ sidebar; confirm empty vs error render differences (④).+- **L3** — force each store/SWR fetch offline to **confirm gaps ①②④ live** (permanent+ skeleton; silent autosave failure; error-as-empty); walk mobile to confirm the missing+ Devices/Messenger/Notification tabs (⑦); measure settings-tab-switch INP.++## 6 — Phase B: per-tab deep-dive queue (sub-issues under LOBE-11078)++The systemic 🔴 (①②③) are **cross-cutting** — file as ONE "settings resilience" issue, not+per tab. Then deep-audit each tab (`/ux-audit <tab>`), priority by user-path heat:++| Prio | Surface | Why deep-audit |+| ------- | ------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------- |+| P0 xcut | settings error/retry + autosave feedback | ①②③ one systemic fix |+| P1 | Provider (full-bleed, biggest) | not covered this pass; model/key core path |+| P1 | Profile (entry tab) | autosave rows + antd Spin + composite isLoading |+| P2 | Skill (full-bleed marketplace) | multiple antd Spin |+| P2 | ServiceModel | model assignment core + init-flag skeleton |+| P3 | Appearance / Advanced | silent autosave-failure exemplars |+| P3 | Devices / Creds / APIKey / Messenger / Stats / Storage / Memory / Hotkey / Proxy / SystemTools / About | state-handling covered; finish full pattern/i18n/hierarchy pass |++## 7 — Per-tab L1 deep-dive findings (2026-07, all 17 code-readable tabs)++Each tab was re-audited full-depth (patterns + all ux modules). Severity-tagged one-liners+with `file:line`; the recurring systemic roots (§4.2 success-only skeleton, §4.4 silent+`setSettings`/mutation with no catch, error-rendered-as-empty, antd `Spin`) are marked+**\[sys]**. Verdicts about the render are **pending L2**.++**Provider** 🔴🔴🔴 — every mutation in `aiInfra/slices/{aiProvider,aiModel}/action.ts` has no+try/catch: config autosave swallowed + spinner hangs (`aiProvider/action.ts:345`), toggles+don't roll back on failure (`:315`, `aiModel/action.ts:137`); list/model init success-only →+permanent skeleton (`:444`, `aiModel/action.ts:172`) **\[sys]**; model fetch error → misleading+`EmptyModels`; create/update/delete modals `catch{console.error}` no in-modal error. Strong+patterns (Overview+Detail, search, source-gated CRUD). **Needs issue.**++**Skill** 🔴🔴🔴 — 4 list SWR returns discarded, no error/loading on the left list+(`SkillList.tsx:124`) **\[sys]**; empty state has no CTA + goes fully blank on the wrong+view-tab (`SkillList.tsx:324-338`); install/connect errors → `console.error`, no save-state+(`AgentSkillItem.tsx:130`, `ComposioSkillItem.tsx:176`); sync error → "no permissions"+(`SkillDetail/index.tsx:240`); no search/virtualization (marketplace at scale). **Needs issue.**++**ServiceModel** 🔴🔴 — success-only init skeleton (`ModelAssignmentsForm.tsx:64`) **\[sys]**;+autosave no-catch + optimistic value persists on failure (`:76-94` + `settings/action.ts:189`)+**\[sys]**; 🟠 capability machinery (`requiredAbilities`) exists but every `ModelSelect` passes+`showAbility={false}` — assign an incapable model, no warning (§4.3); no no-models state. **Needs issue.**++**Profile** 🔴🔴 — antd `Spin` in `UsernameRow.tsx:95`, `FullNameRow.tsx:43`, `AvatarRow.tsx:90`+(§4.1); composite `isLoading` success-only → whole tab permanent skeleton if authProviders/+composio fetch fails (`profile/index.tsx:56`) **\[sys]**; 🟠 5 rows confirm 5 different ways;+optimistic interests can diverge silently (`InterestsRow.tsx:31`); password/email use transient+toast not persistent state (§3.5); 🟡 hardcoded `'Failed to change email'` (`EmailRow.tsx:52`). **Needs issue.**++**Appearance** 🔴 — canonical §4.4 exemplar: 3 different save mechanisms+(`Common.tsx:179`, `Appearance/index.tsx:58`, `ChatAppearance/index.tsx:35`), all silent, all+no try/catch/finally → failed save hangs spinner + loses config **\[sys]**; 🟠 success-only+skeleton **\[sys]**; strong Illustrated Choices + live Preview. **Needs issue.**++**About** 🟡 — **healthy.** Only gap: version/update check has no `onError` → a failed check is+silent / looks "up to date" (`general.ts:189,214`, `Version.tsx`). Titled sections, external-link+affordances, `Button loading` (no `Spin`), clean i18n. **Low — fold into systemic or skip.**++**Advanced** 🔴 — autosave + lab toggles silent no-catch → spinner hangs, silent loss+(`advanced/index.tsx:265`, `preference/action.ts:39`) **\[sys]**; 🟠 success-only skeleton **\[sys]**;+🟡 Labs (Fleet/iMessage/Connect-Agent) applied instantly with **no "experimental" risk framing**+(§4.3/§3.4). **Needs issue.**++**Proxy** 🔴🔴 — the one explicit-Save tab, and Save gives neither success nor failure feedback:+`proxy.saveSuccess` locale key is **dead/unused** and `handleSave` has an **empty `catch{}`**+(`ProxyForm.tsx:156-166`); 🟠 no draft-loss guard on navigate-away (`useBlocker` absent, §2.1);+🟠 `error` never read from SWR → no load-error state. **Needs issue.**++**Hotkey** 🔴🔴 — §4.4 twice: 3 save conventions on one page (Desktop toast vs Essential/+Conversation silent, `Desktop.tsx:42` vs `Essential.tsx:83`/`Conversation.tsx:83`) **\[sys]** ++silent autosave failure; 🟠 **Desktop group alone lacks client-side conflict detection**+(`Desktop.tsx:56`, others pass `hotkeyConflicts`); 🟠 success-only skeleton **\[sys]**. **Needs issue.**++**SystemTools** 🔴🔴 — owns `BinaryStatus.error` from the IPC contract but throws it away: per-tool+detection failure renders identical to "not installed" (`ToolDetectorSection.tsx:76-124`), and a+whole `detectAll` rejection → silent all-"Not detected" (`:136`) **\[sys, error-as-empty]**; 🟠+undetected tools dead-end with no install path (§3.1). Read-only otherwise (healthy structure). **Needs issue.**++**Storage** 🔴🔴 — **clear-all data** (agents/files/messages/skills) has **no try/catch** + a plain+one-click danger confirm with **no type-to-confirm** for an unrecoverable wipe (`Advanced.tsx:46-65`);+partial-failure → half-deleted data, modal open, zero feedback; 🟠 success-only skeleton **\[sys]**;+🟠 telemetry toggle silent-fail + snap-back (`:156`); 🟡 export fire-and-forget. Import path is+well-built (state machine + preview + progress). **Needs issue (highest destructive stakes).**++**Devices** 🔴 — SWR `error` never read → a failed load renders the **onboarding "connect your+first device" empty**, falsely telling the user they own none (`DeviceManager.tsx:304→310→334`)+**\[sys, error-as-empty]**; 🟠 bulk-delete = mass device revocation with no "this is your current+session" warning though `isCurrent` is computed (§3.6); 🟠 bulk/per-row delete has no error leg+(`Promise.all` no catch). Excellent empty state + bulk-select. **Needs issue.**++**Stats** 🔴🔴 — every widget success-only + `loading={isLoading || !data}` → any fetch failure =+**permanent skeleton** (`ModelsRank.tsx:50`, etc.) **\[sys]**; **§1.5 number trap**: `formatTokenNumber`+caps at `M` (`packages/utils/src/format.ts:91`) → `5000M`/`12000M`, and `formatNumber` doesn't+abbreviate at all; 🟠 antd `Spin` in shared `StatisticCard` (`components/StatisticCard/index.tsx:166`);+🟡 hardcoded `'ID'`/`'Chat'` table strings. **Needs issue.**++**Creds** 🔴🔴 — **4 bare antd `<Spin/>`** (`CredsList.tsx:77,97`, `EditKVForm.tsx:127`,+`OAuthCredForm.tsx:79`, §4.1); list query `error` never read → failure renders as "no credentials"+(`CredsList.tsx:47,100`) **\[sys, error-as-empty]**; 🟠 no create/edit/delete mutation has an+`onError` leg; 🟡 edit decrypt failure swallowed → blank overwrite (`EditKVForm.tsx:75`); 🟡+hardcoded English placeholders. Good secret-masking + 2-variant empty. **Needs issue.**++**APIKey** 🔴🔴 — **inverts the API-key class norm**: `query()` decrypts + returns full plaintext on+every list fetch (`packages/database/src/models/apiKey.ts:93`), masked client-side only with an+eye-toggle (`ApiKeyDisplay/index.tsx:32`); **no one-time create reveal** — modal just closes,+mutation result discarded (`ApiKey.tsx:49`, `Content.tsx:36`); 🟠 no error/retry on failed `request`;+🟠 inline edit/toggle silent-fail; antd default empty. **Needs issue (security + UX).**++**Memory** 🔴 — inherits silent-autosave no-catch (`Memory.tsx:63,91` + `settings/action.ts:189`)+**\[sys]**; 🟠 success-only skeleton **\[sys]**; 🟠 capability-gated feature with **no warning** when no+memory model is configured (set on a different tab, §4.3); 🟠 copy promises "view/edit/clear memory+anytime" but renders **no link** to `/memory` (dead promise); 🟡 dead empty tooltips (`usePermission`+stub). Small clean form otherwise. **Needs issue.**++**Messenger** 🔴 — platform-list `error` never read → failure renders "noPlatformsConfigured"+(`Messenger/index.tsx:118,135`) **\[sys, error-as-empty]**; 🟠 detail panes success-only → permanent+skeleton on error (`shared.tsx:386`, `Slack.tsx:58`) **\[sys]**; 🟠 OAuth connect is a bare link →+toast-only outcome, no in-progress/done machine (§3.1/§3.5, partly mitigated by list refetch); 🟡+Slack pending state strands vs Discord's CTA. **Needs issue.**++### Cross-tab tally++- **error-rendered-as-empty \[sys]** (highest-frequency): Devices, Messenger, Creds, Stats, Skill,+ SystemTools, Provider (model list). 7 tabs render a failed fetch as "nothing here".+- **success-only init skeleton \[sys]**: Storage, Memory, ServiceModel, Profile, Appearance, Advanced,+ Hotkey, Provider, Stats. 9 tabs.+- **silent autosave / mutation no-catch \[sys]**: Appearance, Advanced, Memory, ServiceModel, Hotkey,+ Provider, Profile, Devices-detail, APIKey, Creds, Storage-telemetry. \~11 surfaces.+- **antd `Spin` (§4.1)**: Profile (3), Creds (4), Stats (StatisticCard). 3 tabs.+- **class-norm gaps** (code-blind, benchmark-only): APIKey one-time-reveal 🔴, Stats §1.5 rollover 🔴,+ settings-wide search ⑤, Storage type-to-confirm, Memory capability warning, SystemTools install path.+- **Healthy**: About (1 low gap). SystemTools structurally healthy bar the error-state gap.diff --git a/.agents/skills/ux-audit/references/example/tasks.md b/.agents/skills/ux-audit/references/example/tasks.mdnew file mode 100644index 00000000000..ca13b569a02--- /dev/null+++ b/.agents/skills/ux-audit/references/example/tasks.md@@ -0,0 +1,253 @@+# Worked example — Task Workspace (`/tasks` list + `/task/[id]` detail) audit++A real run of this skill against the **Task Workspace** (`@/features/AgentTasks`), 2026-07 —+an agent task board: a cross-agent list/kanban (`/tasks`) + a single-task detail that doubles+as an **async agent-run monitor** (`/task/[taskId]`) with a live activity feed, subtasks,+comments, artifacts, and schedule / verify config. Use it as a template for the output shape,+not as current-state truth (the code moves; re-verify before citing).++**One pair of surfaces, two entry points (not a duplicate).** The audit resolved the parent+issue's warning: the "Chat-side" tasks routes (`agent/:aid/tasks`, `agent/:aid/task/:taskId`,+`desktopRouter.config.tsx:121-136`) and the standalone workspace routes (`/tasks`,+`/task/:taskId`, `:637-669`) **delegate to the same components** — `AgentTasksPage` and+`TaskDetailPage` — parameterized by `agentId` / `showTaskAgentPanelToggle`+(`routes/(main)/tasks/index.tsx`, `.../agent/tasks/index.tsx`, `.../task/[taskId]/index.tsx`).+So this is **one** list surface + **one** detail surface, audited once.++**Surface class:** agent task board / issue tracker + async-job monitor — benchmark against+Linear / Asana (list · kanban · grouping · priority · assignee) **and** Devin / GitHub Actions+run pages / cron dashboards (run · pause · stop · retry · live log · schedule).+**Layers run:** L1 (static / code) ✅ — everything below. L2 (visual) / L3 (dynamic + CLS)+⏳ not yet run — see §5. Verdicts about the render are L1 inferences here, pending L2.++**Load-bearing files:** `features/AgentTasks/AgentTaskList/{AgentTasksPage,TaskList,KanbanBoard,+KanbanColumn,EmptyState,CreateTaskInlineEntry}`, `AgentTaskDetail/{TaskDetailPage,+useActiveTaskDetail,TaskDetailRunPauseAction,TaskDetailHeaderActions,TaskActivities,TaskSubtasks,+TaskVerifyConfig,TaskInstruction,CommentInput,TopicCard}`, `CreateTaskModal/*`,+`store/task/slices/{list,detail,lifecycle,config}/action.ts`, `services/task.ts`,+`apps/server/src/routers/lambda/task.ts`.++## 1 — Patterns in use++| Pattern (family) | Where | Rating | Note |+| ------------------------------------- | --------------------------------------------------------------------------------------------- | ------ | ---------------------------------------------------------- |+| Overview + Detail (nav) | list rows → `taskDetailPath` (`AgentTaskItem.tsx:65`); detail sections | ✅ | click row opens detail |+| Deep-linking / breadcrumb (nav) | `shared/Breadcrumb.tsx`; copy-link (`HeaderActions.tsx:49`, `useTaskItemContextMenu.tsx:202`) | ✅ | workspace-aware absolute URL |+| List ⇄ Kanban toggle (nav) | `TasksGroupConfig.tsx:163`, persisted `setViewMode` | ✅ | view choice sticks |+| Grouping / sub-grouping / sort (data) | `TaskList.tsx:143-201`, `listViewOptions.ts` | ⚠️ | rich — but **client-side over ≤50 rows** (gap ⑤) |+| Empty-as-onboarding (growth) | `EmptyState.tsx` (greeting + inline create + templates) | ✅ | strong onboarding hero — highlight |+| Loading Skeleton (feedback) | list `TaskList.tsx:203`, kanban `KanbanColumn.tsx:253`, detail `useActiveTaskDetail` | ⚠️ | detail solid; **list can't fail** (gap ①) |+| **Failure + Retry (feedback)** | list fetch / detail fetch | — abs. | the surface's dominant gap (①②) |+| Live activity feed (data) | `TaskActivities.tsx` + 10s poll (`detail/action.ts:48`) | ✅ | reversed chronological, real empty |+| Not-found / 404 (data) | `TaskDetailPage.tsx:39-59` | ⚠️ | real screen, but **failed-load reads as 404** (gap ②) |+| Optimistic mutation (act) | kanban drag (`KanbanBoard.tsx:133`), status, delete | ⚠️ | some roll back + toast, most log-only (gaps ③④⑥⑦⑧) |+| Run / pause / stop control (act) | `TaskDetailRunPauseAction.tsx`, `TopicCard.tsx` | ⚠️ | works, but start/stop failures silent (gap ③) |+| Editable-in-place / autosave (edit) | title, instruction, comment, config | ⚠️ | debounced save, **no `failed` state** (gaps ④⑥) |+| Confirmation (act) | delete / brief / artifact / stop-topic / run-all | ✅⚠️ | broad; **task-level Stop unconfirmed** (gap ⑨) |+| Context menu (act) | `useTaskItemContextMenu.tsx` (status/priority/run/copy/delete) | ✅⚠️ | complete; menu run/status failures silent (gap ⑦) |+| Inline create + modal (act/edit) | `CreateTaskInlineEntry.tsx`, `CreateTaskModal/*` | ⚠️ | create failure silent (③); **draft not persisted** (gap ⑩) |++**Read:** the **read/monitor spine is mature** (detail state machine, live polling, activity+feed, confirmations). The weakness clusters hard in **Feedback** — every fetch that can hang has+no retry (①②), and **nearly every write swallows its failure** (create ③, run/pause ③, delete ④,+config/status autosave ④, comment/menu ⑦⑧): a catch that only `console.error`s, or a re-throw+into an uncaught handler, so the optimistic UI reverts with no word to the user. Plus a+**Read-at-scale** cap (⑤) — the list silently truncates at 50.++## 2 — Strengths / good cases (don't regress)++The read/monitor spine is mature — these are the ✅ half of the 回灌 loop and the "don't regress"+list for the next refactor (which is mostly write-path work, so it's easy to nick these). **Three+land as ✅ examples in the `ux` checklists** (see §4):++- **✅ 亮点 — Detail loading /not-found state machine (→ landed as ux Feedback §4.2 ✅).**+ `useActiveTaskDetail.ts` gates the skeleton on "resolving", **not** on `data === undefined`, and+ the assignee-config gate keys off the fetch's **in-flight** flag (`agentConfigLoading`, `:66-77`),+ so an assignee that resolves to `null` (deleted / out-of-scope) **releases** the gate instead of+ deadlocking — a task with no assignee still renders instead of spinning forever. Extracted a+ latent **compound-gate** sub-rule into Feedback §4.2. (The one soft spot: a _transient fetch+ error_ still coerces to "Task not found" — gap ②; the gate machine itself is the model.)+- **✅ 亮点 — Live polling without the `refreshInterval` trap (→ landed as ux Read §1.7 ✅).** the+ activity feed polls 10s **only while** `hasInFlightActivity`, driven by a **reactive-boolean**+ `shouldPoll` selector feeding `refreshInterval` (`detail/action.ts:300-315`) rather than a+ function-valued `refreshInterval` — so it dodges SWR's cold-start trap (the function form never+ schedules a first timer if its initial value is `0`) and stops the moment the run goes idle.+ Extracted the "conditional polling starts from reactive state" sub-rule into Read §1.7.+- **✅ 亮点 — Run-all flow — the mutation model (→ landed as ux Act §3.1 ✅).** `TaskSubtasks.tsx:204-255`+ runs preview → **locked confirm** → `partialFailure` vs `kickedOff` toasts, so a bulk run tells+ the user exactly what happened even on partial success. This is cited as the **✅** for Act §3.1+ and is the model every other mutation on this surface should copy (they mostly don't — gaps+ ③⑦⑧).+- **✅ 亮点 — Comment draft preserved on failure.** the comment editor is cleared **only after**+ `await` resolves, so a failed post keeps the typed draft in place rather than eating it — the+ draft-safety half of the write path is already right (the missing half is the failure _toast_ —+ gap ⑥).+- **✅ 亮点 — Broad confirmation coverage.** destructive / disruptive actions across the surface —+ delete, brief, artifact, stop-topic, run-all — are gated behind confirms (Confirmation row, §1+ table). The gap is _consistency_, not absence: the task-level Stop is the one sibling left+ unconfirmed (gap ⑨).++## 3 — Experience gaps (ranked)++**① List / kanban fetch failure → permanent skeleton, no retry — Feedback §4.2** 🔴+`isTaskListInit` / `isTaskGroupListInit` flip to `true` **only** in the SWR `onSuccess`+callback (`store/task/slices/list/action.ts:146-155`, `:110-116`); there is **no `onError`**, and+the hook's `error` / `isLoading` are **discarded at the call site** (`AgentTasksPage.tsx:63` calls+`useFetchTaskList(...)` without assigning the return). `TaskList.tsx:203` / `KanbanBoard.tsx:203`+render the skeleton on `!isInit`. So when `taskService.list()` exhausts SWR's retries, `isInit`+stays `false` **forever** → skeleton spins with no error, no retry. The init-flag-gated-on-success+trap — identical to the Eval module's nine-fetch version.++**② Failed task-detail fetch masquerades as "Task not found" (404), no retry — Read §1.1** 🟠+`fetchTaskDetail` throws `Task not found` when `result.data` is falsy **and** propagates any+network / 500 rejection the same way (`detail/action.ts:124-129`); `useActiveTaskDetail.ts:60`+then sets `isNotFound = !!taskError && !hasTaskDetail`, and `TaskDetailPage.tsx:39-59` renders a+terminal `NotFound` whose only action is "Back to tasks". A transient fetch failure (after SWR+retries) therefore tells the user the task was **deleted** and offers **no Reload** — deleted vs+failed-to-load conflated. The code comment (`useActiveTaskDetail.ts:49-51`) reasoned only about+the missing case, not the errored one. (The rest of this machine is good — see Strengths.)++**③ Run / Pause / Run-now / Create failures are silent — Act §3.1 / Feedback §4.2** 🔴+`runTask` catches and only `console.error`s (`lifecycle/action.ts:49-52`) — no re-throw, no+toast; its callers `handleRunOrPause` / `handleRunNow` use `try/finally` with **no catch**+(`TaskDetailRunPauseAction.tsx:60-67`, `:84-91`). A failed run rolls the optimistic+`status: 'running'` back on refresh, so the button **silently snaps back to "Run"** with no+error. The **pause** path (`updateTaskStatus(taskId, 'paused')`) and **createTask**+(`detail/action.ts:150-174`, `try/finally` no catch; callers `CreateTaskInlineEntry.tsx:126`,+`CreateTaskContent.tsx:83` don't catch) are the same shape — an unhandled rejection, zero+feedback, on the surface's primary action. This is the **job-control** twin of the optimistic-+mutation rule: a run/pause/stop/retry that only logs its failure reads as a dead button.++**④ Config & status autosave fail silently; the save-state can't represent failure — Feedback §4.4** 🟠+`updateVerifyConfig`, `updateTaskModelConfig`, `updatePeriodicInterval`, `setAutomationMode`,+`updateSchedule` all catch-and-`console.error` (`config/action.ts:121-132,151-167,224-229,279-284`),+as does `TaskVerifyConfig.doSave` (`:202-204`) and `TaskInstruction`'s debounced save+(`TaskInstruction.tsx:98-100`). The store's optimistic engine reverts the value on failure but+says nothing — a silent-write trap. Compounding it, `taskSaveStatus` is `saving | saved | idle`+with **no `failed`**: on error `updateTask` / `#transitionStatus` reset to `idle`+(`detail/action.ts:284`, `lifecycle/action.ts:106`), and the header renders `AutoSaveHint` only+while `saving` (`TaskDetailPage.tsx:68`) — the enum literally can't represent failure.+(`updateTask` itself does toast — `detail/action.ts:286` — the one exception.)++**⑤ List sort / group / filter run client-side over a 50-row cap; no load-more — Read §1.2** 🟠+The server caps the list at `limit` default **50**, max 100 (`apps/server/src/routers/lambda/+task.ts:99`), and the store's `fetchTaskList` passes **no** limit/offset, so exactly 50 rows load+while `tasksTotal` (`data.total`) can be larger. `TaskList.tsx:135-201` then filters, sorts, and+groups **entirely in-memory over those 50** — with **no pagination, no virtualization, no+load-more**. A user with 60 tasks sees 50, and any sort/group silently orders a partial set (the+paginated-sort-client-side trap). Each visible row _also_ fires its own+`useFetchTaskDetail(task.identifier)` (`AgentTaskItem.tsx:47`) → up to 50 detail requests per+list paint.++**⑥ Instruction / comment / feedback submit show no failure — Act §3.1 / Feedback §4.4** 🟡+`addComment` has no catch and doesn't toast (`detail/action.ts:76-89`); `CommentInput` /+`CommentCard.handleSave` / `FeedbackInput` await it in `try/finally` with no catch+(`CommentInput.tsx:57-65`, `CommentCard.tsx:97-104`). Draft is safe on the comment path (editor+cleared only after `await` resolves — good), but the failed post is an unhandled rejection with no+message. Instruction autosave is the §④ shape.++**⑦ Context-menu run / status changes are fire-and-forget — Act §3.1** 🟡+The context menu calls `void updateTaskStatus(...)` (`useTaskItemContextMenu.tsx:114`) and+`runTask` (which only logs); kanban drag reverts visually but shows no toast+(`KanbanBoard.tsx:139-141`). A failed status/run from the menu gives no feedback. (Status does+flip `taskSaveStatus`, but that's surfaced only on the detail page.)++**⑧ Delete-task failure is silent, and optimistic-before-confirm — Act §3.1** 🟡+`deleteTask` optimistically removes the row (`detail/action.ts:180`), then on failure rolls back+and **re-throws** with no toast (`:190-198`); the confirm modal's `onOk`+(`TaskDetailHeaderActions.tsx:38-41`) doesn't catch, so a failed delete rejects silently and the+navigate to `/tasks` is skipped — the detail page flickers out and back with no explanation.++**⑨ Task-level "Stop" is unconfirmed and gives no feedback — Act §3.1** 🟡+The header Stop (`TaskDetailRunPauseAction.tsx:189-200`) pauses the whole task with **no confirm+and no success toast**, while the per-topic "Stop Run" **is** confirmed (`TopicCard.tsx:77-89`).+Stopping an in-progress agent run is disruptive; the two sibling stop controls should confirm+consistently (consistency-is-semantic).++**⑩ Create draft not persisted — modal `maskClosable` / collapse loses typed content — Edit §2.1** 🟡+`CreateTaskContent` and `CreateTaskInlineEntry` hold draft in local `useState`+(`CreateTaskContent.tsx:51`, `CreateTaskInlineEntry.tsx:64`); the modal is `maskClosable: true`+(`CreateTaskModal/index.tsx:11`), so a stray backdrop click discards everything typed with no+warning, and the minimize→inline handoff opens a fresh inline entry rather than carrying the+draft. (Twin of the home-composer in-memory-draft ❌ already in Edit §2.1.)++**⑪ Section polish — Read §1.1 / Act §3.2** 🟡+`TaskArtifacts.tsx:124` returns `null` on zero artifacts — the whole section vanishes, so "no+artifacts yet" is indistinguishable from "feature missing"; `TaskParentBar.tsx:57-60` swallows a+parent-fetch error and silently shows `backlog`; and `TaskDetailRunPauseAction.tsx:178` returns+`null` when a task is terminal (`completed`/`failed`/`canceled`) so the run-control region reads+empty with no "what now" — **confirm on the render (L2)**, don't conclude from the code.++**⑫ Hardcoded English `defaultValue` / raw literals — i18n** 🟡+Several user-facing strings bypass locale files: `TopicCard.tsx:79-88` (stop-run confirm),+`TopicChatDrawer/index.tsx:150,157,185` (copy-id labels), `detail/action.ts:287` ("Failed to+update task"), `TaskArtifacts.tsx:36` (`node.title || 'Untitled'`). They only show if a `zh-CN`+key is missing, but the `defaultValue` fallbacks flag keys that may be absent.++**⑬ Detail edits don't propagate to the list — two un-normalized caches — Act §3.1 (cross-surface)** 🟠+The list reads a `tasks` array (`useFetchTaskList` `onSuccess`); the detail reads `taskDetailMap`;+`updateTaskDetail` patches only the map (`detail/reducer.ts:74`). Sync is a full `refreshTaskList()`+(`list/action.ts:67`) mounted on _some_ paths (run / status / create / delete) but **gated** on+`updateTask` to fire only when assignee / parent changed (`detail/action.ts:295-297`). So editing a+task's **title / priority / model / instruction** from the detail leaves the list row **stale** —+visible when list + detail are mounted together (Chat portal) or on cached back-navigation+(`revalidateOnFocus:false`). Fix: one normalized map, or invalidate the list on every successful+write. **This is a seam _between_ the two surfaces — see the method note below.**++> ⚠️ **Method blind spot this run hit.** ⑬ was missed on the first pass because the audit was split+> into a per-surface list reader and a per-surface detail reader, each told to ignore the other — so+> the shared-store seam (list `tasks` vs detail `taskDetailMap`, stitched by a gated `refreshTaskList`)+> was owned by neither, and the ux-audit checklists have no cross-surface / cache-coherence item. When+> a surface pair edits + lists the **same entity**, add a reader that owns the seam (the shared store),+> or the split-by-surface fan-out will silently drop coherence bugs.++## 4 — Skill feedback (回灌)++- **Landed as strengthened `ux` items** from this audit:+ - Act **§3.1** — the optimistic-mutation bullet is extended to **run / pause / stop / retry+ job-control** actions, with a task-workspace ❌ (`runTask` console.error-only,+ `lifecycle/action.ts:49-52` + uncaught `handleRunOrPause`) vs ✅ (`TaskSubtasks` run-all)+ (gaps ③⑦). Mirrored into the Quick review.+ - Read **§1.1** — new ❌ example: task detail coerces a transient fetch error into a permanent+ "Task not found" via a fetcher that throws on both missing-and-errored + `isNotFound =+!!error` (`fetchTaskDetail`, `useActiveTaskDetail.ts:60`) (gap ②).+ - Feedback **§4.2** — new ❌ example: task list `isTaskListInit` set only in `onSuccess` with+ the hook's `error` discarded at the call site (gap ①).+ - Feedback **§4.4** — new ❌ example: task config autosave (verify / schedule / model /+ interval) catches-and-logs, and `taskSaveStatus` has no `failed` variant (gap ④).+ - Act **§3.1** — new **cross-surface coherence** rule + ❌ example: list `tasks` array and detail+ `taskDetailMap` are two un-normalized copies, and `updateTask` refreshes the list only for+ assignee / parent, so a detail title/priority edit leaves the list row stale (gap ⑬). Mirrored+ into the Quick review. Plus a method note (⚠️ under gap ⑬): split-by-surface fan-out needs a+ reader that owns the shared-store seam, or it drops coherence bugs by construction.+- **Good cases landed as ✅ examples (the ✅ half of 回灌 — each sharpened a rule, not just decorated it):**+ - Feedback **§4.2** — new **compound-gate** sub-rule + ✅: a gate waiting on a _secondary/dependent_+ fetch must key off its **in-flight** flag and release on resolved-absent (`null`), never on the+ dependency being present in a map. Extracted from `useActiveTaskDetail.ts:66-77` (the assignee-+ config gate) — the current rule only covered a primary fetch's success-only init flag; this adds+ the "absent dependency is a resolved state, not a pending one" distinction. Checklist line added.+ - Read **§1.7** — new **conditional-polling** sub-rule + ✅: start polling from **reactive state**+ (`shouldPoll` boolean → `refreshInterval`), not a function-form `refreshInterval` (which never+ schedules a first timer if the initial value is `0`, so polling silently never starts). Extracted+ from `detail/action.ts:300-315`. Checklist line added.+ - Act **§3.1** — the **run-all** flow (`TaskSubtasks.tsx:204-255`) is cited as the ✅ for the+ job-control rule (preview → locked confirm → `partialFailure` vs `kickedOff` toasts).+- **Validated existing rules** (good ❌ examples to cite): Read §1.2 sort/search over a+ partial paginated page (gap ⑤); Edit §2.1 in-memory draft lost on close (gap ⑩); Act §3.2+ terminal-state control visibility (gap ⑪, pending L2). Good ✅ instance already covered by an+ existing rule (cited, not re-landed): comment-draft-preserved-on-failure (Edit §2.1).++## 5 — Pending: L2 visual + L3 dynamic++L1-only; a later pass should confirm / quantify:++- **L2 (visual)** — how the list skeleton reads vs the onboarding hero; whether a terminal-state+ task's detail (run-control `null`, gap ⑪) leaves an obvious next action; kanban at many+ columns; the artifacts total-hide (gap ⑪); narrow-width + dark-mode of the create modal.+- **L3 (dynamic)** —+ - Force the list fetch offline → **confirm gap ① live** (permanent skeleton, no retry).+ - Force the detail fetch to 500 → **confirm gap ②** (shows "Task not found", no reload).+ - Force a run start / pause / create to fail → **confirm gap ③** (button snaps back, no toast).+ - Force a schedule / verify save to fail → **confirm gap ④** (value reverts silently).+ - Seed 60+ tasks → **confirm gap ⑤** (only 50 render, sort/group over the partial set).+ - **Measure list CLS/LCP** across skeleton→content and the 50 per-row detail fetches (gap ⑤).diff --git a/.agents/skills/ux-audit/references/example/topic.md b/.agents/skills/ux-audit/references/example/topic.mdnew file mode 100644index 00000000000..13a9bcbe688--- /dev/null+++ b/.agents/skills/ux-audit/references/example/topic.md@@ -0,0 +1,132 @@+# Worked example — Topic (话题) surface audit++A real run of this skill against the desktop **topic view** — the agent chat scoped to a+selected topic: route `/agent/:aid/:topicId` → `src/routes/(main)/agent/index.tsx`+(`Conversation` + `ChatHydration`) inside `(chat)/_layout` (ChatHeader + Portal ++AgentWorkingSidebar). Linear: LOBE-11213 (under LOBE-11145). 2026-07. Use as a template for+the **output shape**, not current-state truth (the code moves; re-verify before citing).++**Layers run:** L1 (static / code) ✅ — everything below. L2 (visual) / L3 (dynamic + CLS)+⏳ not run — see §5. Verdicts about the render (stale-flash on switch, whether the failed+turn's message bubble carries a retry) are L1 inferences here, pending L2/L3.++Surface = the message stream (load → empty/welcome → list), the composer (`MainChatInput` →+`ChatInput`), and the chrome (ChatHeader, Portal, WorkingSidebar). Shares its element with+\[9] chat; this run focuses the **selected-topic** state (a topic whose messages are fetched+from the server, vs the new/empty conversation).++## 1 — Patterns in use++| Pattern (family) | Where | Rating | Note |+| --------------------------------- | ------------------------------------------------------------------------------------ | ----------- | ---------------------------------------------------------------------------- |+| Center Stage (layout) | message stream dominates; composer pinned below (`(chat)/_layout`) | ✅ | textbook |+| Deep-linking (nav) | `/:topicId` ↔ `activeTopicId`, `?thread=` ↔ `activeThreadId` (`ChatHydration:32-85`) | ✅ **亮点** | two-way URL↔store sync, replace-history — see §2 |+| Escape Hatch (nav) | ChatHeader topic actions (rename / export / delete), share, panel toggle | ✅ | full lifecycle on the header |+| Overview + Detail (data) | message → Portal (file / artifact / doc / thread), WorkingSidebar | ✅ | preserves surface contract (panel, not navigate) |+| Cards / Virtualized list (data) | `VirtualizedList` (react-virtuoso) over `displayMessageIds` (`ChatList:196`) | ✅ **亮点** | scales to long conversations — see §2 |+| Skeleton loading (feedback) | `SkeletonList` while `!messagesInit` (`ChatList:174`) | ⚠️ | **no terminal failure path** — see gap ① |+| Empty-state as onboarding | `AgentHome` welcome (agent info + opening questions + recents) (`ChatList:178`) | ✅ | real page; but same page for new-topic vs 0-msg (gap ③) |+| Draft safety (input / edit) | `useChatInputDraft` → `draftStorage` localStorage, **per-topic key** | ✅ **亮点** | durable, per-topic, restore/flush/clear — see §2, star |+| Same-page error (feedback) | send error → closable `Alert` (`ChatInput:392-400`) | ✅ **亮点** | surfaced, not silent (contrast home composer) — but no in-place retry, gap ② |+| Autocompletion (input) | `@`-mention, slash menu, local-folder mention (desktop) (`Conversation/index.tsx`) | ✅ | rich input affordances |+| Progress / Cancelability (action) | streaming shows a **Stop** button (`ChatInput:376-377`, `onStop=stopGenerating`) | ✅ | long-running op is abortable (generation-class norm) |+| Capability guardrail (feedback) | `AgentConfigError` above the composer (`MainChatInput:46`) | ✅ | reactive config warning |++**Read:** the conversation surface is **mature** — the standouts below are as load-bearing as+the one gap. The only real weakness is the classic one for this codebase: **Feedback+(failure states)** — the message stream can't fail visibly.++## 2 — Strengths / good cases (don't regress)++The behaviors this surface gets **right** — the "don't regress" list for the next refactor,+and the ✅ half of the 回灌 loop. Each is evidence-backed.++- **✅ 亮点 — Durable, per-topic composer draft (the star).** The composer backs each topic's+ in-progress input to `localStorage`, **keyed per context** (`draftKey` = agent+topic+thread):+ debounced-saves on every keystroke and flushes on blur (`InputEditor/index.tsx:570,567`),+ restores into an empty editor on mount (`useChatInputDraft.ts:32-43`), flushes any pending+ save on unmount (`:30`), and **removes** the draft on send (`ChatInput/store/action.ts:85`).+ Storage caps at 50 drafts with LRU eviction (`draftStorage.ts:108-126`). _Load-bearing:_+ a reload / crash / topic-switch on the app's highest-traffic input **never vaporizes a typed+ message**, and drafts don't bleed across topics. This is the **opposite** of the in-memory+ home-composer the `ux` Edit §2.1 ❌ still cites — landed as the Edit §2.1 **✅ example**+ (`→ landed as ux Edit §2.1 ✅`).+- **✅ 亮点 — Send failure is surfaced, not silent.** A failed send renders a closable `Alert`+ carrying the error (`ChatInput/index.tsx:392-400`, `onClose=clearSendMessageError`).+ _Load-bearing:_ unlike the fire-and-forget `console.error` paths the `ux` Act §3.1 ❌ examples+ call out (Pages sidebar, Task job-control), the user is told the send failed. (The gap is+ only that the alert lacks an in-place **Retry** — see gap ②; the surfacing itself is right.)+- **✅ 亮点 — Streaming is abortable.** A running generation shows a **Stop** button wired to+ `stopGenerating` (`ChatInput:376-377`), not just a spinner. _Load-bearing:_ satisfies the+ generation-class "Cancel while it runs" norm (`ux` Act §3.1) on the core surface.+- **✅ Deep-linking is a clean two-way sync.** `ChatHydration` mirrors `:topicId`/`?thread=`+ → store via `useLayoutEffect` and store → URL via `subscribe` with `replace` history+ (`ChatHydration/index.tsx:32-85`). _Load-bearing:_ a shared/bookmarked topic URL restores+ exact state; navigation never desyncs from what's rendered.+- **✅ Message list is virtualized.** `VirtualizedList` (react-virtuoso) renders only visible+ rows over `displayMessageIds` (`ChatList:196-201`). _Load-bearing:_ a 1k-message topic stays+ responsive — the Read §1.2 "designed to scale" norm.++## 3 — Experience gaps (ranked)++**① Message stream has no terminal failure path — permanent skeleton on fetch error — ux+Feedback §4.2 / Read §1.1** 🔴 The message list gates its render on `messagesInit`+(`ChatList/index.tsx:174` → `if (!messagesInit && !isNewConversation) return <SkeletonList/>`),+which is a **success-only / data-presence-disguised init flag**:++- `useFetchMessages` registers **`onData` only, no `onError`** in both the chat store+ (`store/chat/slices/message/actions/query.ts:216-232`) and the conversation store+ (`features/Conversation/store/slices/data/action.ts:211-266`); `messagesInit` is set `true`+ **only** inside the success `onData` (`data/action.ts:258`), or via `StoreUpdater` from+ `hasInitMessages = !!messages` (`ConversationArea.tsx:95`, `StoreUpdater.tsx:73`) —+ dbMessagesMap presence, written only on success.+- The SWR object's `error` is **discarded at the call site**: `ChatList:97` keeps+ `messagesSWR` but line 157 reads only `.isValidating`; there is **no error branch** in the+ render (`174` skeleton / `178` welcome / `194` list).++⇒ When `messageService.getMessages()` errors (500 / network / auth) for a selected topic,+`messagesInit` never flips → **`SkeletonList` renders forever**, no reason, no **Reload/Retry**+— on the product's **highest-traffic surface**. Textbook §4.2 success-only-init-flag trap+(same shape already cited for Task list / Eval / Memory / generation). → **LOBE-11222**.++**② Send-error Alert has no in-place retry — ux Act §3.1 / Feedback §4.2** 🟡 The failed-send+`Alert` (§2) is closable but carries **no Retry / resend**; the editor was already cleared on+send (`ChatInput:356`). Recovery presumably lives on the failed turn's message bubble+(regenerate) — **pending L2** to confirm that bubble exists and carries a retry; if it doesn't,+this rises to 🟠.++**③ Empty-topic and new-conversation share one welcome — ux Read §1.1 (minor)** 🟡 Both "new+conversation" (`isNewConversation`, no topicId) and "loaded topic with 0 messages"+(`displayMessageIds.length === 0`) render the same `AgentHome` welcome (`ChatList:172,178`). A+genuinely-empty _existing_ topic reads identically to a brand-new one. Low impact, noted for+completeness.++## 4 — Skill feedback++- **New ✅ example landed (good-case 回灌):** the durable per-topic draft (§2 star) → added as+ the **✅ example** beside `ux` **Edit §2.1** (`references/edit.md`), the positive counterpart+ to the home-composer ❌ that rule already carries. This is the ✅ half of the loop.+- **New ❌ example landed (gap 回灌):** gap ① → added as a flagship **❌ example** under `ux`+ **Feedback §4.2** (`references/feedback.md`) — the same success-only-init-flag /+ data-presence-disguised (`messagesInit`) permanent-skeleton, now on the **core chat message+ stream**. Quick-review line already exists; no new line needed.+- **Validated existing rules (instances, not landed):** send-error-surfaced (§2) is a ✅+ instance of Act §3.1's "surface failure"; streaming Stop is a ✅ instance of Act §3.1's+ Cancel-while-running.+- **No new generalizable _rule_.** Every gap maps to an existing checklist item (§4.2, Act+ §3.1). Per the skill's close rule, stated explicitly: this run sharpened both halves of two+ existing items rather than adding a new one.+- **Stale-example note:** the Edit §2.1 **home-composer ❌** may now be out of date if home+ shares this same `ChatInput`/`draftStorage` path — flagged to verify in a separate pass, not+ touched here.++## 5 — Pending: L2 visual + L3 dynamic++- **L2 (visual)** — confirm the send button truly reads as the single dominant control;+ confirm the failed-turn message bubble renders a visible **retry** (settles gap ②); check+ whether switching topics shows a stale-message flash before the new topic's skeleton/data+ (the `dbMessagesMap[newKey]` swap) — an L2/L3 verdict, not an L1 one.+- **L3 (dynamic)** —+ - Force `getMessages` to error and **confirm gap ① live** (permanent skeleton, no retry).+ - Drive a send that fails mid-stream to confirm gap ②'s recovery path end-to-end.+ - Measure conversation CLS across the skeleton→messages swap and the streaming append.diff --git a/.agents/skills/ux-audit/references/layer-1-static.md b/.agents/skills/ux-audit/references/layer-1-static.mdnew file mode 100644index 00000000000..6aad00c6af1--- /dev/null+++ b/.agents/skills/ux-audit/references/layer-1-static.md@@ -0,0 +1,68 @@+# Layer 1 — Static audit (read the code)++The fast, offline baseline. Read the route + feature code and decide, for each block,+whether the states and patterns a good surface needs **exist in the code**. Run this on+**every** audit; it's cheap and gives complete structural coverage.++Part of the **ux-audit** skill — see [`../SKILL.md`](../SKILL.md). Benchmark:+[`pattern-catalog.md`](pattern-catalog.md) + the [`ux`](../../ux/SKILL.md) checklists.++## What L1 can and cannot conclude++- **Can**: a data branch is missing (no `error` case), an init flag is gated on success+ only, a draft lives in an in-memory store with no `persist`, a pattern is absent, a fetch+ has no retry, an action has no in-progress path.+- **Cannot** (defer to L2/L3): whether the dominant control on screen _is_ the primary+ action, whether the empty state _reads_ as a real page, spacing / contrast / truncation,+ responsive behavior, and anything with a number (CLS/LCP). **Never tick a visual verdict+ from a `variant` prop** — mark it "pending L2".+- **Cannot** (needs the surface-class benchmark, see SKILL.md): an **entirely-absent+ capability** the surface should carry by domain convention — there's no code to read, so+ L1 is blind to it. Bring the expected-capability list from the surface-class / competitor+ pass _into_ L1 and check each item as present / missing, or the read only ever grades the+ paths that already exist. ❌ missed once: OAuth consent with **no switch-account** affordance.++## Procedure++### 1 — Scope & map the surface++Pin down the route (`src/routes/**`) and the feature components (`src/features/**`) it+delegates to. Enumerate the blocks the user sees, top to bottom, plus the chrome (nav,+header, sidebar). An **Explore** agent is good for breadth — ask it to return the component+tree, and for each block: the data-fetching mechanism and which of empty / loading / error /+retry exist or are **missing**, with `file:line`. Re-read the 2–3 files behind your top+findings yourself.++### 2 — Inventory patterns in use++Walk [`pattern-catalog.md`](pattern-catalog.md) family by family. For each block, tag the+Tidwell pattern(s) it implements and rate: **✅ solid** / **⚠️ partial-or-misused** / **—+absent-but-expected**. Output a table: `Pattern | Where (block + file) | rating | note`.+This also surfaces missing patterns (a feed with no _Update Indicator_).++### 3 — Audit states against the ux checklists++For each block, walk the relevant [`ux`](../../ux/SKILL.md) module and record each gap as+**present / missing / misleading** with `file:line`. High-yield checks, most-common-first:++- **Loading can fail** (Feedback §4.2) — every fetch has a terminal failure + retry? Watch+ for an init flag set _only_ on success → permanent skeleton on error.+- **Empty vs failed vs not-loaded** (Read §1.1) — variants distinguished, or does a failed+ load masquerade as "nothing here"?+- **Draft safety** (Edit §2.1) — typed input persisted across reload, or in-memory only?+- **Forward momentum & action states** (Act §3.1) — confirm → in-progress (locked) →+ done/error present in code?+- **Live / polling streams** (Read §1.7) — new-item signal, manual refresh, no reorder.+- **Closed-loop / cross-surface entry points** (Grow §5.3) — does this surface lead the user+ onward to the data / management area of whatever it configures, or does it dead-end? A+ config-only pane (a toggle with no link to the thing it governs), or one that only _promises_+ the destination in copy, is a gap L1 misses unless you ask it explicitly — the link that+ should exist has no `file:line`. Ask it on **every** surface, including the small "just a+ form" ones; that's where it hides.+- **Pinned actions / draft scope / etc.** as the surface warrants.++### 4 — Rank & record++Rank by the shared severity rubric (SKILL.md). Feed the patterns table (step 2) and the+gap list (step 3) into the shared output shape. Tag any verdict you couldn't reach from+code as **"pending L2/L3"** so the next layer knows to confirm it.diff --git a/.agents/skills/ux-audit/references/layer-2-visual.md b/.agents/skills/ux-audit/references/layer-2-visual.mdnew file mode 100644index 00000000000..3476bc162fc--- /dev/null+++ b/.agents/skills/ux-audit/references/layer-2-visual.md@@ -0,0 +1,53 @@+# Layer 2 — Visual audit (screenshots of the rendered surface)++L1 proves what's in the code; **L2 judges what the user actually sees.** Many verdicts —+visual hierarchy, spacing, truncation, whether an empty state reads as a real page — can+only be reached from a render. Add this layer whenever findings are about layout,+hierarchy, rendered states, or responsive behavior.++Part of the **ux-audit** skill — see [`../SKILL.md`](../SKILL.md).++> **This is the layer that fixes the recurring trap:** don't conclude "one primary button"+> or "empty is a real page" from a `variant` prop. On the render, confirm the dominant+> control _is_ the primary action, and the empty body _is_ a purpose-built page.++## Getting the screenshots++- **User-supplied** — the fastest anchor; a screenshot pasted into the chat is enough for a+ first pass. Ask for the specific state/viewport you're missing.+- **Captured via agent-testing** — `agent-browser --cdp 9222 screenshot` renders from the+ renderer (works headless under `xvfb-run`). See the **agent-testing** skill for launch ++ auth (its Step 0). Capture the states you need; forcing hard-to-reach states (error,+ empty) is an L3 job (see [layer-3-dynamic.md](layer-3-dynamic.md)).+- **Verify before citing.** Open every screenshot with the **Read tool** and confirm it+ shows what you claim _before_ writing a finding — same rule agent-testing uses for+ evidence. A cited screenshot you didn't look at is a vibe, not evidence.++**Capture the set, not one frame:** the default state, plus (where reachable) empty /+loading / error, at desktop + one narrow / mobile width, and dark + light if both ship.++## What to check on the render++- **Visual hierarchy & dominant control** — is the single most prominent control the+ primary action? Is there exactly one? (Read §3.2, but as _seen_.)+- **Layout & rhythm** — spacing consistency, alignment, grouping; does the eye land where+ intent wants it (Center Stage)?+- **Legibility & contrast** — text/background contrast, small-text density, icon-only+ controls without labels.+- **Truncation / overflow / wrapping** — long titles, big numbers, long lists; does content+ clip, push layout, or wrap badly? (pairs with Read §1.5 number formatting.)+- **Rendered data states** — does the empty state actually look like a purpose-built page+ with a CTA? Is loading a chrome-preserving skeleton or a bare block? Is the error state+ present and clear? (Read §1.1, Feedback §4.1.)+- **Selection visibility** — is the active item visible, or off-screen below a fold? (Read+ §1.3.)+- **Responsive** — at a narrow width, does anything collapse, overlap, or lose an action?+- **CLS — qualitative only here.** A before/after pair (or a GIF) can _show_ the layout+ jump, but **quantifying** it needs L3 instrumentation. Flag the symptom; hand the number+ to L3.++## Output contribution++Per finding: the checklist item / catalog pattern, the **screenshot** (path or the+user-supplied image) as evidence, and the remedy. Mark anything time-based (a layout jump,+streaming) as **"needs L3 (GIF / metric)"**.diff --git a/.agents/skills/ux-audit/references/layer-3-dynamic.md b/.agents/skills/ux-audit/references/layer-3-dynamic.mdnew file mode 100644index 00000000000..7eb0b06f893--- /dev/null+++ b/.agents/skills/ux-audit/references/layer-3-dynamic.md@@ -0,0 +1,97 @@+# Layer 3 — Dynamic audit (automated user journey + instrumentation)++L1 reads code, L2 looks at a render; **L3 drives the product like a user and measures it.**+It's the only layer that reaches states that exist only at runtime (in-progress, forced+error / empty), that verifies a **journey** stitches step-to-step, and that produces+**numbers** — CLS, LCP, INP, long-tasks — which no screenshot or code read can give.++This layer runs on the **agent-testing** framework. Read that skill first; L3 assumes its+**Step 0 (env + auth)** is already green. Everything below is CDP-based, so it also works+headless in cloud under `xvfb-run`.++Part of the **ux-audit** skill — see [`../SKILL.md`](../SKILL.md).++## The driver: agent-browser over CDP++Connect to the running app (Electron or web) and use:++| Command | Use in an audit |+| ------------------------------------------ | ------------------------------------------------------------------------------ |+| `agent-browser --cdp 9222 snapshot -i` | accessibility/DOM tree + interactive elements (find controls, assert presence) |+| `agent-browser --cdp 9222 screenshot` | render evidence at each step (feeds L2 checks) |+| `agent-browser --cdp 9222 eval "<js>"` | **instrument** — inject web-vitals, read state, force conditions |+| `type` / `click` (see agent-testing `ui/`) | drive the journey |+| `scripts/record-gif.sh` | time-based evidence (streaming, a layout jump) |++> **Constraint:** resizing the Electron window triggers a full SPA reload — do **responsive+> / multi-viewport** sweeps against **web Chrome over CDP**, not by resizing Electron.++## Journey template++Define the surface's **User Journey** as ordered steps, then walk it, capturing evidence at+each and asserting forward momentum. Example (home → task):++1. Land on the surface → `snapshot` + `screenshot`; assert the primary control is focusable.+2. Perform the core action (type + send) → capture the **in-progress** state (is it shown?+ locked?), then the **done** state; assert it **leads forward** (does step 2 surface the+ entry to step 3?). _(ux Act §3.1)_+3. Force the **error** path (below) → assert a failure + **retry** appears, input preserved.+ _(ux §4.2 / §2.1)_+4. Force the **empty** path → assert a purpose-built empty state, not a blank / stuck one.++Record per step: `snapshot`, `screenshot`, and pass/fail against the expected state. A step+with no forward path, a dead spinner, or a wiped input is a finding.++## State-forcing cookbook++The states L1/L2 can't reach, made reachable:++- **Error / offline** — CDP `Network.emulateNetworkConditions {offline:true}` (or block the+ specific request route), then trigger the fetch; watch for the failure+retry UI. This is+ how you catch the "permanent skeleton" (ux §4.2) live.+- **Slow / hold-loading** — CDP throttle (slow 3G) to freeze the skeleton long enough to+ screenshot and judge (L2) — and to see if it ever times out.+- **Empty** — a fresh / empty account, or clear the relevant store/table, to render the+ first-run empty state.+- **Capability-gated** — select a model lacking the capability, assert the soft warning+ appears (ux §4.2 capability) and clears on switching back.++## Performance & CLS instrumentation++Screenshots can't quantify jank; inject observers via `eval`. Inject **before** navigating /+triggering, then read the accumulated value after the surface settles.++**Cumulative Layout Shift** (the one L1/L2 can't measure):++```js+// 1) inject before load/trigger: agent-browser --cdp 9222 eval "<this>"+window.__cls = 0;+new PerformanceObserver((l) => {+ for (const e of l.getEntries()) if (!e.hadRecentInput) window.__cls += e.value;+}).observe({ type: 'layout-shift', buffered: true });+// 2) after the surface settles: agent-browser --cdp 9222 eval "window.__cls"+```++Same shape for the rest: `observe({ type: 'largest-contentful-paint' })` → LCP;+`observe({ type: 'longtask' })` → main-thread blocking; INP via the `web-vitals` lib if+present. Read them after the loading→content swap, which is exactly when skeleton-height+mismatches (ux Feedback §4.1) show up.++**Thresholds** (Core Web Vitals): CLS ≤ 0.1 good · ≤ 0.25 needs-work · else poor. LCP ≤+2.5s good. INP ≤ 200ms good. Report the number **and** the verdict, and point at the block+that shifted.++## Honest limits++- Needs a running env + green auth (agent-testing Step 0); slower and more **flaky** than+ L1/L2 — re-run a failed step before trusting it.+- Not every state is easy to force (some error paths need route-level mocking / fixtures).+- Screenshots captured here still need an L2 vision pass (Read the image before citing).+- Keep L3 for what only it can do — journeys, forced states, and metrics. Don't re-derive+ L1/L2 findings here.++## Output contribution++Per journey: step-by-step pass/fail with `snapshot`/`screenshot` evidence; forced-state+findings (error/empty/loading) that L1 only inferred, now **confirmed live**; and a perf+table (CLS / LCP / INP / long-task with verdicts). Feed all into the shared report shape.diff --git a/.agents/skills/ux/SKILL.md b/.agents/skills/ux/SKILL.mdindex 0be036a2b5a..292e17c2a56 100644--- a/.agents/skills/ux/SKILL.md+++ b/.agents/skills/ux/SKILL.md@@ -86,13 +86,17 @@ The one-screen scan. Each line links back to a module above for the full rule +**Read — viewing data & lists** ([read.md](references/read.md))-- [ ] Empty / loading / error states are all designed; empty is a real page with a CTA. Always-rendered chrome (toolbar/header) still gets a body empty state.+- [ ] Empty / loading / error states are all designed; empty is a real page with a CTA. Always-rendered chrome (toolbar/header) still gets a body empty state. If the `Empty` component ships a `search`/no-match variant, **wire it** — don't render `<Empty/>` bare so a zero-result search shows the first-run onboarding.+- [ ] Error is checked before the empty branch — a failed fetch never renders as empty (read `error`, don't coerce `data ?? [] → Empty`); a detail page reads `error` before falling to `NotFound` (failed-to-load ≠ deleted/404).- [ ] List designed across 1 → 10k rows (virtual scroll / pagination / batch as needed).+- [ ] Search / filter over a paginated list queries the full set server-side, not just the loaded page (no false "no results" for unfetched rows).- [ ] Capped/scrollable/virtualized list scrolls the restored active item into view on mount (`block: 'nearest'`, re-run after async rows mount).- [ ] Pickers show all valid targets (default/inbox included); empty = truly none.- [ ] Large numbers roll the unit at each 1000× (K→M→B→T), never a coefficient ≥ 1000; use the shared `formatUsageValue` / `formatShortenNumber`.- [ ] Multi-tab/view surface lands on the tab the entry intent implies (and falls back to a populated view, decided from resolved state); a manual pick sticks.-- [ ] Live/polling feed signals new items + offers manual refresh, doesn't reorder under the user, and shows a failed refresh distinctly (not as empty).+- [ ] Live/polling feed signals new items + offers manual refresh, doesn't reorder under the user, and shows a failed refresh distinctly (not as empty). A bulk/destructive control derived from the live-status map (close-idle / clear-inactive) gates on the query's loaded/error state — "unknown/errored" is ineligible, never treated as the inactive value. Conditional polling starts from **reactive state** (`shouldPoll` → `refreshInterval`), not a function-form `refreshInterval` that never schedules a first timer when its initial value is `0`.+- [ ] A surface with many navigable entries (a big settings area, a long list) offers search / filter / jump, not browse-only — named as a class norm so an absent box is caught.+- [ ] Marketplace / registry browse cards carry owned/installed state on the tile (not only on the detail) and trust/verified badges via one card contract, consistent across sibling registries; contribute leads to an in-app submit, not an external repo.**Edit — entering & changing content** ([edit.md](references/edit.md))@@ -102,21 +106,36 @@ The one-screen scan. Each line links back to a module above for the full rule +**Act — operations, flows & buttons** ([act.md](references/act.md))- [ ] Action leads the user forward; success offers a primary "go to result".+- [ ] Terminal status screen (success / error `Result`) carries an action: error → escape hatch (retry / back), success → close / go-to-result; no bare `Result` without `extra`, and "auto-closing in Ns" copy only when the close can actually fire.+- [ ] A result that changes the next step lands in a persistent state (screen / inline), not just a transient toast; "link sent" names the destination + offers resend, failures keep context + offer retry.- [ ] Bulk action has a single-item entry (and vice versa).- [ ] Async/bulk/irreversible action: confirm → in-progress (locked) → done/error.+- [ ] A long-running / costly async op (generation / export / large upload) offers **Cancel while it runs** (aborts the work, not just delete-after-the-fact) and keeps an in-place **Retry** on error — named as a generation-class norm so an absent Cancel is caught.+- [ ] Optimistic create / rename / duplicate surfaces failure (caller catches + toasts); never a silent rollback.+- [ ] Job-control (run / pause / stop / retry) surfaces start/stop failure — a `catch` that only `console.error`s + optimistic-status rollback reads as a dead button; toast at the store-action boundary so every trigger inherits it.+- [ ] Cross-surface coherence: an entity shown in both a list and its detail stays in sync on edit — shared normalized store or invalidate the sibling (not a gated field subset); a per-surface review misses this seam, so check it explicitly.- [ ] Scrollable content + actions/status → pin them in a fixed footer/header, not inside the scroll area (verify at the overflowing state).-- [ ] Exactly one primary button per surface.-- [ ] Listed entities have their full lifecycle (not display-only); ops match source (built-in / installed / custom).+- [ ] Exactly one primary button per surface — and it's the visually dominant control (back / cancel / secondary never out-weighs it; verify on the rendered screen, not from `variant`).+- [ ] Listed entities have their full lifecycle (not display-only); ops match source (built-in / installed / custom). A protective marker (pin / keep / lock) is honored by every removal path (bulk close, clear-idle, auto-cleanup) — a marker that gates nothing is a decorative no-op.+- [ ] An action that commits as a specific identity (OAuth consent, send-as, publish-to) shows the identity **and** a switch-account / re-auth path — never locks the user to the currently-logged-in one.+- [ ] Unrecoverable / wide-blast action (clear-all, delete-account, wipe) needs an explicit gesture (type-to-confirm / checkbox), not one-click danger; and reports partial failure, never silent half-completion.+- [ ] A minted secret (API key / token) is shown in full once at creation (persistent reveal + Copy), hashed at rest, masked thereafter — never re-revealed from a list.+- [ ] A store of data _about the user_ (AI memory / personalization / inferred profile) offers correct-or-mark-wrong (not just blind-edit/delete), retain-without-use (per-item pause + global off-switch), export/download, and undo/soft-delete — named as class norms so an absent one is caught.**Feedback — loading & system response** ([feedback.md](references/feedback.md))- [ ] No antd `Spin`; use `NeuralNetworkLoading` / project loaders.-- [ ] Every loading state can fail: on error or timeout, show a failed state with a Reload/Retry action — never an infinite spinner.+- [ ] Every loading state can fail: on error or timeout, show a failed state with a Reload/Retry action — never an infinite spinner. In an auto-dismissing surface (upload dock / progress toast), the countdown clears **success only** — a failed item persists with Retry.+- [ ] A compound gate waiting on a secondary/dependent fetch gates on its **in-flight** flag and releases on settled (data / resolved-`null` / error) — never on the dependency being present in a map, or an absent-by-design dependency hangs it forever.+- [ ] An awaited write that gates navigation/advance resets its busy flag in `finally` + offers retry — a failed write never permanently disables the forward/Back control.+- [ ] Autosave surfaces a save-state (saving → saved → failed with retry), never a silent write; the save-state enum actually includes a `failed` variant (a catch that resets to `idle` is a silent write); one save-feedback convention across a multi-field surface, ideally in the shared form wrapper.- [ ] Capability-gated feature warns (soft, reactive, load-gated) when the model can't deliver it; copy gives the remedy.**Grow — discoverability & progressive disclosure** ([grow.md](references/grow.md))- [ ] Advanced capability is progressively disclosed / discoverable at the moment of need.+- [ ] A config surface for a feature with its own data/management area links to it in-context (close the config → manage loop) — not just a promise in copy.+- [ ] Multi-step flow (>2 steps: wizard/onboarding) shows a step/progress indicator (position + total) and keeps non-essential steps skippable with a visible escape hatch.## Related skillsdiff --git a/.agents/skills/ux/references/act.md b/.agents/skills/ux/references/act.mdindex ed06a79370e..3c70d9fd74a 100644--- a/.agents/skills/ux/references/act.md+++ b/.agents/skills/ux/references/act.md@@ -18,23 +18,132 @@ a confirm step stating exactly what happens → an in-progress view with **dismilocked** → a done (or error) view in the same modal. Never fire-and-forget with only atoast; never leave a dead spinner.+A **long-running or costly** async op — an AI generation (image / video), an export, a+large upload, a batch job that runs for seconds-to-minutes and often bills tokens — owes one+more affordance: a **Cancel / Stop while it runs**. "In-progress (locked)" means the user+can't _dismiss_ the surface, not that they can't _abort the work_. The trap is shipping only+a **delete-after-the-fact** (remove the finished/failed item) and calling that cancellation —+it isn't: the job still runs, still costs, and the user watches a spinner they can't stop.+Wire a real cancel (abort the request / signal the backend) into the in-progress state, and+keep an **in-place Retry** on the error state so recovery isn't "delete it and rebuild the+inputs by hand". Absent cancel is a class norm miss on any generation surface (Runway / Kling+/ Sora / Midjourney all cancel a queued or running job).++An **optimistic mutation** — a create / rename / duplicate that shows its result+immediately, before the server confirms — owes the same done/error honesty. If the write+fails, the caller must **catch and tell the user**; a store action fired without a `.catch`+(or whose only failure handling is a silent rollback + `console.error`) makes the failure+invisible — the user watches their new item appear and then vanish with no idea why, worse+than a plain error because the optimistic UI first _promised_ success. Optimistic ≠+fire-and-forget: the rollback still needs a toast.++The same rule governs **job-control** actions on an async-run surface — **run / pause / stop /+retry** a task, a build, a deployment. These optimistically flip a status (`idle → running`,+`running → paused`) before the server confirms, so a `catch` that only `console.error`s (or a+caller that `await`s in `try/finally` with **no catch**) lets a failed start / stop **silently+snap the button back** to its previous state — indistinguishable from the control doing nothing.+A run that fails to launch must say so. Toast at the store-action boundary so every trigger+(header button, context menu, drag) inherits the feedback instead of each re-forgetting it.++And an optimistic edit owes **cross-surface coherence**: when the same entity is shown in more+than one place (a **list row** and its **detail view**, a sidebar item and its open editor), a+successful mutation must reach **every** copy, not just the surface you edited from. The trap is+holding the list and the detail in **two separate un-normalized caches** and patching only the+active one — the detail updates, the list row stays stale, and the two disagree on screen when+they're mounted together (split view, portal) or when the other is served from cache on+back-navigation. Either share one **normalized store** (patch once, both read it) or invalidate+the sibling on every successful write — and audit that the invalidation isn't gated to only+_some_ fields. This is a seam **between** surfaces, so a per-surface review misses it by+construction: check it explicitly whenever an entity is editable from one view and listed in+another.++A **terminal status screen** (a success / error result page — often an `antd Result`) is+still an action surface: it must carry a way onward. An **error** terminal needs an escape+hatch (retry / back to sign-in / home); a **success** terminal needs a close / go-to-result+affordance. A bare `Result` with no `extra` action strands the user — worst when the page+assumed a popup context (`window.opener`) that isn't there. And any **"auto-closing in Ns"**+copy must be gated on the close actually being able to fire — a countdown that never+triggers is a lie the user waits on.+> ✅ After moving topics: primary = "Go to «target»", secondary = "Done".+> ❌ OAuth terminal screens render an `antd Result` with **no `extra`**: the social-callback+> **error** state has no button (stranded when there's no `window.opener`); the success+> callback shows "Auto-closing in 3s…" that never fires when `window.opener` is null; the+> consent `ClientError` (409 / 400 / network) offers no retry or back-to-sign-in+> (`OAuthCallback/Social.tsx`, `OAuthCallback/Success.tsx`, `OAuthConsent/ClientError.tsx`).+> ✅ Mirror `MarketAuthCallback`: an `extra` **Close** button on the error state, a real+> loading / success / error machine, countdown copy only on the path that auto-closes.+> ❌ The Pages sidebar fires `createNewPage` / `renamePage` / `duplicatePage` as+> fire-and-forget store actions; on failure the store rolls the optimistic item back (or+> only `console.error`s) with **no toast**, so create / rename / duplicate all fail+> invisibly — the new page flashes in and disappears (`AddButton.tsx`,+> `PageLayout/Body/List/Item/Editing.tsx`, `Item/useDropdownMenu.tsx`). ✅ The same editor's+> **Header** duplicate does it right: `try/await/catch` with a success + error `message`.+> ❌ The Task workspace's **job-control & create** actions swallow failure: `runTask` catches and+> only `console.error`s (`store/task/slices/lifecycle/action.ts:49-52`) while its callers+> `handleRunOrPause` / `handleRunNow` `await` in `try/finally` with no catch+> (`TaskDetailRunPauseAction.tsx:60-67,84-91`), so a failed run rolls the optimistic+> `status:'running'` back and the button **silently snaps to "Run"**; `createTask` and the+> context-menu status/run paths (`void updateTaskStatus(...)`, `useTaskItemContextMenu.tsx:114`)+> are the same shape. ✅ The same feature's **run-all** flow (`TaskSubtasks.tsx:204-255`) is the+> model: preview → locked confirm → `partialFailure` vs `kickedOff` toasts + `message.error` on+> planning failure.+> ❌ The **create / generation** surfaces (视频 / 图像) ship **no cancel** for a running+> generation — the only way to stop a minutes-long, token-billing job is to **delete the+> batch** (no `cancel`/`abort` action exists in `store/{video,image}`), and the error item has+> **no in-place Retry** (recovery is "Reuse Settings → Generate again" by hand). Same surfaces:+> `handleCopyPrompt` / `handleCopyError` `message.error` on failure, but the sibling+> `handleDelete` / `handleDeleteBatch` / `handleDownload` **only `console.error`**+> (`video/…/GenerationFeed/BatchItem.tsx:81,113,129`), and image's `handleDownloadImage` has+> **no try/catch at all** (`image/…/GenerationItem/index.tsx`) — a failed download of a large+> video is a dead button with zero feedback while the copy buttons next to it toast. ✅ Add a+> Cancel to the in-progress state + a Retry to the error state; toast every user-triggered+> action's failure, not just the copy ones.+> ❌ **Cross-surface stale**: the same feature keeps the list in a `tasks` array and the detail in+> a `taskDetailMap` (two un-normalized copies); a detail-side `updateTask` patches only the map and+> refreshes the list **only when assignee / parent changed** (`store/task/slices/detail/action.ts:295-297`),+> so editing a task's **title / priority / model** from the detail leaves the list row showing the+> old value — visible when list + detail are mounted together (Chat portal) or on cached+> back-navigation (`revalidateOnFocus:false`). ✅ Share one normalized map, or invalidate the list+> on every successful field write (not a gated subset).**Checklist**- [ ] Action leads forward; doesn't just stop. _(Meaningful)_+- [ ] Optimistic mutation (create / rename / duplicate) surfaces failure — the caller catches and toasts; a silent rollback that just removes the item is fire-and-forget. _(Meaningful・Certainty)_+- [ ] Job-control (run / pause / stop / retry) surfaces start/stop failure — a `catch` that only `console.error`s + rolls the optimistic status back makes a failed run read as a dead button; toast at the store-action boundary so every trigger inherits it. _(Meaningful・Certainty)_+- [ ] Cross-surface coherence: an entity shown in both a list and its detail stays in sync — a successful edit reaches every copy (shared normalized store, or invalidate the sibling), not a gated subset of fields; check this seam explicitly (a per-surface review misses it). _(Certainty・Meaningful)_- [ ] Success = primary "go to result", secondary "Done". _(Meaningful・Natural)_+- [ ] Terminal status screen (success / error `Result`) carries an action: error → escape hatch (retry / back to sign-in), success → close / go-to-result; no bare `Result` without `extra`. _(Meaningful・Certainty)_+- [ ] "Auto-closing / redirecting in Ns" copy only when the close / redirect can actually fire (e.g. `window.opener` present); otherwise show a manual action. _(Certainty)_- [ ] Bulk ⇄ single-item parity (toolbar action also on the item, and vice versa). _(Certainty)_- [ ] Bulk / irreversible / async: confirm → in-progress (locked) → done/error, one surface. _(Certainty・Meaningful)_+- [ ] A long-running / costly async op (generation / export / large upload) offers **Cancel while it runs** (abort the work), not just delete-after-the-fact, and keeps an **in-place Retry** on the error state — named as a generation-class norm so an absent Cancel is caught. _(Meaningful・Certainty)_-## 3.2 One primary button per surface・Certainty+## 3.2 One primary button, and it's the visually dominant one・CertaintyThe single primary CTA tells the user the core action; everything else is secondary /-tertiary. Never a pile of primary buttons competing for attention.+tertiary. Never a pile of primary buttons competing for attention. Just as important, the+**primary action must be the most prominent element on the surface** — a back / cancel /+secondary action must never carry more visual weight (size, fill, full-width) than the+primary. "Exactly one primary" is not satisfied by merely tinting one button: check the+_rendered_ hierarchy — which control does the eye land on first, and is it the primary+intent? When the biggest button performs a **backward** or secondary action while the real+primary is shrunk into an icon / input-suffix, the weight is inverted and the surface reads+as "the main thing to do here is go back". This is a mechanical-vs-semantic trap (see the+interaction principle): a `variant="filled"` on a tiny control passes a code-level "has a+primary button" check while failing the user.++> ❌ The sign-in **password step**: submit is a tiny `>` chevron tucked inside the+> password input's suffix, while **"返回修改邮箱" (back)** is a full-width `size="large"`+> button — the most prominent affordance on the screen performs the _backward_ action+> (`SignInPasswordStep.tsx`). ✅ Make submit the full-width primary; demote "back" to a+> quiet link / text button.**Checklist**- [ ] Exactly one primary button per surface. _(Certainty)_+- [ ] The primary action is the visually dominant control; back / cancel / secondary never out-weighs it (size / fill / width) — verified on the rendered screen, not from `variant` alone. _(Certainty)_## 3.3 Pin actions & status outside the scroll region・Certainty・Meaningful@@ -72,6 +181,21 @@ explicitly _before_ building. Each item should expose its allowed ops (hover actcontext menu / detail page) with a clear entry point to add/create; an intentionally-absent op is a documented decision, not an oversight.+A **protective marker** on an entity — a pin / keep / lock / "don't auto-clean" toggle —+is a **promise the user relies on**, so it must be honored by **every** removal path: bulk+close, "clear idle / inactive", auto-cleanup, TTL eviction. A marker that only toggles an+icon and gates nothing is a decorative no-op — a "keep this" that keeps nothing — and it's+actively worse when a bulk action (a "close idle") ignores it and closes the very item the+user pinned. Either wire the marker into all removal predicates, or don't ship the+affordance; a half-wired protection is a broken promise.++> ❌ The Fleet board's column **pin** (`AgentColumn` pin icon, titled "keep this column") only+> toggles `pinnedKeys` and highlights the icon — **no path gates on it**: `syncRunningColumns`+> is append-only and `getIdleColumnKeys` never consults pins, so "close idle columns" closes a+> **pinned-but-idle** column, contradicting the store's own "deliberate keep-this marker"+> comment (`Fleet/idleColumns.ts`, `Fleet/store.ts`). ✅ Exclude `pinnedKeys` from every+> removal predicate, or drop the pin.+| Entity class | Add | Edit | Remove || ----------------------------------- | ------- | --------- | ------------------ || Official / built-in (skills, tools) | — | — | ✗ not removable |@@ -84,3 +208,142 @@ absent op is a documented decision, not an oversight.- [ ] Op set matches source: built-in read-only; installed removable; user-created editable + deletable. _(Certainty)_- [ ] Each item exposes its allowed ops + a clear add/create entry point. _(Natural)_- [ ] An intentionally-absent op is documented by design, not an oversight. _(Certainty)_+- [ ] A protective marker (pin / keep / lock) is honored by **every** removal path (bulk close, clear-idle, auto-cleanup) — a marker that gates nothing is a decorative no-op / broken promise. _(Meaningful・Certainty)_++## 3.5 A result that changes the next step needs a persistent state, not just a toast・Meaningful・Certainty++A one-shot toast is an **ephemeral acknowledgement, not a state**. When an async+operation's outcome **changes what the user should do next** — "we emailed you a magic+link / a reset link / a verification email", "sign-in failed, fix your password", "invite+sent, waiting on them" — the result must land in a **persistent surface**: a dedicated+confirmation screen (naming the destination + the next step + a resend / retry), or an+inline message anchored in the flow. A toast that vanishes in \~3s leaves the user staring+at the **unchanged form**, unsure whether anything happened and with no path forward —+especially bad when the next step happens off-app (check your inbox). Keep toasts for+**reversible, no-next-step** acknowledgements ("copied", "saved") where nothing about the+user's next move depends on the message.++> ❌ Sign-in: entering an unregistered-for-password email fires a `message.success`+> ("magic link sent") but **stays on the same email form** with no "check your inbox"+> screen; a wrong password fires a `message.error` toast and leaves the password field with+> no inline error (`SignIn/useSignIn.ts`). ✅ Route to a persistent "We sent a link to+> `[email protected]`" state with resend / change-email; hang the wrong-password error inline on the+> field.++**Checklist**++- [ ] An async result that changes the user's next step lands in a persistent state (dedicated screen or inline), not just a transient toast. _(Meaningful)_+- [ ] "Email / link sent" states name the destination and offer resend / change; failures keep context and offer retry. _(Certainty)_+- [ ] Toast reserved for reversible, no-next-step acknowledgements (copied / saved). _(Natural)_++## 3.6 An identity-bearing action must let the user see _and change_ the acting identity・Certainty・Meaningful++When an action commits **as a specific identity** — authorizing an OAuth app, sending as an+account, publishing to a workspace — showing _which_ identity is not enough; the surface+must also let the user **switch to a different one**. A screen that displays the current+account and offers only Accept / Deny silently assumes the logged-in identity is the right+one. For a user with more than one account this is a real trap: they authorize a third-party+app, or act, **as the wrong identity** and can't tell until after the fact — a trust and+security failure, not a cosmetic one. This is the identity-level form of the Escape Hatch:+the way out isn't "go back", it's "not this account — use another". Mirror the mature+convention (GitHub / Google): _"Signed in as **X** — switch account"_ right next to the+confirm.++> ❌ The OIDC consent / login step shows the current session's avatar + name in a block with+> a single "Continue" primary and **no switch-account / sign-out-and-re-auth** path — once+> you land logged in as X you can only authorize as X (`OAuthConsent/Login.tsx`). ✅ Add a+> "not you? / switch account" affordance that re-authenticates, so the user picks the+> identity they're granting access as.++**Checklist**++- [ ] An action that commits as a specific identity shows the identity **and** a switch-account / re-authenticate path — never lock the user to the currently-logged-in one. _(Certainty・Meaningful)_++## 3.7 Irreversible / high-blast-radius actions need elevated confirmation・Certainty・Meaningful++A plain confirm modal (one danger button) is right for a reversible or scoped delete. It is+**under-protected for an unrecoverable, wide-blast action** — "clear all data", "delete+account", "wipe workspace", "reset everything". Scale the friction to the stakes: for an+action that cannot be undone and destroys a lot, require an **explicit deliberate gesture** —+type the resource name / a confirm token, or tick an "I understand this can't be undone"+checkbox — so it can't fire on a stray click. And because these actions are exactly where a+partial failure is worst, wrap the work in try/catch: a multi-step wipe that rejects halfway+must **report what failed** (not leave half-deleted data behind a silently-cleared modal),+per Feedback §4.2 and §3.1's confirm → in-progress(locked) → done/**error** machine.++> ✅ "Delete account" requires typing the account email before the button enables.+> ❌ Settings **Storage "clear all data"** (agents / files / messages / skills — unrecoverable)+> sits behind a single one-click danger confirm with no type-to-confirm, and `handleClear`+> awaits six store wipes with **no try/catch** (`settings/storage/features/Advanced.tsx`), so a+> partial failure leaves half-deleted data, a still-open modal, and zero feedback.+> ❌ **Memory** (记忆) "Purge all" wipes every layer + persona (`purgeAllMemories`,+> `store/userMemory/slices/base/action.ts`) behind a single one-click danger `confirmModal` with+> **no type-to-confirm** and no undo / soft-delete (`memory/features/ActionBar/PurgeButton.tsx`) —+> the highest-blast-radius control in the area, one stray click from irreversible total loss.++**Checklist**++- [ ] Unrecoverable / wide-blast action requires an explicit deliberate gesture (type-to-confirm / checkbox), not a one-click danger button. _(Certainty)_+- [ ] The destructive run is wrapped so a partial failure is reported (what failed), never silent half-completion. _(Meaningful・Certainty)_++## 3.8 Secrets are revealed once, stored hashed, masked thereafter・Certainty・Meaningful++A surface that mints a **secret** — an API key, a personal access token, a webhook signing+secret — carries a security-shaped class norm every mature product follows (GitHub / OpenAI /+Stripe / AWS): show the **full value exactly once**, at creation, with a prominent Copy and a+"store it now, you won't see it again" warning; store only a **hash** at rest; and forever+after show a **masked prefix** (`lb-abcd…wxyz`), never the plaintext. The failure mode is+inverting this: persisting the secret reversibly and re-revealing it in a list on demand. That+turns every session (and every DB read) into a plaintext-exfiltration path, and — because the+key stays viewable — hides the missing one-time-reveal screen (the create result feels fine+only because the secret is wrongly re-viewable). The one-time reveal is also a §3.5+persistent-result state, not a toast: the user must be able to copy before dismissing.++> ❌ Settings **API Key**: `ApiKeyModel.query()` decrypts and returns the **full plaintext** on+> every list fetch (`packages/database/src/models/apiKey.ts`), the table masks client-side only+> with an eye-toggle that re-reveals at will, and create just closes the modal (result discarded)+> — no one-time reveal. ✅ Hash at rest; return plaintext only from `createApiKey`; list returns+> a masked prefix; on create, show a persistent reveal panel (full key + Copy + warning).++**Checklist**++- [ ] A minted secret is shown in full exactly once at creation (persistent reveal + Copy + "won't see again"), not a toast. _(Meaningful・Certainty)_+- [ ] Secret stored hashed at rest; list / detail return a masked prefix, never re-reveal plaintext. _(Certainty)_++## 3.9 A store of data about the user owes correction, retain-without-use, export & undo・Meaningful・Certainty++A surface that holds **data the product learned about the user** — an AI memory / personalization+store, a profile the system inferred, a "what we know about you" area — carries a **trust-repair ++data-control** class norm that ordinary CRUD lists don't, because the records are _claims about the+person_ and the person is the authority on them. Mature memory / personalization products (ChatGPT+"Manage memories", Gemini personalization, Mem0, Apple/Google privacy dashboards) ship four+capabilities beyond plain display; a code-only read is blind to their absence (no `file:line`), so+name each as an expected capability and check it present / missing:++1. **Correct / mark-wrong**, not just delete — a way to say "this belief is wrong" that survives+ re-extraction, so a corrected fact isn't silently re-learned. A blind free-text overwrite or a+ hard delete is not correction (the same claim comes back).+2. **Retain without use** — pause / exclude a single item (and a global memory off-switch) so the+ user can _stop the system acting on_ a fact without destroying it. If the only lever to stop use+ is delete, the user is forced into data loss.+3. **Export / download** — take the data out (a portability / GDPR-shaped norm for anything storing+ a profile of the user).+4. **Undo / soft-delete** — destructive actions on data-about-the-user offer undo or a recovery+ window; a hard delete of an inferred profile with no recovery is under-protected (pairs with §3.7+ for the wide-blast "purge all").++> ❌ **Memory** (记忆): item menus offer only edit (blind single-field overwrite) + hard delete+> (`memory/**/*Dropdown.tsx`); no "mark wrong / don't remember this", no per-item pause/exclude and+> no global off-switch (a `status` column exists, unused by the UI), no export in the service or UI+> (`services/userMemory`, `crud.ts` = get/update/delete/deleteAll only), and delete / "Purge all"+> are hard with no undo. A user who sees a wrong belief can only blind-overwrite or destroy it —+> and can't stop the AI _using_ a fact without deleting it. ✅ Add mark-wrong (records negative+> feedback + suppresses re-extraction), a per-item pause + global toggle on the `status` column, an+> "Export all", and soft-delete with an undo toast.++**Checklist**++- [ ] A store of data _about the user_ (memory / personalization / inferred profile) offers **correct / mark-wrong**, not just blind-edit or delete — a correction survives re-learning. _(Meaningful)_+- [ ] The user can **retain a fact without the system using it** (per-item pause / exclude + a global off-switch), never forced to delete to stop use. _(Meaningful・Certainty)_+- [ ] The data is **exportable / downloadable** (portability / GDPR norm). _(Meaningful)_+- [ ] Destructive actions on user-data offer **undo / soft-delete** (a recovery window), not hard-delete only. _(Certainty)_diff --git a/.agents/skills/ux/references/edit.md b/.agents/skills/ux/references/edit.mdindex ea2ea71a59e..d4da5cf9dfc 100644--- a/.agents/skills/ux/references/edit.md+++ b/.agents/skills/ux/references/edit.md@@ -22,6 +22,12 @@ in-memory store alone doesn't count.> ❌ The home composer holds its input in an in-memory store (no `persist`), so a reload on> the app's highest-traffic entry point vaporizes a typed task description.+> ✅ The agent chat composer is the model to copy: `useChatInputDraft` backs each topic's input+> to `localStorage` **keyed per context** (`draftKey` = agent+topic+thread), debounced-saves on+> every keystroke and flushes on blur (`ChatInput/InputEditor/index.tsx:570,567`), restores into+> an empty editor on mount (`useChatInputDraft.ts:32-43`), flushes on unmount (`:30`), and+> **removes** the draft on send (`ChatInput/store/action.ts:85`) — durable across reload/crash,+> scoped per topic so drafts never bleed, with 50-entry LRU eviction (`draftStorage.ts:108-126`).**Checklist**diff --git a/.agents/skills/ux/references/feedback.md b/.agents/skills/ux/references/feedback.mdindex 487edfc98d4..4182d4d7931 100644--- a/.agents/skills/ux/references/feedback.md+++ b/.agents/skills/ux/references/feedback.md@@ -23,16 +23,39 @@ modal "in progress" states). Minimise layout shift (CLS): the strongest loadingchanges as little of the final layout as possible. When a surface already knows its shape(card, row, list item), keep the layout elements — container, border, radius, padding,icon — and replace only the text/data with a skeleton sized like the text it stands in-for. A generic full-block / full-card skeleton (or a centred spinner the real content-later pushes aside) is heavier and shifts the layout; an in-place text→skeleton swap is-optimal.+for — matching both its **height** and its **typical width proportion**, so a two-line row+keeps a long title line over a shorter subtitle line rather than two equal full-width bars+(which mis-signal the shape and shift as the real, narrower text lands). A generic+full-block / full-card skeleton (or a centred spinner the real content later pushes aside)+is heavier and shifts the layout; an in-place text→skeleton swap is optimal.++> ✅ The **Fleet** sidebar's `SidebarTaskSkeleton` mirrors the real `SidebarTaskItem` row exactly+> — same 28 px square avatar, two stacked text lines sized like the title/subtitle (70 % / 45 %+> width), same padding (`RunningTaskSidebar.tsx`) — so the load→content swap is in-place with no+> relayout. ❌ A bare full-row block or a centred spinner the real rows later push aside.++An **elapsed / progress readout for a long op** (a generation clock, an upload %, "running for+2:14") has a subtler honesty trap than the skeleton: if it counts from **local component+state**, it silently **resets to 0 on remount** — the item scrolls out of a virtual feed and+back, the route is revisited, a re-render remounts the node — and the user sees a minute-long+job claim it just started. Derive the start from a **persisted timestamp keyed by the job id**+(sessionStorage / store), so the readout recovers the _true_ elapsed on remount rather than+lying; and **clear that key when the job leaves the active state** so a finished / removed job+doesn't leak a stale start onto a later one that reuses the slot.++> ✅ The create-page `ElapsedTime` reads `generation_start_time_{generationId}` from+> sessionStorage on mount (writing it once if absent), so a generation's clock survives a remount+> and shows real duration; on `!isActive` it `removeItem`s the key+> (`image/…/GenerationItem/ElapsedTime.tsx:33-49`). ❌ A `useState(0)` counter started in the+> mount effect — every remount restarts the timer at zero.**Checklist**- [ ] No antd `Spin`; use `NeuralNetworkLoading` / project loaders. _(Natural)_- [ ] Skeleton reuses the loaded component's chrome — content swap, not relayout. _(Certainty・Natural)_-- [ ] Skeleton lines sized like the text they replace (height ≈ real). _(Certainty)_+- [ ] Skeleton lines match the real text's **height and typical width proportion** (long title line over a shorter subtitle, not equal full-width bars). _(Certainty)_- [ ] Known-shape surface not downgraded to a bare block / spinner. _(Natural)_+- [ ] A long-op elapsed / progress readout derives from a **persisted start timestamp keyed by job id** (survives remount, shows true duration) and clears the key when the job ends — never a local counter that resets to 0 on remount. _(Certainty・Natural)_## 4.2 Loading must be able to fail — timeout → error + retry・Certainty・Meaningful@@ -54,19 +77,125 @@ A common shape of this bug: the surface gates its "ready" render on an **init flset only on a successful fetch** (`if (!isInit) return <Skeleton/>`). On error the flagnever flips, so the skeleton is **permanent** — an infinite spinner wearing a skeleton'sclothes. The error path must drive the flag / a separate `error` state, not be forgotten.+The flag is often **disguised as data-presence** — `loaded = Array.isArray(map[id])`, where+`map[id]` is written only in the SWR `onSuccess`: same success-only init flag, just spelled+as "is the data here yet". A failed fetch leaves the entry `undefined` → `loaded` stays+false → permanent skeleton. Don't read "present in a success-populated map" as "loaded";+branch the fetch's real `error`.++The mirror-image trap on a **compound** gate — one that holds the skeleton until a **secondary /+dependent** fetch resolves (a detail that waits on the assignee's config, a row that waits on its+owner) — is gating on that dependency being **present** in the map. When the dependency+legitimately resolves to **absent** (deleted, out-of-scope, `null` by design) it never lands in+the map, so a presence-gate **hangs forever** on a perfectly healthy state. Gate on the dependency+fetch's **in-flight** flag instead: block only while it's genuinely loading, and **release on+settled** — data _or_ resolved-`null` _or_ error alike. "Absent" is a resolved state, not a pending+one.++> ✅ **Task detail** gets the compound gate right: it blocks the skeleton on `agentConfigLoading`+> (the assignee-config fetch's **in-flight** flag), not on the assignee being present in the map, so+> a task whose assignee was deleted / moved out of scope resolves to `null` and **releases** the gate+> instead of spinning forever (`useActiveTaskDetail.ts:66-77`); the task skeleton itself is likewise+> gated on "resolving", not on `data === undefined`.++A third shape, in a **transient / auto-dismissing** surface (an upload dock, a progress toast,+a status snackbar that clears itself after N seconds): auto-dismiss is a **success** affordance,+not a universal one. When the timer also fires on the **failed** state it clears the error — and+often the failed item itself — before the user can react, so the failure is not just un-retryable+but **invisible**. Gate auto-dismiss on success only; a failed item must **persist** (stay in the+dock / keep the toast) and carry a **Retry**. Dismissing a failure should be the user's choice,+never a countdown's.++> ❌ The **Resource** upload dock auto-dismisses after 3s whenever the status isn't `uploading`+> or `pending` — so the **`error`** state falls through too: a failed upload hides the dock and+> `removeFiles` after 3s (`ResourceManager/components/UploadDock/index.tsx`), with no error kept+> and no retry anywhere. ✅ Guard the timer on `success` only; keep failed files with a per-item+> Retry.++Another shape, on the **write** side: an action that gates forward navigation sets an+`isNavigating` / `isSubmitting` flag, `await`s a write, then advances — but with **no+`finally`**. If the write rejects, the flag never resets, so the advance control (and often+Back with it) stays `disabled` **forever**, with no error and no retry — a dead end wearing a+"busy" label, and worse when that write is the one gating the whole flow. Reset the in-progress+flag in `finally`, and on `catch` surface the error + a retry; a failed write must never+permanently disable the only way forward.> ✅ A panel whose data request errors or exceeds its timeout shows "加载失败" with a> **Reload** button that refetches. ❌ A `NeuralNetworkLoading` that spins indefinitely when> the request hangs. ❌ `isInit` set only in the success handler, so a failed fetch leaves-> the skeleton up forever. _(pairs with Read §1.1 error state, §4.1 loading visuals.)_+> the skeleton up forever. ❌ The onboarding language step `await setSettings(...)` — the write+> that gates `commonStepsCompleted` — with no try/catch/finally, so a failed write leaves+> `isNavigating` true and Send + Back stay `disabled` forever, trapping the user on the step+> (`ResponseLanguageStep.tsx`); ✅ the desktop `LoginStep` idle/loading/success/error state+> machine with retry + cancel is the shape it should follow. ❌ A builtin-client consent page auto-submits a hidden form on+> mount and renders `Result status="success"` with a spinner + "redirecting…"; if that POST+> fails the user is stuck on a **permanent success-styled spinner** with no retry+> (`OAuthConsent/Consent/BuiltinConsent.tsx`) — a loading state that both can't fail and+> mislabels itself "success". _(pairs with Read §1.1 error state, §4.1 loading visuals.)_+> ❌ The **whole Eval module** wires 9 SWR fetches with an `onSuccess`-only handler and no+> `onError` (`store/eval/slices/{benchmark,dataset,run,testCase}/action.ts`); every list /+> detail ready-flag (`benchmarkListInit`, `isLoadingDatasets`, `isLoadingRuns`, …) flips only+> on success, so one root cause hangs a **permanent skeleton** on the sidebar + bench detail,+> a false-empty on the overview, and a blank on run / case / dataset detail — five surfaces,+> zero error paths.+> ❌ The **Memory** (记忆) area repeats it: every `userMemory` fetch registers an `onSuccess`+> only, no `onError` (`store/userMemory/slices/{context,activity,identity,preference,experience}/action.ts`,+> `home/action.ts`, `base/action.ts` `useFetchMemoryDetail`); each list gate `showLoading =+xSearchLoading || !xInit` flips only on success, so a failed load hangs a **permanent skeleton**+> on all five list tabs, a **false-empty** on home, and a **blank panel** on all five detail+> panels — no `*Error` field even exists to branch on. ❌ Its edit modal is the write-side twin:+> `EditorModal onOk` does `setConfirmLoading(true) → await onConfirm → setConfirmLoading(false)`+> with **no try/catch/finally** (`src/features/EditorModal/index.tsx`), so a failed save spins the+> OK button forever and the edit is lost on close. ✅ The same area's `DateRangeModal` submit is the+> model to copy: a `submitting` guard against double-submit + **try/catch/finally** (resets the flag,+> toasts on failure) + success toast then close (`memory/features/MemoryAnalysis/DateRangeModal.tsx`).+> ❌ The **Task list / kanban** repeats the read-side trap: `isTaskListInit` / `isTaskGroupListInit`+> flip true **only** in the SWR `onSuccess` (`store/task/slices/list/action.ts:146-155,110-116`) —+> no `onError`, and the hook's `error` / `isLoading` are **discarded at the call site**+> (`AgentTasksPage.tsx:63`), so a failed `taskService.list()` leaves `!isInit` → the skeleton+> (`TaskList.tsx:203`) spins forever with no retry.+> ❌ The **create / generation** surfaces (视频 / 图像) hit the data-presence-disguised variant:+> `useFetchGenerationBatches` registers **`onSuccess` only, no `onError`**+> (`store/{video,image}/slices/generationBatch/action.ts`), the "loaded" gate is+> `isCurrentGenerationTopicLoaded = Array.isArray(generationBatchesMap[topicId])`+> (`…/selectors.ts:23-27`), and the **shared** shell renders `!loaded` → `<SkeletonList/>` /+> `!hasGenerations` → `<EmptyState/>` / feed with **no error branch**+> (`routes/(main)/(create)/features/GenerationWorkspace/Content.tsx:39-45`). A failed batch+> fetch never populates the map, so the skeleton is permanent with no retry on **both surfaces+> and any future one built on the shell** (the sidebar `useFetchGenerationTopics` is the same+> success-only shape).+> ❌ The **Discover / Community** lists are the trap in its **purest** form — no init flag even+> needed. All 8 list slices register `useSWR(key, fetcher, { revalidateOnFocus: false })` with+> **no `onError`** (`store/discover/slices/*/action.ts`), every call site destructures+> `{ data, isLoading }` and **discards `error`**, then gates `if (isLoading || !data) return <Loading/>` (`community/(list)/agent/index.tsx:18,29` + 7 twins) — so `!data` **is** the+> success-only gate. Worse, the fetcher **suppresses even the fallback toast**+> (`services/discover.ts:117` `{ context: { showNotification: false } }`). A failed market+> fetch → permanent skeleton on the primary content of every Discover tab, no error, no retry,+> no toast (the `mutate` needed to retry is already returned, unused). ✅ Read `error` at the+> call site (or a shared list-shell) and render a failed state with Reload before the `!data`+> branch.+> ❌ The **chat message stream** — the product's highest-traffic surface — has the same trap:+> `useFetchMessages` registers **`onData` only, no `onError`**+> (`store/chat/slices/message/actions/query.ts:216-232`,+> `features/Conversation/store/slices/data/action.ts:211-266`); `messagesInit` flips true only+> in the success `onData` (or via `hasInitMessages = !!dbMessagesMap[key]`,+> `ConversationArea.tsx:95` → `StoreUpdater.tsx:73`), and `ChatList` **discards the SWR+> `error`** (keeps `messagesSWR` but reads only `.isValidating`, `ChatList/index.tsx:97,157`),+> rendering `!messagesInit → <SkeletonList/>` with **no error branch**+> (`ChatList/index.tsx:174`). A failed `getMessages` for a selected topic hangs a **permanent+> skeleton** on the core chat — no reason, no Reload. ✅ Branch the fetch's `error` to a failed+> state with Retry (see the topic audit).**Checklist**- [ ] Every loading state has a terminal failure path — on error or after a bounded timeout, not an infinite spinner. _(Certainty)_- [ ] An init/ready flag isn't gated on success only — the error path resolves the loading state too, no permanent skeleton. _(Certainty)_+- [ ] A compound gate waiting on a **secondary/dependent** fetch gates on its **in-flight** flag and releases on settled (data / resolved-`null` / error), never on the dependency being **present** in a map — a legitimately absent dependency (deleted / out-of-scope) must not hang the gate. _(Certainty)_+- [ ] An awaited write that gates navigation resets its in-progress flag in `finally` and offers retry on `catch` — a failed write never permanently disables the advance / Back control. _(Certainty)_- [ ] The failed state names the failure and offers a **Reload / Retry** action. _(Meaningful)_- [ ] Retry re-runs the same fetch, shows loading while re-running, and stays available on repeat failure. _(Certainty)_- [ ] Already-loaded context is preserved on failure — don't wipe the surface. _(Meaningful)_+- [ ] In an auto-dismissing surface (upload dock / progress toast), auto-dismiss fires on **success only** — a failed item persists with a Retry, never cleared by the countdown. _(Certainty・Meaningful)_## 4.3 Capability-gated features・Certainty・Meaningful@@ -82,10 +211,90 @@ Stay reactive — the reminder clears the moment the user switches to a capableunsupported state. Scope to the mode that needs it — one reminder per root cause — andstate both the problem and the remedy.+**Soft-inline is right only when the user can fix it _in context_.** The "never a hard block"+rule above assumes a **model / config** capability — the user switches the model dropdown and+the feature works, so blocking them would be gratuitous. A different class of gap is+**structural**: the capability is absent because of the **platform / deployment**, not a choice+the user can flip on this screen — a build served without the backend the feature needs (no+database, a client-only distribution), a plan that doesn't include the feature. Here there is+nothing to switch, so a soft inline warning over a half-working surface is _worse_ than honest:+render a **full-surface gate** that says the feature isn't available in this context **and+carries the remedy** (how to self-host / enable the backend, upgrade the plan), not a bare "not+supported". The distinction is user-fixable-here → soft inline; not-fixable-here → full gate+with a path out. Both still owe the remedy.++> ✅ The image-generation surface renders `NotSupportClient` — a full-surface explainer with+> feature cards + links to self-hosting-database docs and the hosted app — when the client build+> lacks the DB backend generation needs (`image/NotSupportClient.tsx`), instead of showing a dead+> composer. The remedy is _in the gate_. ❌ A model-capability gap hard-blocking the surface, or+> conversely a platform-absent feature faking a working UI that silently no-ops.+**Checklist**-- [ ] Missing capability shows a soft inline warning, never a hard block. _(Meaningful)_+- [ ] A **model / config** capability gap (user can switch here) shows a soft inline warning, never a hard block. _(Meaningful)_+- [ ] A **platform / deployment** capability gap (not fixable on this screen) shows a full-surface gate **with the remedy** (self-host / enable / upgrade), never a soft warning over a half-working surface or a faked-working no-op. _(Certainty・Meaningful)_- [ ] Reminder is reactive — clears when a capable model is selected. _(Natural)_- [ ] No warning while config is still loading; only on resolved-unsupported. _(Certainty)_- [ ] Scoped to the dependent mode; one reminder per root cause. _(Natural・Certainty)_- [ ] Copy states the problem and the remedy. _(Meaningful)_++## 4.4 Autosave needs a persistent save-state, and one convention per surface・Certainty・Meaningful++A settings / config surface that **saves on every change** (`onValuesChange → setSettings`,+toggle → store action) has no explicit "Save" button, so the write is invisible — and an+invisible write that **fails silently is a config-loss trap**: the user flips a switch,+sees nothing, believes it took, and it didn't. Autosave therefore owes a **persistent+save-state**, not a fire-and-forget: reflect **saving → saved → failed**, and on failure+show an inline error **with retry** (and keep the user's new value, don't snap the control+back without saying why). A one-shot success toast is optional for a silent-save; a+**failure signal is mandatory** (pairs with §4.2 — the write can fail just like a read).++Just as important, a surface with many such fields must use **one save-feedback+convention**, not a different one per field/tab (consistency is semantic): if changing a+setting here confirms one way, changing a setting there must confirm the same way. A shared+form wrapper is the natural home for this — bake the save-state affordance into the wrapper+so tabs can't each re-invent (or forget) it.++**The rule is about surfacing the save-state, not about autosave specifically.** Autosave is+one convention; an **explicit per-field / per-section `Save` button** is another equally+valid one — and sometimes the better fit (a namespace/handle edit that must validate+uniqueness, a field where a mid-typing autosave would thrash). What §4.4 demands holds either+way: whichever you pick, the write must show **saving → saved → failed** (a `Save` button owes+a loading spinner + a success tick + an on-failure inline error that **keeps the edited+value**), and you must pick **one** convention for the surface, not mix autosave-here /+explicit-Save-there. Choosing explicit Save doesn't exempt you from the failure signal — it+just moves it onto the button.++> ✅ An autosave field shows a subtle "saved" tick on success and, on failure, an inline+> "保存失败" with a **Retry** that re-runs the write and keeps the edited value.+> ✅ **Community workspace settings** takes the explicit-Save route and does it right: each+> field has its own `Save` button driving a `savingField` loading state, a success toast, and+> an on-failure `message.error` (plus an inline field error for the namespace-taken case) that+> **keeps the edited value** rather than snapping it back — one convention applied across every+> field of the surface (`CommunityWorkspaceSettings.tsx:310-352`). Explicit Save, full+> save-state, no silent write — the discipline the same area's read side lacks (see Read §1.1). ❌ The+> Appearance / Advanced / hotkey-essential forms call `setSettings` from `onValuesChange`+> with **no success and no failure feedback** — a failed save is indistinguishable from a+> successful one (`settings/appearance`, `settings/advanced`). ❌ The same settings area+> confirms saves four different ways across tabs (silent / `message.success` /+> `notification.success` / toast-on-test-only) with no shared convention. ❌ The page+> editor's content **and** title/emoji autosave both define a save-state of only+> `idle | saving | saved` — **no `failed` variant** — and their `catch` blocks reset+> `saveStatus` / `metaSaveStatus` back to `idle` (`store/document/slices/editor/action.ts`,+> `PageEditor/store/action.ts`). A network / 500 save failure is then indistinguishable from+> a success (only a lock `CONFLICT` is surfaced); the state machine literally can't+> _represent_ failure, so it can never show it — the silent-write trap baked into the type.+> ❌ **Task detail** config autosave is the same trap twice over: `updateVerifyConfig` /+> `updateTaskModelConfig` / `updatePeriodicInterval` / `setAutomationMode` / `updateSchedule` all+> catch-and-`console.error` (`store/task/slices/config/action.ts:121-132,151-167,224-229,279-284`)+> — the optimistic engine reverts the value with **no toast** — and `taskSaveStatus` is+> `saving | saved | idle` with **no `failed`**, reset to `idle` on error (`detail/action.ts:284`),+> while the header renders `AutoSaveHint` only while `saving` (`TaskDetailPage.tsx:68`). A failed+> schedule / verify / model edit looks identical to a saved one.++**Checklist**++- [ ] Save-state surfaced (saving → saved → failed), never a silent write — whether autosave **or** an explicit per-field/section `Save` button (explicit Save still owes the failure signal). _(Certainty)_+- [ ] The save-state enum can **represent** failure — a `failed` variant exists and the write's `catch` drives it, not a reset to `idle` / neutral. _(Certainty)_+- [ ] A failed autosave shows an inline error **with retry** and keeps the edited value. _(Meaningful)_+- [ ] One save-feedback convention across a multi-field surface — ideally baked into the shared form wrapper, not re-invented per tab. _(Certainty)_diff --git a/.agents/skills/ux/references/grow.md b/.agents/skills/ux/references/grow.mdindex 2707bdc8179..f30f53b953a 100644--- a/.agents/skills/ux/references/grow.md+++ b/.agents/skills/ux/references/grow.md@@ -17,3 +17,54 @@ with it), not buried in a far-off menu.- [ ] Advanced capability progressively disclosed; novice path stays clean. _(Growth・Natural)_- [ ] Next action surfaced in context at the moment of need. _(Growth・Meaningful)_++## 5.2 Multi-step flows show progress and stay skippable・Certainty・Natural++A wizard / onboarding / any sequence of **more than two steps** owes the user two things a+single form doesn't: **where am I and how much is left** — a step / progress indicator (the+_Sequence Map_ pattern: position + total) on every step — and **a way out** — non-essential+steps (identity, optional profile, connectors) must be **skippable**, with an escape hatch+that is always visible, not buried behind a mode / branch flag. Without a progress signal the+flow reads as open-ended and users abandon; without a skip, an optional step becomes a hard+gate that blocks first use. This is a **surface-class norm** for setup flows (Notion / Linear+/ Slack / Vercel all ship both) — an absent progress bar or a mandatory profile step leaves no+`file:line` to grep, so name it as an expected capability and check it as present / missing.++> ✅ An onboarding wizard shows "Step 2 of 5" (or a progress bar) on every screen and lets the+> user skip the name / interests / connectors steps. ❌ LobeHub onboarding runs up to 6 classic+> / 4 desktop screens with **no progress indicator** (the only `<Steps>` are decorative feature+> lists, `current={null}`), and the classic flow **hard-gates on a required name** with no skip+> until the final step (`FullNameStep.tsx`, `_layout/index.tsx`) — see the onboarding audit.++**Checklist**++- [ ] A multi-step flow (>2 steps: wizard / onboarding) shows a step / progress indicator — position + total — on every step. _(Certainty・Natural)_+- [ ] Non-essential steps are skippable and an escape hatch is always visible, not gated behind a mode / branch flag. _(Natural)_++## 5.3 Close the config → manage loop with a near entry point・Growth・Meaningful++When a **settings / config surface governs a feature that owns its own data or management+area** — a toggle for Memory that has a whole `/memory` browser, an integration switch whose+connections live on another page, a "sync enabled" that has a sync-history view — the config+surface must offer a **near, in-context entry point to that area** ("Manage memories →",+"View connections", "Open history"). Configuring a thing and _using / inspecting_ it are two+ends of one loop; a settings pane that only flips a switch is a **dead-end** for the user who+now wants to see what it did. Describing the destination in helper copy ("you can view and+edit anytime") without linking to it is worse than silence — a promise with no door. This is a+**cross-surface** gap, so a single-surface / code-only read is structurally blind to it (the+link that should exist has no `file:line`); name the destination as an expected capability and+check the entry point is present. The management area may be reachable elsewhere (a global+nav item) — that doesn't discharge the obligation; the loop must close **from the config+context**, at the moment the user is thinking about the feature.++> ❌ Settings **Memory** (`/settings/memory`) is a bare enable-toggle + effort slider whose+> copy promises "view / edit / clear memory anytime" (`memory.enabled.desc`), yet renders **no+> link** to the rich `/memory` area (identities / contexts / preferences / experiences /+> activities) — the user configures memory and is given nowhere to go manage it. ✅ Add a+> "Manage memories →" action (header extra / footer row) to `/memory`, making the promised+> destination one click away.++**Checklist**++- [ ] A config surface for a feature with its own data / management area links to it in-context (close the config → manage loop), not just describe it in copy. _(Growth・Meaningful)_+- [ ] The destination is named as an expected capability up front (cross-surface gap has no `file:line`); a global-nav path elsewhere doesn't excuse the missing near entry point. _(Certainty)_diff --git a/.agents/skills/ux/references/read.md b/.agents/skills/ux/references/read.mdindex a65cf1f7edb..6f0bd00218a 100644--- a/.agents/skills/ux/references/read.md+++ b/.agents/skills/ux/references/read.md@@ -20,16 +20,57 @@ persistent chrome is no excuse for dead space. Loading uses a skeleton /`NeuralNetworkLoading`, never a flash of blank or a layout shift; error surfaces thereason and a retry/back path.+The single most common way this breaks: the fetch reads only `{ data, isLoading }`, never+`error`, and coerces the failure into the empty branch — `const items = data ?? []` then+`if (!items.length) return <Empty/>`. A **failed** load then renders as "you have nothing",+inviting the user to re-create what they already own, with no reason and no retry. **Check+`error` _before_ the empty branch**: only show empty when `!error && length === 0`; a failure+gets its own state (reason + Reload). Error is not a kind of empty.+> ✅ An empty "Connect your first device" page with primary/secondary connect paths and "what you can do once connected" cards.> ✅ The agent **Documents** tab keeps its new-folder / new-doc toolbar and renders an `Empty` below it when there are no documents.> ❌ A bare title over skeleton rows, or a toolbar over dead space.+> ❌ `Devices` renders a failed device-list fetch as the "Connect your first device" onboarding empty (`DeviceManager.tsx` reads only `{data, isLoading}`), falsely telling the user they own no devices — the same `data ?? [] → empty` trap in `Messenger`, `Creds`, `Skill`, `Stats`, `SystemTools` (7 settings tabs at once); and in **Eval** overview, where a failed benchmark fetch renders the "create your first benchmark" onboarding empty (`eval/index.tsx`).+> ❌ A detail page that `return null`s until its record loads is **not** a loading state — it's a blank flash on the happy path and a **permanent blank** if the fetch fails (no skeleton, no error): **Eval** run / case / dataset detail all `if (!record) return null` (`eval/bench/[benchmarkId]/runs/[runId]/index.tsx`, `.../cases/[caseId]/index.tsx`, `.../datasets/[datasetId]/index.tsx`). Render a skeleton, then an error state.+> ❌ **Resource** repeats the failure-as-empty trap four times: the Explorer reads only `{ isLoading, isValidating }` (the swr already exposes `error`, unread) so a failed resource fetch renders the "create your first resource" onboarding (`ResourceManager/components/Explorer/index.tsx`, `EmptyPlaceholder.tsx`); the sidebar KB list (`resource/(home)/_layout/Body/LibraryList/index.tsx`), the search overlay (`SearchResultsOverlay.tsx` → false "no results"), and the folder tree (`LibraryHierarchy/index.tsx` → false "add folder") all do the same.++**Distinguishing the two empty variants is a call-site wiring job, not just a component one.** A common miss: the `Empty` component _already_ ships a `search` / "no match" variant, but the list renders it **bare** and never passes the flag — so a legitimate zero-result search shows the first-run "create your first…" onboarding, and the built variant + its i18n keys are dead code. The query is in scope at the call site; thread it in (`search={!!q || !!category}`) and add a clear-filters action.++> ❌ **Discover / Community** lists: all five `*Empty` components take a `search?: boolean` that swaps to the "no results" copy (`community/features/AssistantEmpty.tsx:11-27` + McpEmpty / ModelEmpty / ProviderEmpty / SkillEmpty twins), but every `features/List/index.tsx:17` renders `<XEmpty/>` with **no prop** (`grep 'search={'` over the area → 0 hits), so `q=zzznomatch` returns zero rows and shows the onboarding empty with no clear-filters — the built variant unreachable. (`SearchResultCount.tsx`, a "N results for X" affirmation, is likewise imported by nothing.) ✅ Pass `search` from the page → `List` → `Empty` and add a clear-filters CTA.++**Failure is also not "not found".** A detail page that coerces a fetch failure into a **404 /+"doesn't exist"** terminal is the same masquerade wearing a different mask: it tells the user the+record was **deleted** when the load merely **errored** (and a 404 is a dead-end — no Reload).+Distinguish `error` (transient → reason + retry, keep the URL) from a resolved not-found+(`!isLoading && !data && !error` → the real 404). Read `error` before falling to `NotFound`.++> ❌ **Resource** library detail: `const { data, isLoading } = useKnowledgeBaseItem(id)` then+> `if (!isLoading && !data) return <NotFound/>` (`resource/library/index.tsx`) — a network / 500+> on the KB fetch renders the permanent "this library doesn't exist" 404, so the user thinks it+> was deleted and gets no retry. ✅ Branch `error` to a reload state; keep 404 for a genuine miss.+> ❌ **Task detail** bakes the same conflation into the fetcher: `fetchTaskDetail` `throw`s+> `Task not found` when `result.data` is falsy **and** lets any network / 500 rejection propagate+> the same way (`store/task/slices/detail/action.ts:124-129`), then `isNotFound = !!taskError &&+!hasTaskDetail` (`useActiveTaskDetail.ts:60`) renders a terminal `NotFound` whose only action is+> "Back to tasks" (`TaskDetailPage.tsx:39-59`). A transient failure tells the user the task was+> **deleted** and offers no Reload. The rest of the machine is right (skeleton gated on+> "resolving", not `data === undefined`) — the miss is treating _errored_ and _absent_ as one+> signal. ✅ Distinguish them: a thrown "not found" → 404, a fetch rejection → reload state.+> ❌ **Memory** (记忆) detail panels do it in blank form: all five `*RightPanel.tsx` read only+> `{data, isLoading}` and set the body only in the `isLoading` / `data` branches+> (`memory/contexts/features/ContextRightPanel.tsx` + 4 twins), so a fetch **error** and a resolved+> **not-found** (deleted item) both render an empty panel forever — no skeleton, no reason, no+> reload, deleted indistinguishable from failed-to-load; and the Memory **home** page falls to the+> "analyze to get started" onboarding empty when a persona/tags fetch fails (`memory/(home)/index.tsx`).**Checklist**- [ ] Empty state is a real page with explanation + CTA, not a blank screen. _(Meaningful)_- [ ] Empty variants distinguished: "no data yet" vs "no filter match". _(Certainty)_+- [ ] Error is checked **before** the empty branch — a failed fetch never renders as empty (`!error && length === 0` gates empty); read `error`, don't coerce `data ?? []`. _(Certainty・Meaningful)_+- [ ] A detail page reads `error` before falling to `NotFound` — a failed fetch shows a reload state, not a "doesn't exist" 404 (deleted vs failed-to-load are different screens). _(Certainty・Meaningful)_- [ ] Always-rendered chrome still renders a body empty placeholder. _(Meaningful)_-- [ ] Loading designed (skeleton / NeuralNetworkLoading), no layout shift. _(Natural)_+- [ ] Loading designed (skeleton / NeuralNetworkLoading), no layout shift — a detail page's "record not loaded yet" is a skeleton, never a bare `return null` / blank. _(Natural)_- [ ] Error designed with reason + retry/back path. _(Meaningful)_## 1.2 Lists at scale・Certainty・Natural@@ -40,10 +81,53 @@ mechanism per range: plain render → load-more / pagination → virtual scroll,batch-select / bulk actions once counts get large. Co-design the empty / loading /error states (§1.1) alongside: a list isn't done until all four render well.+When such a list is **paginated / lazy-loaded**, search and filter must query the **full+set on the server**, not filter only the rows already fetched. A client-side `includes()`+over the loaded page reports "no results" for a match that lives in the not-yet-loaded+remainder — a **false empty**, worse than no search because it asserts absence. (This is+the read-side twin of sorting a paginated list client-side over a partial page.)++The **cleanest way to make this hold by construction** — and get deep-linking + state-restore+for free — is to make the **URL the single source of truth for the list's read state** (`q`,+`sort`, `filter`/`category`, `page`) and **derive the fetch key from those params**, rather+than holding them in local component state. Then filter / sort / search / paginate are+**server queries by definition** (the key changed → the server re-ran), not client passes+that can drift from the server's page; the browse state is shareable / restorable from the+URL; and there's no local-vs-server divergence to reconcile. Reach for this whenever a list+has more than one read-state dimension — the alternative (local `useState` per control + a+manual refetch) is where the partial-page traps breed.++> ❌ The Pages "all pages" drawer filters `displayDocuments` with a client-side+> `title/content.includes(keyword)` over the loaded set **and disables load-more while+> searching**, so searching for a page past the loaded window returns "no results" though it+> exists (`AllPagesDrawer/Content.tsx`). ✅ Send the keyword to the server query and page+> through matches.+> ✅ **Memory** (记忆) does it right: each list tab passes `q` straight into the paginated+> `queryMemories` server call (`memory/contexts/index.tsx:57-62`, mirrored per tab), so search spans+> the whole set — no false "no results" for unfetched rows.+> ✅ **Discover / Community** lists take the sub-rule to its conclusion: every read dimension+> (`q` / `sort` / `category` / `page` / `source`) lives in the URL and flows into the SWR key+> (`libs/swr/keys.ts`; read via `useQuery()` at `community/(list)/agent/index.tsx:16`), so+> filter·sort·search·paginate are **all server re-queries** and the whole browse state is+> deep-linkable — none of the client-over-partial-page traps that bit the other list audits+> can occur here. (This is why the surface's only read-side gap is failure handling, not+> query correctness.)++> ❌ The Pages "all pages" drawer filters `displayDocuments` with a client-side+> `title/content.includes(keyword)` over the loaded set **and disables load-more while+> searching**, so searching for a page past the loaded window returns "no results" though it+> exists (`AllPagesDrawer/Content.tsx`). ✅ Send the keyword to the server query and page+> through matches.+> ✅ **Memory** (记忆) does it right: each list tab passes `q` straight into the paginated+> `queryMemories` server call (`memory/contexts/index.tsx:57-62`, mirrored per tab), so search spans+> the whole set — no false "no results" for unfetched rows.+**Checklist**- [ ] List designed across 1 → 10k rows (plain → pagination → virtual scroll). _(Certainty)_- [ ] Batch-select / bulk actions added once counts get large. _(Certainty)_+- [ ] Search / filter over a paginated list queries the full set server-side, not just the loaded page — no false "no results" for unfetched rows. _(Certainty・Meaningful)_+- [ ] Multi-dimension list read-state (`q`/`sort`/`filter`/`page`) lives in the URL and the fetch key derives from it — server-query, deep-link, and restore by construction, not local state + manual refetch. _(Certainty・Natural)_- [ ] Empty / loading / error co-designed with the data state (§1.1). _(Natural)_## 1.3 Selection visibility in scrolled lists・Certainty・Natural@@ -54,20 +138,36 @@ reads it as "nothing selected" or a broken page. Any list that can open with apre-selected item must **scroll that item into view** — hardest when the selection hasno other anchor (no highlighted parent row, breadcrumb, or header echo), because thenan off-screen active row means **zero** visible feedback. Scroll only when the row is-actually off-screen (`block: 'nearest'`) so an already-visible selection doesn't jump,-and re-run once async rows mount (key off a list-ready signal like row count, not just-the id) so a restored selection still lands when data arrives. Mirror the behavior-across duplicated list variants so it can't regress in just one.+actually off-screen (`block: 'nearest'`, plus `inline: 'nearest'` / `'end'` for a+**horizontally**-scrolling list — the axis follows the list's scroll direction) so an+already-visible selection doesn't jump. And **time the scroll to when the target node+actually exists** — there are two triggers, not one: for rows arriving **async from a+fetch**, re-run keyed off a list-ready signal (row count, not just the id) so a restored+selection lands when data arrives; for a row you **add imperatively in the same handler**+(open-and-scroll / add-and-scroll), the node isn't in the DOM until React commits, so a+synchronous `scrollIntoView` finds nothing — defer to the paint (a `requestAnimationFrame`,+or a **double** rAF to clear the commit frame) before querying it. Mirror the behavior+across **every** entry point that opens/adds an item (and every duplicated list variant)+so it can't regress in just one.> ✅ The nested thread list is capped to \~9 rows; a thread restored from `?thread=` below the fold is scrolled into view on mount.+> ✅ The **Fleet** board scrolls a (re-)opened or newly-added column into the horizontally-scrolling+> band with `scrollIntoView({ block: 'nearest', inline: 'end' })` after a **double `requestAnimationFrame`**+> (so the query runs post-paint, once React has committed the new column) — and it's mirrored across+> **both** entry points, sidebar activate and the "+" add button (`RunningTaskSidebar.tsx` `handleActivate`,+> `AddColumnButton.tsx`), so neither path can regress alone.+> ❌ **Memory** (记忆) list/grid: clicking a card deep-links `?contextId=` and opens the detail+> panel, but the Virtuoso list mounts at `scrollTop=0` and nothing scrolls the active card into+> view, and the cards take no `active` prop / highlight (`memory/**/TimeLineView`, `**/GridView`,+> `*Card.tsx`) — a restored selection below the fold shows **zero** list feedback (the no-anchor case).**Checklist**- [ ] Restored / deep-linked active item is scrolled into view on mount. _(Certainty)_- [ ] Designed for the no-anchor case (parent not highlighted → off-screen = zero feedback). _(Meaningful)_-- [ ] Uses `block: 'nearest'` — an already-visible selection doesn't jump. _(Natural)_-- [ ] Scroll re-runs once async rows mount (keyed off row count). _(Certainty)_-- [ ] Mirrored across duplicated list variants (parallel agent / group lists). _(Certainty)_+- [ ] Uses `block: 'nearest'` (and `inline: 'nearest'` / `'end'` on a horizontal list — axis follows the scroll direction) so an already-visible selection doesn't jump. _(Natural)_+- [ ] Scroll is timed to the target node existing — keyed off a list-ready signal (row count) for **async-arriving** rows, or deferred to the paint (`requestAnimationFrame` / double rAF) for a row **added imperatively in the same handler**. _(Certainty)_+- [ ] Mirrored across **every** open/add entry point (and every duplicated list variant — parallel agent / group lists) so it can't regress in one path. _(Certainty)_## 1.4 Option visibility in pickers・Certainty・Meaningful@@ -96,6 +196,7 @@ through `formatShortenNumber`; both already carry the K/M/B/T ladder.> ✅ `10.3B` ❌ `10285.7M`> ❌ an ad-hoc `(n / 1_000_000).toFixed(1) + 'M'` that stops at M.+> ❌ **Discover / Community** registry cards render social-proof counts **verbatim** — `{installCount}` / `{stars}` / `{commentCount}` in `skill/features/List/MetaInfo.tsx` + the mcp twin (a popular server prints `40000`), and agent `TokenTag.tsx:43` uses `formatIntergerNumber` instead of the `formatUsageValue` ladder — while `formatShortenNumber` is already imported one directory over in `community/features/LikeButton.tsx`. Install/star counts are a scanning metric; roll them.**Checklist**@@ -141,9 +242,34 @@ read/interaction; stage new items and let the user choose to merge them. And a rthat _fails_ must not masquerade as "nothing new" — distinguish "failed to refresh" from"no updates" (pairs with §1.1 and Feedback §4.2).+And when a **control is derived from the live-status map** — a "close all idle" / "clear+inactive" / "archive done" that reads each row's polled status — it must **gate on that+query's loaded/error state**, never on a success-only init flag. An errored or still-loading+status map reads as `{}`, so _every_ row looks inactive and the bulk action becomes a+**wiper**. Treat "unknown / errored / not-yet-loaded" as **ineligible** (disable the action),+never as the inactive value that makes a row a removal target.++And **conditional** polling (poll only _while_ something is in flight) must start from **reactive+state**, not from a function passed to the fetcher's `refreshInterval`. SWR's function-form+`refreshInterval` is re-evaluated **only after a timer fires**, so if its first evaluation returns+`0` (nothing in flight yet — the common cold-start), no timer is ever scheduled and polling+**silently never starts**, even once work begins. Derive a reactive `shouldPoll` boolean from the+store and pass `refreshInterval: shouldPoll ? interval : 0` so a re-render (not a stale timer) turns+the poll on the moment activity appears, and off the moment it settles.+> ✅ A feed shows a "3 new" pill the user taps to bring new items in; a manual refresh> control sits in the header. ❌ A 10s poll silently reshuffles the list mid-read, and a> failed poll looks identical to an empty feed.+> ❌ The Fleet board's "close idle columns" derives idle from `statusByColumnKey[key] !==+'running'` and gates only on a success-only init flag (`isInit: !isLoading`); when the+> running-topics poll errors the status map empties, **every** open column reads as idle, and+> one click wipes the whole board (`Fleet/idleColumns.ts`, `RunningTaskSidebar.tsx`,+> `useRunningTopics.ts`).+> ✅ **Task detail** polls the activity feed only while a run is live and starts it correctly: a+> reactive `shouldPoll = hasInFlightActivity(detail)` selector feeds `refreshInterval: shouldPoll ?+TASK_DETAIL_POLL_INTERVAL : 0` (`store/task/slices/detail/action.ts:300-315`), so a re-render turns+> polling on when work appears and off when it settles — dodging the function-form `refreshInterval`+> cold-start trap (its own comment spells out why) and never hammering a finished task.**Checklist**@@ -151,3 +277,69 @@ that _fails_ must not masquerade as "nothing new" — distinguish "failed to ref- [ ] Manual refresh available — the user isn't hostage to the poll interval. _(Certainty)_- [ ] Active read/interaction isn't reordered or dropped under the user; new items are staged. _(Natural)_- [ ] A failed refresh is distinct from "no new items", never shown as empty. _(Certainty)_+- [ ] Conditional polling starts from **reactive state** (`shouldPoll` boolean → `refreshInterval`), not a function-form `refreshInterval` — the function form never schedules a first timer if its initial value is `0`, so polling silently never starts. _(Certainty・Natural)_+- [ ] A bulk/destructive control derived from a live-status map gates on the query's loaded/error state — "unknown/errored" is ineligible, never treated as the inactive value that makes a row a removal target. _(Certainty・Meaningful)_++## 1.8 Find-by-search once a surface has many entries・Natural・Certainty++A surface that grows to **dozens of navigable entries** — a settings area with \~25 tabs, a+long provider/model list, a big command set — outgrows pure browse-by-hierarchy: the user+knows the _name_ of what they want ("proxy", "hotkeys", "billing") but must hunt for it+across grouped menus. Past a threshold, **offer search / filter as a first-class+affordance** — a settings-search box, a jump-to-setting, a filter field over a long list —+so recall beats scanning. This is a **surface-class norm** (mature settings panels —+VSCode / Slack / GitHub / macOS — all ship settings search); a code-only read is blind to+it because an absent search box leaves no `file:line`, so name the class expectation first+and check it as present / missing. Scope: don't add search to a 5-item menu; do add it once+the grouped set is large enough that "which group was that under?" becomes a real question.++> ✅ A settings shell with a search box that filters/jumps across all tabs by name. ❌ The+> settings area has \~25 tabs across 4 accordion groups and **no search** — only browse ++> a single-level breadcrumb (`settings/_layout/Header.tsx`, `_layout/Body/index.tsx`).++**Checklist**++- [ ] A surface with many navigable entries offers search / filter / jump, not browse-only. _(Natural)_+- [ ] Search is named as a class norm up front (mature comparables ship it) so an absent box is caught, not overlooked. _(Certainty)_+- [ ] Scoped to scale — added once the set is genuinely large, not on a short menu. _(Certainty)_++## 1.9 Marketplace / registry browse cards carry lifecycle + trust state・Meaningful・Certainty++A **browse card in a marketplace / registry** (agents, models, providers, plugins/MCP,+skills, extensions, templates) is not a static poster — the class carries a small set of+affordances every mature comparable ships (VS Code Marketplace, npm, HuggingFace Hub,+Raycast Store, Ollama library, the GPT / MCP stores), and a code-only read is **blind to the+absent ones** because a never-built badge leaves no `file:line`. Name the class expectations+first, then check each **present / partial / absent** on the tile:++- **Owned / installed / added state.** The card reflects whether _this user_ already has the+ item — an "Installed ✓" / "Added" badge (and ideally an inline add for bulk↔single parity),+ so a user scanning the grid doesn't re-add what they own or open a detail page to find out.+ The state usually already exists one level down (a detail-page install button reading an+ `isInstalled` selector); the miss is not surfacing it on the tile.+- **Trust / provenance badges, consistently across sibling registries.** Verified / official /+ author markers — and applied the **same way** across sibling lists. When one registry's card+ badges "official" and its sibling's card (equally third-party, equally installable) shows no+ trust mark at all, a user can't judge either. Define **one card contract** per registry+ class (owned-state · install/star count · trust badge · what's-inside) and apply it to all.+- **No-results distinct from first-run** (see §1.1) and **counts abbreviated** (see §1.5).+- **Contribute → an in-app submit**, not a dead-end to external docs / a GitHub repo (Grow §5.3).++This is a **surface-class norm**: write the expected-capability list from the comparables+_before_ reading code, then audit gaps against it — otherwise the read only polishes the+paths that already exist and blesses the absent ones.++> ✅ A model card shows "Added" on models already enabled in the workspace and a hover "Add"+> for the rest; official models carry a verified check, same as the provider list.+> ❌ **Discover / Community** cards show avatar / title / author / stats but **no+> owned/installed state** on any of the five list `Item.tsx` (add/install lives only on the+> detail; `(detail)/mcp/.../ActionButton` already reads `pluginSelectors.isPluginInstalled`,+> the list just doesn't). The **mcp** card badges official/validated (`mcp/features/List/Item.tsx:157-191`)+> but the **skill** card carries no trust mark though skills are equally installable, and+> "Create" opens a docs modal → GitHub (`CreateButton/Inner.tsx:44-50`) with no in-app submit.++**Checklist**++- [ ] Registry/marketplace browse cards reflect owned / installed / added state on the tile, not only on the detail page. _(Meaningful)_+- [ ] Trust / verified / official badges applied via one card contract, consistently across sibling registries (no "official on one list, nothing on its twin"). _(Certainty・Meaningful)_+- [ ] Class-norm capabilities (owned-state, trust badge, counts, no-results≠first-run, contribute→in-app-submit) listed from comparables up front, so an absent one is caught. _(Certainty)_diff --git a/apps/cli/man/man1/lh.1 b/apps/cli/man/man1/lh.1index 42932ec9333..d83cffa6d86 100644--- a/apps/cli/man/man1/lh.1+++ b/apps/cli/man/man1/lh.1@@ -1,6 +1,6 @@.\" Code generated by `npm run man:generate`; DO NOT EDIT..\" Manual command details come from the Commander command tree.-.TH LH 1 "" "@lobehub/cli 0.0.36" "User Commands"+.TH LH 1 "" "@lobehub/cli 0.0.38" "User Commands".SH NAMElh \- LobeHub CLI \- manage and connect to LobeHub services.SH SYNOPSIS@@ -26,6 +26,9 @@ For command-specific manuals, use the built-in manual command:.RE.SH COMMANDS.TP+.B tool\-worker+Internal command for isolated tool execution+.TP.B loginLog in to LobeHub via browser (Device Code Flow) or configure API key server.TPdiff --git a/apps/cli/package.json b/apps/cli/package.jsonindex 263a1c3e4a4..dbf8ef727d8 100644--- a/apps/cli/package.json+++ b/apps/cli/package.json@@ -1,6 +1,6 @@{"name": "@lobehub/cli",- "version": "0.0.36",+ "version": "0.0.38","type": "module","bin": {"lh": "./dist/index.js",