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
Conversation
…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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 3 package(s): 18 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
…ting-showcase-j6s7f3 # Conflicts: # examples/app-showcase/src/pages/account-cockpit.page.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the framework-repo-scoped bugs and improvements found in #2616's full-chain browser UX pass over the showcase app.
packages/metadata-protocol/src/protocol.ts: normalize a stringfieldsquery param (e.g.?fields=name) the same wayselectalready is, soGET /api/v1/data/showcase_task?fields=nameno longer crashes withquery.fields.map is not a function. Also added a defensiveArray.isArrayguard inpackages/plugins/driver-sql/src/sql-driver.ts's SELECT clause.packages/runtime/src/http-dispatcher.ts:GET /ai/agentsnow returns200 {agents:[]}instead of a 404 when no AI service is configured (the open-source default), instead of spamming the console on every navigation.top/$filterquery aliases (removed in 11.0 per the canonicalQueryOptionsV2contract) tolimit/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.showcase_mark_donefrom 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 existinglist_itemlocation.submitBehavior: {kind:'thank-you', ...}, matching the pattern already used incontact.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.picsum.photostask cover URLs with localdata:image/svg+xmlplaceholders (colored by task status) — Gallery/All Views no longer show a wall of broken images in offline/restricted-network environments.stepSize: 1to 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>0to>200so a repeat of the reported ~130px chart-width collapse fails CI.Out of scope (tracked in #2620)
Several #2616 findings trace to the sibling
objectuirepo (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 ActionEnginevisible-expression fail-open default + toast timing (A3 residual), whether the wizard renderer actually honorssubmitBehavior(B1, needs objectui-side verification), the "Overdue Nd" formatter applied uniformly regardless of date-field semantics (B2), the MapLibredemotiles.maplibre.orgdefault 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 theAuthProvider/useAgentsdouble-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 testfor@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--fresh --seed-admininstance:GET /api/v1/data/showcase_task?fields=title→ correctly projects{title: ...}(previously crashed on any single-valuefields=)GET /api/v1/ai/agents→200 {"agents":[]}(previously404)GET /api/v1/data/showcase_project?limit=200→ correct record count, confirming the canonicallimitkey CRM Workbench now uses works end-to-end@object-ui/consoleSPA isn't present in this checkout — build logs confirm "Console dist not found"); the newCommand Centersmoke case and tightened width assertion should be exercised by CI where the console bundle is availableFixes #2616
Generated by Claude Code