Skip to content

Roles: expandable row to manage users; log terminal polish#247

Open
argha-dot wants to merge 1 commit into
developfrom
fix/worksapce-permissions-bs
Open

Roles: expandable row to manage users; log terminal polish#247
argha-dot wants to merge 1 commit into
developfrom
fix/worksapce-permissions-bs

Conversation

@argha-dot

Copy link
Copy Markdown
Collaborator

Summary

  • New RoleUsersChips component lets you view, add, and remove users on a role inline from the roles table (row expand). Guarded so we never POST a role-replace before the members list has loaded — avoids accidentally wiping a user's other roles.
  • Initials gains an optional bgColor prop so chips can theme the avatar bubble.
  • Log terminal polish: drop the line-number gutter, add a Download logs button that exports the current buffer as .log.
  • Drop the sessionStorage permissions cache in useUserPermissionsQuery — TanStack Query's gcTime already covers this and the shim could go stale across nav.
  • Ignore *.db-journal (SQLite WAL companion).

Notes

  • Backend has no single-role add/remove endpoint, so the chip add/remove flow does a full role-set replace on POST /rbac/user/:userId. TODO comment in the component points at the eventual fix.
  • Inner flex ratios in the new role row must stay in sync with the parent Table's column_grids; comment added.

Test plan

  • Roles list renders, "See users" expands and shows current users on the role
  • Adding a user via the search input attaches the role without losing their other roles
  • Removing a user via the chip X removes only that role
  • If members fetch fails, add/remove buttons stay disabled and a toast surfaces
  • Log terminal: line numbers gone; Download logs produces a .log with ts<TAB>message per line
  • First load after sign-in: permissions resolve and gated UI doesn't get stuck in a "no access" state

🤖 Generated with Claude Code

- new RoleUsersChips component to add/remove users on a role inline,
  guarded against firing a role-replace POST before members data lands
- Initials gains an optional bgColor prop for chip use
- log terminal: drop line-number gutter, add a download-logs button
- drop the sessionStorage permissions cache; rely on TanStack gcTime
- ignore *.db-journal
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.

1 participant