Skip to content

Commit 521eaf9

Browse files
os-litantclaude
andauthored
fix(skills): teach {current_user_id}, not $currentUser, in the ui Filtering example (#14781)
`skills/objectstack-ui/rules/list-views.md` taught `$currentUser` as a filter value. No filter path resolves it: both resolvers recognise a placeholder only when the whole value is brace-wrapped (`FILTER_TOKEN_WRAPPED_RE` in `packages/spec/src/data/context-tokens.zod.ts`, `WHOLE_TOKEN_RE` in `@object-ui/core`), so an unbraced `$currentUser` is not even classified as a placeholder attempt — it reaches the data engine as a literal, matches nothing, and the list renders empty with no diagnostic anywhere. Rewrite the example value and its note to `{current_user_id}`, the declared token, so the rule file agrees with the package's own `## Date Macros — Filter Placeholders` contract in SKILL.md. Net -4 bytes (3011 -> 3010 tokens, ceiling 3011 unchanged). Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 82a294b commit 521eaf9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

skills/objectstack-ui/rules/list-views.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,15 @@ columns: [
9292
```typescript
9393
filter: [
9494
{ field: 'status', operator: 'not_equals', value: 'closed' },
95-
{ field: 'assigned_to', operator: 'equals', value: '$currentUser' },
95+
{ field: 'assigned_to', operator: 'equals', value: '{current_user_id}' },
9696
]
9797
```
9898

9999
Common operators: `equals`, `not_equals`, `contains`, `starts_with`,
100100
`greater_than`, `less_than`, `is_empty`, `is_not_empty`, `in`, `not_in`,
101101
`this_week`, `this_month`, `this_quarter`, `last_n_days`.
102102

103-
> **`$currentUser`** is a runtime variable — the logged-in user's ID.
103+
> **`{current_user_id}`** resolves to the signed-in user's id.
104104
105105
### End-User Quick Filters (`userFilters`, ADR-0047)
106106

0 commit comments

Comments
 (0)