Skip to content

feat(groups): unify list, show join date, add sort control - #53

Merged
hb-agent merged 5 commits into
stagingfrom
feat/groups-list-improvements
May 9, 2026
Merged

feat(groups): unify list, show join date, add sort control#53
hb-agent merged 5 commits into
stagingfrom
feat/groups-list-improvements

Conversation

@hb-agent

@hb-agent hb-agent commented May 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Drop the public/private membership split on /groups: a single sorted list now shows every group the user belongs to
  • Surface joinedAt from the group service on each row ("Joined Mon DD, YYYY")
  • Add a sort control (single ArrowUpDown icon next to the group count) with four modes: joined oldest first (default), joined newest first, name A→Z, name Z→A
  • Plumb joinedAt through Group type + resolveGroups
  • Remove now-unused CSS (.org-list__divider*, .org-list__accept-btn*, .org-list__remove-public-btn*) and add .org-list__item-meta, .org-list__header-right, .org-list__sort-icon-*

Out of scope

  • The navbar org switcher still sorts accepted-first; not touched here
  • Group create / add-member flows still write accepted=true PDS membership records
  • Sort preference is not persisted across page loads

Test plan

  • /groups renders one list with role-irrelevant ordering driven by the sort control
  • Default load shows oldest-joined first
  • All four sort modes reorder correctly
  • Rows with no joinedAt (legacy data) sort to the bottom of joined-* views
  • Sort icon hidden when groups.length <= 1
  • Owner row's leave button stays disabled
  • Native select menu opens on icon click and via keyboard

🤖 Generated with Claude Code

holkexyz and others added 3 commits May 9, 2026 14:31
- Drop the public/private membership split on /groups: a single sorted
  list now shows every group the user belongs to.
- Remove the per-row Accept (UserCheck) and Remove-public (UserX)
  buttons and their handlers.
- Surface the joinedAt timestamp from the group service on each row
  ("Joined Mon DD, YYYY"). Plumbed through Group type and resolveGroups.
- Drop the now-unused .org-list__divider/__accept-btn/__remove-public-btn
  styles and add a small .org-list__item-meta style for the date line.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds a dropdown above the group list with four sort modes:
joined oldest first (default), joined newest first,
name A→Z, name Z→A. Rows missing joinedAt always sort to
the bottom of joined-* views. The control is hidden when
there are 0 or 1 groups.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replaces the labeled sort dropdown below the description with a
single ArrowUpDown icon next to the group count. The native select
sits transparently on top of the icon so clicking it opens the OS
menu with the four sort options. Current mode is reflected in the
button's title attribute.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented May 9, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
certified-app Ready Ready Preview, Comment May 9, 2026 2:52pm

Request Review

@coderabbitai

coderabbitai Bot commented May 9, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e0458833-f50b-44b4-938e-7b49f44df64b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/groups-list-improvements

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Accepted items from docs/groups-list-improvements/review-round-1.md:
- Sort comparator: drop redundant lowercasing, use locale-aware
  case-insensitive comparison (sensitivity: "base").
- Decorate-sort-undecorate: parse joinedAt once per group instead
  of on every comparison, and reuse the display label.
- aria-hidden -> aria-hidden="true" on the icon for codebase
  consistency.
- Validate the SortMode value in the select onChange against the
  hardcoded option set before calling setState.
- Move the title attribute onto the <select> (so keyboard users see
  the tooltip) and surface the current mode in aria-label so screen
  readers announce it.
- Replace the dead-end "Owners can't leave the group" tooltip with
  actionable guidance pointing at group settings.
- Extract a local displayLabel const inside renderOrgItem to remove
  six repetitions of "displayName || handle".

Rejected items recorded with rationale in the same doc.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Both round-2 reviewers returned ship verdicts. Accepted items
(see docs/groups-list-improvements/review-round-2.md):

- Drop the "current: <label>" suffix from the <select>'s aria-label;
  native screen readers already announce the selected option text
  after the role, making the suffix duplicate the announcement.
  Title attribute kept for sighted keyboard/mouse users.
- Update stale "lowercased label" comment in sortedOrgs and add a
  one-liner noting that ES2019 sort stability handles equal-key ties.
- Extract isSortMode type predicate for the onChange validator;
  widen SORT_VALUES to ReadonlySet<string> so the predicate input
  is plain string and the two `as SortMode` casts go away.

Rejected items (with rationale) recorded in the same doc.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hb-agent
hb-agent marked this pull request as ready for review May 9, 2026 15:14

@claude claude 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.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@hb-agent
hb-agent merged commit 664c34d into staging May 9, 2026
3 checks passed
@holkexyz
holkexyz deleted the feat/groups-list-improvements branch May 16, 2026 09:21
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.

2 participants