Skip to content

fix(showcase,rest,runtime): resolve #2616 findings — REST fields crash, AI 404 spam, dead-end wizard, unbound Mark Done, stuck KPI cards, offline seed images#2621

Merged
os-zhuang merged 2 commits into
mainfrom
claude/browser-ux-testing-showcase-j6s7f3
Jul 5, 2026
Merged

fix(showcase,rest,runtime): resolve #2616 findings — REST fields crash, AI 404 spam, dead-end wizard, unbound Mark Done, stuck KPI cards, offline seed images#2621
os-zhuang merged 2 commits into
mainfrom
claude/browser-ux-testing-showcase-j6s7f3

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Summary

Fixes the framework-repo-scoped bugs and improvements found in #2616's full-chain browser UX pass over the showcase app.

  • REST (A4)packages/metadata-protocol/src/protocol.ts: normalize a string fields query param (e.g. ?fields=name) the same way select already is, so GET /api/v1/data/showcase_task?fields=name no longer crashes with query.fields.map is not a function. Also added a defensive Array.isArray guard in packages/plugins/driver-sql/src/sql-driver.ts's SELECT clause.
  • Runtime (A5)packages/runtime/src/http-dispatcher.ts: GET /ai/agents now returns 200 {agents:[]} instead of a 404 when no AI service is configured (the open-source default), instead of spamming the console on every navigation.
  • CRM Workbench / Account Cockpit (A2) — switched off the legacy top/$filter query aliases (removed in 11.0 per the canonical QueryOptionsV2 contract) to limit/where, and stopped silently swallowing fetch errors in the KPI-refresh effect — previously there was no way to tell why the stat cards were stuck at 0.
  • Review Queue (A3) — dropped showcase_mark_done from the page toolbar (interfaceConfig.buttons). It's a record-scoped action (visible: '!record.done') with nothing to evaluate against on an unbound list-page header; it already surfaces correctly per-row via its existing list_item location.
  • New Project Wizard (B1) — added an explicit submitBehavior: {kind:'thank-you', ...}, matching the pattern already used in contact.view.ts/inquiry.view.ts, so a successful create swaps the filled step-3 form for a confirmation panel instead of leaving it open to an accidental duplicate submit.
  • Seed data (C) — replaced picsum.photos task cover URLs with local data:image/svg+xml placeholders (colored by task status) — Gallery/All Views no longer show a wall of broken images in offline/restricted-network environments.
  • Command Center (D) — added stepSize: 1 to count-based chart y-axes to reduce fractional tick marks, and added the page to the e2e smoke suite (showcase-smoke.spec.ts) — it previously had zero automated coverage — with the chart-width assertion tightened from >0 to >200 so a repeat of the reported ~130px chart-width collapse fails CI.

Out of scope (tracked in #2620)

Several #2616 findings trace to the sibling objectui repo (pinned via .objectui-sha, not present in this checkout, and not in this session's GitHub access scope): the sidebar i18n label override (A1), the ActionEngine visible-expression fail-open default + toast timing (A3 residual), whether the wizard renderer actually honors submitBehavior (B1, needs objectui-side verification), the "Overdue Nd" formatter applied uniformly regardless of date-field semantics (B2), the MapLibre demotiles.maplibre.org default tile style with no offline fallback (C2), Sentry telemetry retries baked into the console bundle (C3), the DOM-level chart width-collapse rendering + raw-field-name chart labels (D residual), and the AuthProvider/useAgents double-fetch caching plus bare-name component-registry warnings (E residual). All consolidated in #2620 for whoever picks up the objectui side.

Test plan

  • pnpm build — full monorepo build green (70/70 tasks)
  • pnpm test for @objectstack/metadata-protocol (3/3 files, 11/11 tests), @objectstack/driver-sql (28/28 files, 248/248 tests), @objectstack/runtime (29/29 files, 454/454 tests), @objectstack/example-showcase (8/8 files, 39/39 tests) — all passing
  • Live smoke test against a --fresh --seed-admin instance:
    • GET /api/v1/data/showcase_task?fields=title → correctly projects {title: ...} (previously crashed on any single-value fields=)
    • GET /api/v1/ai/agents200 {"agents":[]} (previously 404)
    • GET /api/v1/data/showcase_project?limit=200 → correct record count, confirming the canonical limit key CRM Workbench now uses works end-to-end
  • e2e Playwright smoke suite not runnable in this environment (vendored @object-ui/console SPA isn't present in this checkout — build logs confirm "Console dist not found"); the new Command Center smoke case and tightened width assertion should be exercised by CI where the console bundle is available

Fixes #2616


Generated by Claude Code

…h, AI 404 spam, dead-end wizard, unbound Mark Done, stuck KPI cards, offline seed images

Addresses the framework-repo-scoped items from the #2616 browser UX pass:

- REST: normalize a string `fields` query param (e.g. `?fields=name`) the
  same way `select` already is, plus a defensive array guard in the SQL
  driver — fixes "query.fields.map is not a function".
- Runtime: `GET /ai/agents` now returns `200 {agents:[]}` instead of a 404
  when no AI service is configured (the open-source default), instead of
  spamming the console on every navigation.
- Showcase pages:
  - CRM Workbench / Account Cockpit: switched off the legacy `top`/`$filter`
    query aliases (removed in 11.0) to the canonical `limit`/`where` keys,
    and stopped silently swallowing fetch errors — the KPI cards had no way
    to explain why they were stuck at 0.
  - Review Queue: dropped `showcase_mark_done` from the page toolbar — it's
    a record-scoped action with a `visible` expression that has nothing to
    evaluate against with no bound record; it already surfaces correctly
    per-row via its existing `list_item` location.
  - New Project Wizard: added an explicit `submitBehavior` so a successful
    create swaps the filled step-3 form for a confirmation panel instead of
    leaving it open to an accidental duplicate submit.
  - Seed data: replaced picsum.photos task cover URLs with local data: URI
    placeholders — Gallery/All Views no longer show broken images offline.
  - Command Center: added `stepSize: 1` to count-based chart axes, and
    added the page to the e2e smoke suite with a tightened chart-width
    assertion so a repeat of the reported chart-collapse fails CI.

Several findings from the same issue trace to the sibling objectui repo
(sidebar i18n label override, ActionEngine visibility fail-open, the
Overdue-on-start-date formatter, the MapLibre tile source, console-bundle
Sentry retries, and the chart width-collapse rendering itself) — tracked
in #2620 since that repo isn't in this session's scope.

Fixes #2616
@vercel

vercel Bot commented Jul 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jul 5, 2026 6:00am

Request Review

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 3 package(s): @objectstack/metadata-protocol, @objectstack/driver-sql, @objectstack/runtime.

18 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:

  • content/docs/ai/chatbot-integration.mdx (via @objectstack/runtime)
  • content/docs/api/index.mdx (via @objectstack/runtime)
  • content/docs/automation/hook-bodies.mdx (via @objectstack/runtime)
  • content/docs/concepts/north-star.mdx (via packages/runtime)
  • content/docs/data-modeling/drivers.mdx (via @objectstack/driver-sql, @objectstack/runtime)
  • content/docs/deployment/cloud-artifact-api.mdx (via packages/runtime)
  • content/docs/deployment/index.mdx (via @objectstack/runtime)
  • content/docs/deployment/production-readiness.mdx (via @objectstack/runtime)
  • content/docs/deployment/single-project-mode.mdx (via @objectstack/runtime)
  • content/docs/deployment/vercel.mdx (via @objectstack/runtime)
  • content/docs/getting-started/glossary.mdx (via @objectstack/driver-sql)
  • content/docs/permissions/authentication.mdx (via @objectstack/runtime)
  • content/docs/plugins/anatomy.mdx (via @objectstack/driver-sql)
  • content/docs/plugins/packages.mdx (via @objectstack/driver-sql, @objectstack/runtime)
  • content/docs/protocol/objectos/http-protocol.mdx (via @objectstack/runtime)
  • content/docs/protocol/objectos/index.mdx (via @objectstack/driver-sql, @objectstack/runtime)
  • content/docs/protocol/objectos/lifecycle.mdx (via @objectstack/driver-sql, @objectstack/runtime)
  • content/docs/releases/implementation-status.mdx (via @objectstack/driver-sql, @objectstack/runtime)

Advisory only. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs origin/main → pass the list as args.docs.

@os-zhuang os-zhuang marked this pull request as ready for review July 5, 2026 04:37
…ting-showcase-j6s7f3

# Conflicts:
#	examples/app-showcase/src/pages/account-cockpit.page.ts
@github-actions github-actions Bot added the size/m label Jul 5, 2026
@os-zhuang os-zhuang merged commit acc1542 into main Jul 5, 2026
16 checks passed
@os-zhuang os-zhuang deleted the claude/browser-ux-testing-showcase-j6s7f3 branch July 5, 2026 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Showcase 全链路浏览器 UX 测试:5 个 Bug + 交互/视觉/离线健壮性改进清单

2 participants