Skip to content

fix(signage-manager): keep group selection and lists stable - #533

Merged
MrYuion merged 2 commits into
developfrom
fix/signage-manager-groups
Oct 2, 2026
Merged

MrYuion merged 2 commits into
developfrom
fix/signage-manager-groups

Conversation

@MrYuion

@MrYuion MrYuion commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

On the groups page:

  • Mobile back: an auto-select effect undid a cleared selection, so mobile users could never get back to the group list.
  • Saves reset lists: every save reset the group lists, so the selection jumped, the tree collapsed and permission checks briefly read false.
  • User search modal: a failed user search broke the modal.
  • Silent share failures: a failed share showed nothing.
  • No route guard: non-managers could open /groups directly.
  • Missing records: users and zones stopped at the first page.
  • Accessibility: problems in the tabs and breadcrumbs.

Changes

  • Auto-select: opens the first group only once. A deleted selection clears.
  • Reloads: lastLoaded() keeps group, user, zone and feature lists while they reload, or when a reload fails. The tree shows an error when the list never loaded.
  • Errors: the user-select modal has loading and error states. shareItems notifies and returns false. Save failures notify without rejecting.
  • Tree: built from the loaded index. expansionKey keeps aria-level correct.
  • Route guard: manageGroupsGuard on /groups. It lets the user through when groups fail to load, so the page can retry.
  • All records: users and zones read every page.
  • One request: admins send one shared groups request.
  • Accessibility and cleanup: tablist with arrow, Home and End keys, breadcrumb label, a translated "Parent group", and a shared permission-labels component.

Testing

  • Unit tests for each fix, several with the real admin and context services. Each fails without its fix.
  • nx test signage-manager and nx build signage-manager pass.
  • Local PlaceOS stack, with 205 users and zones seeded: mobile back; no flash during saves; delete; user search error; share error; the guard; reload failure keeps state; aria-level; one request.

Notes

  • The backend's paged next link uses offset = limit + 1, so one record is skipped every 200. That needs a backend fix.

Independent of the other signage PRs from this review. Based on develop.


Changes made by Claude Opus 5.5 (1M context) in Claude Code, running in T3 Code.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Oct 2, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
frontend-templates Ignored Ignored Oct 2, 2026 3:15am UTC

@greptile-apps

greptile-apps Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Refactors group selection and list stability in the signage manager.

The PR appears safe to merge based on the changes reviewed since the previous review.

Summary

The signage groups page now keeps selections and lists steady while data reloads, and gives clearer results when access checks, searches, or saves fail. It also loads complete lists and makes the group tools easier to use with a keyboard.

  • Builds the group tree from loaded groups and preserves the selection during reloads.
  • Loads every page of group, user, and zone records.
  • Adds a route guard and visible loading and error states.
  • Improves keyboard access and translated labels.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Signed-in user] --> B[Shared group request]
  B --> C[Group resources]
  C --> D[Last loaded lists]
  D --> E[Group tree and panels]
  C --> F[Load error state]
Loading

Reviews (2) · Last reviewed commit: "fix(signage-manager): open the first gro..."

Comment thread apps/signage-manager/src/app/groups/signage-group-admin.service.ts Outdated
@greptile-apps

This comment has been minimized.

@MrYuion

MrYuion commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator Author

Re Loaded rows disappear on failure (signage-group-admin.service.ts:179, outside the diff): fixed in 8739c8a. A failed users or zones read now keeps the rows already shown for that group and marks the list as failed. The panel shows the load error above the kept rows. Add stays disabled while the list may be stale, because the add dialog uses it to exclude existing members. Tests: "keeps the users on screen when their reload fails" and "shows the load error above the rows it kept".

@vercel

vercel Bot commented Oct 2, 2026

Copy link
Copy Markdown

Deployment failed for project frontend-templates 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/placeos?upgradeToPro=build-rate-limit

@MrYuion

MrYuion commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator Author

LGTM

- Open the first group once, so clearing the selection on mobile works.
- Keep group, user and zone lists while they reload or fail to reload.
- Show loading and error states in the user search modal.
- shareItems reports a failure instead of rejecting.
- Build the group tree from the loaded index and keep row levels.
- Guard the groups page, read every page of users and zones, and send
  one shared group request for admins.
- Accessibility and translation fixes for tabs, breadcrumbs and labels.
…on failed reloads

- The first group opens once per signed-in account, so switching
  accounts opens the new account's first group while a cleared
  selection stays cleared for the same account.
- The shared group request is keyed by user as well, so a new account
  no longer gets the previous account's cached groups.
- A failed users or zones reload keeps the rows already shown and shows
  the error above them.
@MrYuion
MrYuion force-pushed the fix/signage-manager-groups branch from 8739c8a to 2814636 Compare October 2, 2026 05:46
@MrYuion
MrYuion merged commit 9ef13b1 into develop Oct 2, 2026
1 of 2 checks passed
@MrYuion
MrYuion deleted the fix/signage-manager-groups branch October 2, 2026 05:58
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