Skip to content

[studio] Remove admin column from list of users #1884#1889

Merged
janavlachova merged 4 commits into
mainfrom
1884-studio-remove-admin-column-from-list-of-users
May 31, 2026
Merged

[studio] Remove admin column from list of users #1884#1889
janavlachova merged 4 commits into
mainfrom
1884-studio-remove-admin-column-from-list-of-users

Conversation

@janavlachova
Copy link
Copy Markdown
Collaborator

No description provided.

Add a Vitest contract (app/src/boundaries.contract.spec.ts) to assert the ESLint boundary config and catch accidental rule changes. Update README with architecture boundary docs and practical pnpm lint commands. Change app and root package.json scripts to expose local/full/check variants and run the lint-boundaries script from the studio root. Improve app/scripts/lint-boundaries.mjs to forward CLI args correctly (ignore --filter) and provide a default --max-warnings=0 target. Tighten boundary rules by removing the temporary query->db exception in eslint.boundaries.mjs.
Add icon support and metadata to table columns and cells, and ensure admin users are surfaced first. Key changes:

- AgdbCell: use a safe computed rowValue, add leading icon/title/class resolvers, render icon next to cell content with styling.
- types.ts: introduce icon, iconResolver, iconTitle, iconTitleResolver, iconClass, and iconClassResolver on Column.
- tableData: simplify data population by storing row objects directly and preserving keys when generating row keys.
- AgdbTableRow: compute cell keys from columns map instead of object keys.
- userConfig: import crown icon and add iconResolver/title/class for the username column; remove separate admin column.
- userStore: sort fetched users by admin status (admins first) and then by username.
- Tests and styles: update user tests to expect admin-first ordering and crown icon behavior; add CSS for crown color. Also add a ts-expect-error to handle importing an mjs boundary config in a spec.

These changes enable per-row icon rendering, keep table data consistent, and prioritize admin users in listings.
@janavlachova janavlachova self-assigned this May 31, 2026
Copilot AI review requested due to automatic review settings May 31, 2026 13:36
@janavlachova janavlachova linked an issue May 31, 2026 that may be closed by this pull request
@vercel
Copy link
Copy Markdown

vercel Bot commented May 31, 2026

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
agdb Skipped Skipped May 31, 2026 1:55pm

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the explicit Admin column in Studio’s user table and represents admin status with a crown icon next to usernames, while adding supporting table-cell icon capabilities and boundary-lint script updates.

Changes:

  • Adds configurable table cell icons and preserves extra row fields for resolver logic.
  • Updates user list sorting/display so admin users appear first and receive a crown icon.
  • Refactors lint boundary scripts/docs and adds boundary contract tests.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
agdb_studio/README.md Documents lint boundary commands and architecture rules.
agdb_studio/package.json Updates Studio root lint scripts.
agdb_studio/app/package.json Adds local/full lint check scripts and simplifies boundary script commands.
agdb_studio/app/scripts/lint-boundaries.mjs Normalizes forwarded args and applies default ESLint warning policy.
agdb_studio/eslint.boundaries.mjs Removes query-to-db boundary exception.
agdb_studio/app/src/boundaries.contract.spec.ts Adds tests for boundary rule structure.
agdb_studio/libs/features/common/src/composables/table/types.ts Adds optional column icon configuration fields.
agdb_studio/libs/features/common/src/composables/table/tableData.ts Keeps full row data while storing table rows.
agdb_studio/libs/features/common/src/components/table/AgdbTableRow.vue Renders cells from configured columns instead of row keys.
agdb_studio/libs/features/common/src/components/table/AgdbCell.vue Renders optional per-cell icon content.
agdb_studio/libs/features/user/src/composables/userStore.ts Sorts users with admins first, then username.
agdb_studio/libs/features/user/src/composables/userConfig.ts Removes Admin column and adds crown icon resolver to username column.
agdb_studio/libs/features/user/src/components/UserTable.vue Adjusts table width and crown icon styling.
agdb_studio/libs/features/user/src/**/*.spec.ts Updates/adds tests for admin sorting and crown icon behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread agdb_studio/libs/features/user/src/composables/userStore.ts Outdated
Comment thread agdb_studio/README.md Outdated
Refactor fetchUsers to await client.value?.admin_user_list() and return early if the response is falsy to avoid runtime errors when the API yields undefined. Keep existing sorting by admin status and username. Add a unit test ensuring users remain unchanged when admin_user_list resolves to undefined. Also update README wording to recommend running lint:boundaries from the repository root.
@janavlachova janavlachova enabled auto-merge (squash) May 31, 2026 13:55
@janavlachova janavlachova merged commit f521f44 into main May 31, 2026
4 checks passed
@janavlachova janavlachova deleted the 1884-studio-remove-admin-column-from-list-of-users branch May 31, 2026 13:55
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.

[studio] Remove admin column from list of users

3 participants