Repository navigation
fix(ui): faithfully complete two approximated ListView filters (ADR-0017) - #28
Merged
Merged
Conversation
…017) PR #27 migrated the dashboard record-listing tables to object-bound ListViews, leaving two filters as approximations. This closes them out. content: add `my_pieces` listView + "My Pieces" tab restoring the former `my_pieces_table` widget — status IN (backlog, drafting, in_review, approved, scheduled). The original intent was (assignee == me OR assignee IS NULL); the OR branch is unrepresentable because ListView `filter` is a flat AND-only array of {field,operator,value} rules (ViewFilterRule is additionalProperties:false, no and/or group, no disjunction operator in @objectstack/spec 9.0.0). Faithfully degraded to assignee == me — matching the existing `my_drafts` convention — with the limitation documented inline. hr: add `my_pending_approvals` listView + "Awaiting My Approval" tab restoring `pending_time_off_table` — status == 'submitted' AND approver == current user. Pure AND, so reproduced exactly; distinct from the existing "Pending" tab which shows all submitted requests. Verified: pnpm -r build (excl. @objectlab/all), @objectlab/all clean+compile, and pnpm -r typecheck all pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
os-zhuang
added a commit
that referenced
this pull request
Jun 11, 2026
) docs/platform-issue-table-widget-warning.md was an untracked working-tree file that got swept into #28 by `git add -A`; it was never part of that PR's intended scope (faithful ADR-0017 ListView filters). Removing it from the templates repo. The two view changes from #28 are unaffected. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Background
PR #27 migrated the dashboard record-listing tables to object-bound ListViews (ADR-0017). Two of those migrations shipped with approximate filters because the precise semantics were awkward to express. This PR closes both out faithfully.
Does ListView
filtersupport OR / disjunction? — No.Investigated
@objectstack/spec9.0.0:json-schema/ui/ViewFilterRule.json— a rule is{ field, operator, value }withadditionalProperties: false. No nestedand/orgroup, no condition tree.view.zod(view.zod-*.d.ts) —filteris typed everywhere asz.ZodOptional<z.ZodArray<{ field, operator, value }>>. Doc comment: "declarative array-of-objects format: [{ field, operator, value }]". The array is AND-combined.or-style operator exists in the spec, and there is zero OR usage anywhere in the repo's views.Conclusion: disjunction (
A OR B) cannot be expressed in a ListView filter. Pure-AND conditions are fully expressible.Changes
(1) content —
my_pieces("My Pieces" tab)Restores the former
my_pieces_tablewidget.(assignee == me OR assignee IS NULL) AND status IN (backlog, drafting, in_review, approved, scheduled)OR assignee IS NULL(unclaimed-pickup) branch is unrepresentable — see above.assignee == me AND status IN (...). Drops only the unassigned branch; the status set is reproduced exactly. Matches the existingmy_draftsconvention (assignee == current user). The limitation is documented inline in the view file.['title','status','format','publish_at'], sortpublish_atasc.(2) hr —
my_pending_approvals("Awaiting My Approval" tab)Restores the former
pending_time_off_tablewidget.status == 'submitted' AND approver == current user— pure AND, reproduced exactly.['employee','leave_type','start_date','end_date','days','submitted_at'], sortstart_dateasc.Verification
All pass:
pnpm -r --filter='!@objectlab/all' run buildpnpm --filter @objectlab/all run clean && pnpm --filter @objectlab/all run compilepnpm -r run typecheckBoth new tabs'
view:references resolve to real listView names (my_pieces,my_pending_approvals).🤖 Generated with Claude Code