Skip to content

ADR — PR #1010

2026-05-18 12:00 — Keyboard accessibility in OrganizationsList.tsx

Section titled “2026-05-18 12:00 — Keyboard accessibility in OrganizationsList.tsx”
  • Comment: CodeRabbit comment thread
  • Priority: must-fix
  • Decision: accept
  • Rationale: The headerSort helper renders a clickable that isn’t keyboard-accessible. Changed it to put a semantic

2026-05-18 12:05 — Timeout protection in OrganizationsList.tsx

Section titled “2026-05-18 12:05 — Timeout protection in OrganizationsList.tsx”
  • Comment: CodeRabbit comment thread
  • Priority: must-fix
  • Decision: accept
  • Rationale: Wrapped each fetch call in OrganizationsList.tsx with an AbortController that auto-aborts after 30 seconds to prevent hanging requests.

2026-05-18 12:10 — Timeout protection in org-member-counts.ts

Section titled “2026-05-18 12:10 — Timeout protection in org-member-counts.ts”
  • Comment: CodeRabbit comment thread
  • Priority: must-fix
  • Decision: accept
  • Rationale: Originally implemented as AbortController + signal: controller.signal passed to clerk.organizations.getOrganizationMembershipList. That parameter is not in the Clerk SDK’s GetOrganizationMembershipListParams type, so the call broke astro check. Reworked to use Promise.race(batchWork, timeoutPromise) instead — same intent (bound per-batch wall-clock time), but compatible with the SDK and type-safe. Underlying Clerk requests may continue to run after a timeout; the function returns 0 for any orgs whose response didn’t land in time.

2026-05-18 12:15 — Error handling in index.ts

Section titled “2026-05-18 12:15 — Error handling in index.ts”
  • Comment: CodeRabbit comment thread
  • Priority: must-fix
  • Decision: accept
  • Rationale: Stopped returning error.message to clients in the catch block of the organizations API handler to prevent exposing sensitive error details to clients.

2026-05-18 12:20 — Query parameter preservation in organizations.astro

Section titled “2026-05-18 12:20 — Query parameter preservation in organizations.astro”
  • Comment: CodeRabbit comment thread
  • Priority: must-fix
  • Decision: accept
  • Rationale: Updated the redirect to append Astro.url.search when present to preserve query parameters.

2026-05-18 12:25 — Query parameter preservation in [orgId].astro

Section titled “2026-05-18 12:25 — Query parameter preservation in [orgId].astro”
  • Comment: CodeRabbit comment thread
  • Priority: must-fix
  • Decision: accept
  • Rationale: Updated the redirect to URL-encode Astro.params.orgId and append Astro.url.search when present to preserve query parameters. Superseded after rebase onto staging: /organizations is canonical (no redirect needed), so the redirect-side fixes from this PR were dropped during conflict resolution.

2026-05-18 13:00 — Timeout duration in org-member-counts.ts

Section titled “2026-05-18 13:00 — Timeout duration in org-member-counts.ts”
  • Comment: CodeRabbit review on PR #1010
  • Priority: must-fix
  • Decision: accept
  • Rationale: The previously-introduced 5s timeout was too aggressive — under cold-start or rate-limit conditions Clerk’s membership endpoint can take longer than that without being stuck. Bumped to the repo-standard 30s (per .cursorrules AbortController example) to avoid spurious timeouts for the dense /organizations table.