Skip to content

fix(ui): curate admin default columns by declared flag, not field name/type - #1020

Merged
borisno2 merged 2 commits into
mainfrom
claude/focused-rubin-aqawze
Aug 22, 2026
Merged

fix(ui): curate admin default columns by declared flag, not field name/type#1020
borisno2 merged 2 commits into
mainfrom
claude/focused-rubin-aqawze

Conversation

@borisno2

Copy link
Copy Markdown
Member

Summary

  • The admin UI's default-column curation matched a hardcoded set of field names (password, createdAt, updatedAt) — over-inclusive (an unrelated field literally named createdAt was silently hidden) and under-inclusive (a credential column named anything else, e.g. Session.token, was never excluded).
  • Replaces name/type matching with a declared, presentation-only field flag: ui.listView.defaultColumn?: boolean (default true) on BaseFieldConfig (@opensaas/stack-core). Naming a field explicitly in ui.listView.initialColumns or a relationship's ui.itemView.columns always shows it regardless of the flag.
  • Collapses the previously-duplicated exclusion logic (deriveItemView.ts's related-list default columns, ListViewClient's list-view fallback, and ListTable's standalone fallback) into one shared implementation (packages/ui/src/lib/defaultColumns.ts: computeDefaultColumns / isDefaultColumnField).
  • A list's structural createdAt/updatedAt timestamp columns are now identified from the list's own timestamp configuration (db.timestamps, per-list or global) rather than by name — withStructuralTimestampDefaults bakes the flag onto those fields server-side before they cross to the client.
  • password() now sets ui.listView.defaultColumn: false by default instead of the UI matching on field type — a password field can opt back in with ui: { listView: { defaultColumn: true } } }.
  • @opensaas/stack-auth's credential-field read-deny (ADR-0036) now also declares the flag, so a read-denied credential column is curated out of the default table instead of rendering as a permanently empty column.
  • ListTable (standalone component) gains an optional fields?: Record<string, SerializableFieldConfig> prop to supply this curation metadata.

Behavior change: an application field literally named/typed password, createdAt, or updatedAt that does not declare ui.listView.defaultColumn: false (and isn't your list's actual auto-timestamp column) is no longer hidden from default admin columns purely by name/type match — this is the bug the issue reports. Real password fields and real system timestamps are unaffected.

Test plan

  • pnpm test green across core (1178), ui (609), auth (297+4 skipped), and every other workspace package
  • New unit tests: packages/ui/tests/lib/defaultColumns.test.ts, plus updated/added coverage in deriveItemView.test.ts, ListView.test.tsx, ListViewClient.test.tsx, ListTable.test.tsx, field-types.test.ts (core password()), and derive-auth-lists.test.ts (auth credential fields)
  • pnpm lint clean (no new warnings)
  • pnpm build green across all 11 packages, including the docs site (config-api.md / fields-api.md updated and link-checked)
  • pnpm manypkg fix / pnpm format — no changes needed
  • Changesets added for @opensaas/stack-core (minor), @opensaas/stack-ui (minor), @opensaas/stack-auth (patch)

Closes #1018


Generated by Claude Code

…e/type (#1018)

Replaces the hardcoded password/createdAt/updatedAt exclusion in the admin
list view, related-list tables, and ListTable with one shared curation rule
driven by each field's declared `ui.listView.defaultColumn` (core). A
list's structural createdAt/updatedAt columns are identified from its own
timestamp config rather than by name, password() sets the flag instead of
being matched by type, and auth's read-denied credential fields now declare
it too so they no longer render as permanently empty default columns.

Closes #1018

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pydn7Pah2bUAZnKCDzhvXU
@changeset-bot

changeset-bot Bot commented Aug 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 10f9b50

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@opensaas/stack-ui Minor
@opensaas/stack-auth Minor
@opensaas/stack-core Minor
@opensaas/stack-tiptap Minor
@opensaas/stack-cli Minor
@opensaas/stack-rag Minor
@opensaas/stack-storage Minor
@opensaas/stack-storage-s3 Minor
@opensaas/stack-storage-vercel Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Aug 22, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
stack-docs Ready Ready Preview Aug 22, 2026 10:55am

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cabb0c302d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/ui/src/components/ListViewClient.tsx Outdated
ListViewClient/ListTable derived the default column set from
Object.keys(fields), but fields may legitimately cover only a subset of
fieldTypes (columnField/getFieldConfig already synthesize a fallback for
any column missing an entry). A column absent from fields was silently
dropped instead of defaulting to shown. Curate off fieldTypes' own key set
instead, consulting fields[key] only for the declaration.

Found in code review of #1020 (chatgpt-codex-connector).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pydn7Pah2bUAZnKCDzhvXU
@vercel

vercel Bot commented Aug 22, 2026

Copy link
Copy Markdown

Deployment failed for project stack-docs with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/open-saas?upgradeToPro=build-rate-limit

@github-actions

Copy link
Copy Markdown
Contributor

Coverage Report for Core Package Coverage (./packages/core)

Status Category Percentage Covered / Total
🟢 Lines 94.05% (🎯 65%) 1631 / 1734
🟢 Statements 92.32% (🎯 65%) 1768 / 1915
🟢 Functions 97.41% (🎯 62%) 264 / 271
🟢 Branches 86.18% (🎯 50%) 1279 / 1484
File CoverageNo changed files found.
Generated in workflow #1797 for commit 10f9b50 by the Vitest Coverage Report Action

@github-actions

Copy link
Copy Markdown
Contributor

Coverage Report for UI Package Coverage (./packages/ui)

Status Category Percentage Covered / Total
🔵 Lines 78.45% 244 / 311
🔵 Statements 77.95% 251 / 322
🔵 Functions 69.81% 74 / 106
🔵 Branches 66.94% 160 / 239
File CoverageNo changed files found.
Generated in workflow #1797 for commit 10f9b50 by the Vitest Coverage Report Action

@github-actions

Copy link
Copy Markdown
Contributor

Coverage Report for CLI Package Coverage (./packages/cli)

Status Category Percentage Covered / Total
🔵 Lines 79% 1547 / 1958
🔵 Statements 78.81% 1615 / 2049
🔵 Functions 86.11% 217 / 252
🔵 Branches 69.66% 758 / 1088
File CoverageNo changed files found.
Generated in workflow #1797 for commit 10f9b50 by the Vitest Coverage Report Action

@github-actions

Copy link
Copy Markdown
Contributor

Coverage Report for Auth Package Coverage (./packages/auth)

Status Category Percentage Covered / Total
🔵 Lines 99.49% 196 / 197
🔵 Statements 98.13% 211 / 215
🔵 Functions 100% 45 / 45
🔵 Branches 91.26% 188 / 206
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/auth/src/config/derive-auth-lists.ts 97.4% 89.47% 100% 99.28% 240, 241, 428-430, 771
Generated in workflow #1797 for commit 10f9b50 by the Vitest Coverage Report Action

@github-actions

Copy link
Copy Markdown
Contributor

Coverage Report for Storage Package Coverage (./packages/storage)

Status Category Percentage Covered / Total
🔵 Lines 78.57% 220 / 280
🔵 Statements 80.06% 245 / 306
🔵 Functions 86.07% 68 / 79
🔵 Branches 75.88% 214 / 282
File CoverageNo changed files found.
Generated in workflow #1797 for commit 10f9b50 by the Vitest Coverage Report Action

@github-actions

Copy link
Copy Markdown
Contributor

Coverage Report for RAG Package Coverage (./packages/rag)

Status Category Percentage Covered / Total
🔵 Lines 47.97% 355 / 740
🔵 Statements 48.14% 377 / 783
🔵 Functions 54.26% 70 / 129
🔵 Branches 42.55% 180 / 423
File CoverageNo changed files found.
Generated in workflow #1797 for commit 10f9b50 by the Vitest Coverage Report Action

@github-actions

Copy link
Copy Markdown
Contributor

Coverage Report for Storage S3 Package Coverage (./packages/storage-s3)

Status Category Percentage Covered / Total
🔵 Lines 100% 40 / 40
🔵 Statements 100% 40 / 40
🔵 Functions 100% 9 / 9
🔵 Branches 100% 19 / 19
File CoverageNo changed files found.
Generated in workflow #1797 for commit 10f9b50 by the Vitest Coverage Report Action

@github-actions

Copy link
Copy Markdown
Contributor

Coverage Report for Storage Vercel Package Coverage (./packages/storage-vercel)

Status Category Percentage Covered / Total
🔵 Lines 100% 68 / 68
🔵 Statements 100% 71 / 71
🔵 Functions 100% 15 / 15
🔵 Branches 97.87% 46 / 47
File CoverageNo changed files found.
Generated in workflow #1797 for commit 10f9b50 by the Vitest Coverage Report Action

@borisno2
borisno2 merged commit 8e6707a into main Aug 22, 2026
4 of 5 checks passed
@borisno2
borisno2 deleted the claude/focused-rubin-aqawze branch August 22, 2026 11:08
@github-actions github-actions Bot mentioned this pull request Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ui: admin default-column curation excludes hardcoded field names, not access-denied fields

2 participants