feat(spec): ObjectNavItem.filters — declarative slices on the bare data surface#2626
Merged
Conversation
…ta surface Sync the framework half of objectui#2251 / objectui ADR-0055 (the /:objectName/data parameterized bare data surface shipped in objectui#2255): - spec: ObjectNavItemSchema gains optional filters (Record<string,string>, equality semantics) with JSDoc + .describe() mirroring @object-ui/types verbatim; example added; 2 new schema tests (accept filters + reject non-string values) - skills/objectstack-ui: the 'Two Run Modes' section becomes three — data mode / bare filters slice / interface page — with the decision signals, the one-sentence generation rule, and a pointer to the canonical objectui app-composition guide instead of a forked copy; nav example + item-type table updated (target precedence recordId -> filters -> viewName) - content/docs/ui/apps.mdx: Object Navigation section documents the three target fields and the filters example - changeset: minor for @objectstack/spec api-surface.json unchanged (field-level addition, no new exports). Spec suite: 6692/6692 pass. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018m3GX7EMKNPDZuee152EKK
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 94 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
os-zhuang
marked this pull request as ready for review
July 5, 2026 07:15
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.
Framework half of objectstack-ai/objectui#2251 (design: objectui ADR-0055; runtime shipped in objectstack-ai/objectui#2255). Purely additive.
Why
objectui now serves
/:objectName/data— a parameterized bare data surface where URLfilter[<field>]=<value>conditions apply over everything row-level security permits, anchored to no saved view. objectui'sresolveHrefalready serializes object nav items carryingfiltersto that route, and@object-ui/typesmirrors the field — but the authoritative contract lives here. Without the spec field, server-side validation rejects such items and AI generation has no schema basis to emit them.What
packages/spec/src/ui/app.zod.ts—ObjectNavItemSchemagains optionalfilters: z.record(z.string(), z.string())(equality semantics). JSDoc +.describe()text mirrors@object-ui/typesverbatim (one contract, two mirrors): serialization target, one-off-slice vs named-view guidance,{current_user_id}/{current_org_id}template support, and target precedencerecordId→filters→viewName. Example block added.packages/spec/src/ui/app.test.ts— two new schema tests: accepts afiltersitem, rejects non-string filter values.skills/objectstack-ui/SKILL.md— "Two Run Modes" (ADR-0047) becomes three: data mode / barefiltersslice / interface page, with a comparison table, decision signals ("drill-through / assigned-to-me link →filters, don't author a view"), the one-sentence generation rule, and a pointer to the canonical objectuiapp-compositionguide + ADR-0055 rather than a forked copy of the tables. Nav example and the item-type table updated.content/docs/ui/apps.mdx— Object Navigation section now documents the three target fields (viewName/recordId/filters) with precedence and afiltersexample, including the "not a security feature" caveat.minorfor@objectstack/spec.api-surface.jsonregenerated with no diff (field-level addition, no new exports).How AI discovers the new route (the chain this PR completes)
spec field +
.describe()(schema-driven generation reads this) → skill decision rules (when to choosefilters) → one-sentence prompt rule → objectui-side evals. objectui's three links landed in objectui#2255; this PR adds the framework links.Verification
@objectstack/specfull suite: 6692/6692 pass (incl. 2 new tests)pnpm build+gen:api-surface: clean, surface unchangedRemaining (tracked in objectui#2251)
Server-side enforcement — row-level filter injection and dropping predicates on unreadable fields (anti filter-oracle) at the API layer — is intentionally not part of this spec-sync PR.
🤖 Generated with Claude Code
https://claude.ai/code/session_018m3GX7EMKNPDZuee152EKK
Generated by Claude Code