Skip to content

feat(organizations): add Organization tab + rename General route to tab-addressable#4184

Merged
PierreBrisorgueil merged 4 commits into
masterfrom
feat/org-organization-tab-descriptor
May 20, 2026
Merged

feat(organizations): add Organization tab + rename General route to tab-addressable#4184
PierreBrisorgueil merged 4 commits into
masterfrom
feat/org-organization-tab-descriptor

Conversation

@PierreBrisorgueil
Copy link
Copy Markdown
Collaborator

@PierreBrisorgueil PierreBrisorgueil commented May 20, 2026

Adds the missing 'Organization' tab descriptor in config.organizations.tabs (was Billing-only post-#4175) and renames the General child route from '' to 'general' so it's addressable by SurfaceTabBar (which rejects empty-string routes via isValidTab). A redirect from the bare path preserves backward compat for deep-links to /users/organizations/:id.

Resolves user feedback item 3 (2026-05-20): 'onglet dans organization j'en vois toujours qu'un: Billing'.

Refs: docs/superpowers/plans/2026-05-20-trawl-ui-feedback-batch-v2.md PR Beta.

Summary by CodeRabbit

  • New Features
    • Added an "Organization" tab to the organization details view for accessing general organization information and settings.

Review Change Stack

Copilot AI review requested due to automatic review settings May 20, 2026 14:42
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 20, 2026

Warning

Rate limit exceeded

@PierreBrisorgueil has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 45 minutes and 5 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: a0cce483-68cc-409b-b68b-0db092b1c816

📥 Commits

Reviewing files that changed from the base of the PR and between 3b69027 and a63abc5.

📒 Files selected for processing (1)
  • src/modules/organizations/tests/organizations.config.unit.tests.js

Walkthrough

This PR adds a new "Organization" tab to the organization detail view. The config defines the tab with route general, the router redirects the empty path to that route, and all tests are updated to verify the tab appears first and navigation works correctly.

Changes

Organization Tab Addition

Layer / File(s) Summary
Organization Tab Configuration
src/modules/organizations/config/organizations.development.config.js
Adds a new organization tab entry with label "Organization", icon fa-solid fa-building, route reference general, and CASL permissions action: 'read' and subject: 'Organization'.
Router Default Redirect to General Route
src/modules/organizations/router/organizations.router.js
Adds a default child route (path: '') that redirects to the named route Account Organization General, ensuring navigation to the organization detail path lands on the general tab.
Configuration Unit Tests
src/modules/organizations/tests/organizations.config.unit.tests.js
Adds tests verifying the organization tab is first in the tab list, the billing tab still exists with route billing, and updates visibility assertions to allow multiple tabs while confirming billing remains present. Includes explanatory comment for CASL-gated filtering.
Router Unit Tests
src/modules/organizations/tests/organizations.router.unit.tests.js
Adds new test suite verifying the "Account Organization" route contains an "Account Organization General" child with exact path general, and a redirect child at path '' that redirects to the named route.
Layout and Integration Tests
src/modules/organizations/tests/organizations.detail.layout.unit.tests.js
Mocks the new "Organization" tab in test config fixtures, verifies CoreSurfaceTabBar receives both tabs in order ['organization', 'billing'], and updates router integration assertions to validate the general child route's props function maps organizationId correctly.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • pierreb-devkit/Vue#4175: Both PRs update src/modules/organizations/router/organizations.router.js to redirect the organization detail's default nested child (path: '') to the "Account Organization General" route, with aligned test expectations.
  • pierreb-devkit/Vue#4170: This PR builds on the surface-tabs and router child route conventions established in #4170, applying the same patterns to add the organization tab.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is incomplete relative to the template: it lacks Summary section structure, Scope details, Validation checklist, Guardrails checks, and Optional infra/stack alignment sections. Fill in all required sections from the description template: Summary (What changed/Why/Related issues), Scope, Validation checklist items, Guardrails checks, and Notes for reviewers.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the two main changes: adding the Organization tab and renaming the General route to be tab-addressable.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/org-organization-tab-descriptor

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.

coderabbitai[bot]
coderabbitai Bot previously requested changes May 20, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/modules/organizations/tests/organizations.config.unit.tests.js`:
- Around line 55-58: The test currently only asserts that the 'billing' tab is
present when can() always returns true; update the assertions in the test (using
the result array produced in the test) to explicitly assert that both entries
with value 'organization' and 'billing' exist (e.g., check result.find(t =>
t.value === 'organization') and result.find(t => t.value === 'billing') are
defined), ensuring the test fails if either tab is missing.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 051f170a-bd71-4e67-b678-5669d70b23d6

📥 Commits

Reviewing files that changed from the base of the PR and between 9f5bdc1 and 3b69027.

📒 Files selected for processing (5)
  • src/modules/organizations/config/organizations.development.config.js
  • src/modules/organizations/router/organizations.router.js
  • src/modules/organizations/tests/organizations.config.unit.tests.js
  • src/modules/organizations/tests/organizations.detail.layout.unit.tests.js
  • src/modules/organizations/tests/organizations.router.unit.tests.js

Comment thread src/modules/organizations/tests/organizations.config.unit.tests.js Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.55%. Comparing base (dc2504a) to head (a63abc5).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4184   +/-   ##
=======================================
  Coverage   99.55%   99.55%           
=======================================
  Files          31       31           
  Lines        1136     1136           
  Branches      328      328           
=======================================
  Hits         1131     1131           
  Misses          5        5           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown

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

Adds an explicit Organization tab to the organization settings surface and makes the “General” child route tab-addressable (non-empty path) so it can be selected by SurfaceTabBar, while preserving backward compatibility via a redirect from the bare org settings URL.

Changes:

  • Add organization tab descriptor to config.organizations.tabs (before billing).
  • Change the organization “General” child route from path: '' to path: 'general', and add a '' -> general redirect.
  • Extend/adjust unit tests to cover the new tab + routing behavior.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/modules/organizations/router/organizations.router.js Adds default-child redirect and makes General a named, non-empty child path (general).
src/modules/organizations/config/organizations.development.config.js Adds the missing organization tab descriptor ahead of billing.
src/modules/organizations/tests/organizations.router.unit.tests.js New unit tests for the updated child path and redirect.
src/modules/organizations/tests/organizations.detail.layout.unit.tests.js Updates layout tests to expect both Organization + Billing tabs and updated general child path.
src/modules/organizations/tests/organizations.config.unit.tests.js Updates config tests for the new tab and CASL filtering behavior.

});

test('Account Organization has a redirect from "" to General', () => {
const parent = routes.find((r) => r.name === 'Account Organization');
Comment on lines 52 to 58
it('resolveSurfaceTabs returns billing tab when can("manage","Organization") is true', () => {
const tabs = organizationsDefaultConfig.organizations.tabs;
const result = resolveSurfaceTabs(tabs, () => true);
expect(result).toHaveLength(1);
expect(result[0].value).toBe('billing');
// Both organization (read) and billing (manage) are visible when can() always returns true
expect(result.length).toBeGreaterThanOrEqual(1);
expect(result.find((t) => t.value === 'billing')).toBeDefined();
});
Comment on lines 50 to +56
// Default child: native org-settings sections (Details, Roles, Members,
// Invite, Pending Requests). Downstream child modules (e.g. billing)
// are injected via organizationChildModules in app.router.js.
children: [
{
// Redirect bare /users/organizations/:id → :id/general so SurfaceTabBar
// descriptors with `route: 'general'` resolve correctly.
@PierreBrisorgueil PierreBrisorgueil dismissed coderabbitai[bot]’s stale review May 20, 2026 14:59

Addressed in commit a63abc5 — tightened test assertion to toHaveLength(2) + explicit organization+billing find()

@PierreBrisorgueil PierreBrisorgueil merged commit fdfbf0b into master May 20, 2026
7 checks passed
@PierreBrisorgueil PierreBrisorgueil deleted the feat/org-organization-tab-descriptor branch May 20, 2026 15:02
PierreBrisorgueil pushed a commit that referenced this pull request Jun 1, 2026
# [2.1.0](v2.0.0...v2.1.0) (2026-06-01)

### Bug Fixes

* **billing:** 4 pricing page bugs (signed-in features, hero bg, truncation, guest CTA) ([#4123](#4123)) ([bd399bd](bd399bd))
* **billing:** add aria-expanded + touch support to BillingComputeGauge components ([#4181](#4181)) ([7e7fa97](7e7fa97))
* **billing:** billing UX hardening — 5 reliability fixes ([#4079](#4079)) ([dd62b3d](dd62b3d)), closes [#4078](#4078)
* **billing:** canonical FA6 icons + meterError lifecycle + reject URL credentials ([#4082](#4082)) ([be16045](be16045)), closes [#4081](#4081)
* **billing:** clear intentId on Stripe cancel-redirect ([#4085](#4085)) ([11be9ab](11be9ab))
* **billing:** drop empty overage aria-live div + add fr overDetail key ([#4142](#4142)) ([10e5d81](10e5d81))
* **billing:** i18n migration + Intl.NumberFormat USD (audit Codex P1) ([#4069](#4069)) ([3d3a4f6](3d3a4f6))
* **billing:** mega vue hardening v3 — UX + design + a11y + V4 ([#4063](#4063)) ([802cbc4](802cbc4))
* **billing:** send {} body on portal POST to satisfy Zod PortalRequest schema ([#4137](#4137)) ([bf6b9c8](bf6b9c8))
* **billing:** send intentId UUID to close extras double-charge window ([#4084](#4084)) ([3e27c4c](3e27c4c))
* **billing:** subscription state safety + webhook lag polling (audit Codex P1) ([#4068](#4068)) ([328700b](328700b))
* **billing:** surface meterError + remove dead 409 dialog from subscriptions ([#4081](#4081)) ([61f5d53](61f5d53))
* **billing:** V5 polish — F5 polling recovery + visibility refetch + i18n residual + locale null-guard ([#4070](#4070)) ([4908adb](4908adb))
* **billing:** V6 polish — sessionStorage guard + locale BCP47 + i18n plural + NaN guard ([#4076](#4076)) ([2ad018c](2ad018c))
* **build:** drop ARG defaults for analytics_* + filter empty env vars ([#4112](#4112)) ([afd336e](afd336e)), closes [Vue#4110](https://github.com/Vue/issues/4110) [#4110](#4110)
* **build:** restore Layer 5 empty-string env override (revert [#4112](#4112) part 2) ([c9aa9e6](c9aa9e6)), closes [Vue#4110](https://github.com/Vue/issues/4110) [comes-io/trawl_vue#880](https://github.com/comes-io/trawl_vue/issues/880) [Vue#4110](https://github.com/Vue/issues/4110)
* **core:** pin CorePageHeader to content size in flex-column contexts ([#4210](#4210)) ([e182512](e182512)), closes [#4202](#4202)
* **layout:** route /pricing outside app shell — no drawer offset on signed-in ([#4124](#4124)) ([d862fbb](d862fbb))
* **legal:** cookie banner UA-detection + appName fallback to app.title ([#4113](#4113)) ([04cc70a](04cc70a)), closes [trawl_vue#876](https://github.com/trawl_vue/issues/876) [#4109](#4109)
* **legal:** cookie consent + footer polish (5 QA bugs) ([#4098](#4098)) ([a9bf0a3](a9bf0a3))
* **legal:** gate cookie banner on isMounted to prevent prerender hydration double-render ([#4109](#4109)) ([3198e48](3198e48)), closes [#app](https://github.com/pierreb-devkit/Vue/issues/app)
* **router:** redirect authenticated users to config.sign.route instead of hardcoded '/' ([#4088](#4088)) ([ca9094e](ca9094e)), closes [#4083](#4083)
* **tasks:** propagate store errors so views gate navigation on success ([#4221](#4221)) ([b029d39](b029d39)), closes [#4218](#4218)
* **ui:** chrome convergence — restore section title + surface backgrounds + homogeneous gutter ([#4188](#4188)) ([1e5fdf1](1e5fdf1))
* **users:** re-apply route tab when serverConfig.billing arrives async ([#4138](#4138)) ([87cc7b2](87cc7b2))
* **users:** refetch billing subscription on auth state change ([#4125](#4125)) ([5a3425a](5a3425a))

### Features

* **admin:** invitations management tab ([#4217](#4217)) ([61ad86c](61ad86c)), closes [invitedBy/#actions](https://github.com/pierreb-devkit/Vue/issues/actions)
* **analytics:** add identify and reset helpers, wire auth store ([#4104](#4104)) ([c4d8b87](c4d8b87))
* **auth:** invite-gated signup UI ([#4212](#4212)) ([d17a841](d17a841))
* **billing:** add 'Manage subscription' footer link in meterDrawer ([#4056](#4056)) ([#4057](#4057)) ([7d494af](7d494af))
* **billing:** align packs.component on BillingCardComponent (V4 unified schema) ([#4147](#4147)) ([7f5dd41](7f5dd41))
* **billing:** combined pool gauge + linear breakdown bars + alerts cleanup ([f5034b1](f5034b1))
* **billing:** config-driven static-content resolver (no file replace) ([e95d944](e95d944))
* **billing:** expose netRemainingRaw + overage in useMeter for negative quota display ([#4061](#4061)) ([111e64b](111e64b)), closes [#4060](#4060)
* **billing:** meter gauges display % primary, compute units in overflow tooltip ([#4139](#4139)) ([50498ba](50498ba))
* **billing:** meter UX refonte — drop drawer + subscriptions tab ([#4059](#4059)) ([891b5ae](891b5ae)), closes [#subscriptions](https://github.com/pierreb-devkit/Vue/issues/subscriptions) [#1](#1) [#2](#2) [#3](#3) [#4](#4)
* **billing:** post-grant upgrade prompt variant for depleted signupGrant ([#4128](#4128)) ([0ae8558](0ae8558))
* **billing:** pricing page redesign — multi-mode + auto-savings + sectioned features + FAQ ([#4102](#4102)) ([2c83ab6](2c83ab6))
* **billing:** pricingCard Free CTA — 'Sign up' for guests, route to /signup ([#4106](#4106)) ([cc92ac8](cc92ac8))
* **billing:** redesign Subscriptions view to match user-tabs aesthetic ([#4127](#4127)) ([15fd466](15fd466))
* **billing:** relocate billing under Organization settings ([#4175](#4175)) ([1f36137](1f36137))
* **billing:** sidenav compute gauge above sign-out row (meter mode) ([#4126](#4126)) ([fe1497f](fe1497f))
* **billing:** sidenav compute gauge redesign — button-shape above sign-out row ([#4140](#4140)) ([9d3a090](9d3a090))
* **billing:** sidenav compute gauge revamp — v-progress-circular + v-tooltip ([#4144](#4144)) ([5d60f1b](5d60f1b)), closes [#prepend](https://github.com/pierreb-devkit/Vue/issues/prepend)
* **billing:** subscriptions view 2-col layout — drop dup bar, CTA to /pricing#units ([#4141](#4141)) ([b7ef516](b7ef516)), closes [pricing#units](https://github.com/pricing/issues/units)
* **billing:** unified BillingCardComponent + annual toggle disabled state ([#4146](#4146)) ([474bb11](474bb11))
* **billing:** unified BillingCardComponent + annual toggle disabled state ([#4149](#4149)) ([d1403ff](d1403ff))
* **billing:** v4 hardening + Phase 3 polish — equivalences chips + UX gaps + a11y ([#4066](#4066)) ([dd40b2a](dd40b2a))
* **billing:** wire netRemainingRaw + overage into devkit components ([#4062](#4062)) ([61d6897](61d6897)), closes [#4061](#4061)
* **core:** reusable PageTabs component + Account view refactor ([#4183](#4183)) ([dc2504a](dc2504a))
* **core:** unified logo+title lockup in header and sidenav ([#4086](#4086)) ([ec457db](ec457db)), closes [#4083](#4083)
* **feature:** read ERRORS.md in Phase 0 before coding ([#4089](#4089)) ([ddf8f60](ddf8f60))
* **legal:** Add legal module + cookie consent (RGPD) ([#4097](#4097)) ([595e6c4](595e6c4)), closes [#3204116570](https://github.com/pierreb-devkit/Vue/issues/3204116570) [#3204116650](https://github.com/pierreb-devkit/Vue/issues/3204116650) [#1](#1) [#19](#19) [#18](#18) [#13](#13) [#11](#11) [#18](#18) [#3](#3) [#10](#10) [#12](#12) [#14](#14) [#15](#15) [#17](#17) [#20](#20) [#4](#4) [#5](#5) [#6](#6) [#7](#7) [#8](#8) [#9](#9) [#16](#16) [#3](#3) [#16](#16) [#22](#22)
* **legal:** liquid glass cookie banner — Vuetify-only with friendlier copy ([#4115](#4115)) ([3d74789](3d74789)), closes [#4114](#4114)
* **monitoring:** single-source PostHog Error Tracking (drop Sentry) ([#4118](#4118)) ([82dfca6](82dfca6))
* **organizations:** add Organization tab + rename General route to tab-addressable ([#4184](#4184)) ([fdfbf0b](fdfbf0b))
* **organizations:** soft suggestedJoin onboarding banner + recovery-screen copy ([#4176](#4176)) ([25a3ceb](25a3ceb))
* **seo:** enrich seoInjectPlugin — multi-schemas + rich SoftwareApplication + themeColor ([#4092](#4092)) ([#4111](#4111)) ([7f8bd09](7f8bd09))
* **skill/feature:** add Phase 0.0 issue claim-on-start ([#4117](#4117)) ([a582430](a582430)), closes [pierreb-projects/infra#28](https://github.com/pierreb-projects/infra/issues/28)
* **skills/update-stack:** block on undeclared drift vs upstream ([#4228](#4228)) ([ab8ee68](ab8ee68)), closes [#4227](#4227)
* **users:** subs full-width + delete account danger zone + halo full-bleed fix ([#4143](#4143)) ([981f073](981f073))
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