Skip to content

feat(sidebar): add Billing & usage shortcut to the nav section#3159

Open
robertoecf wants to merge 2 commits into
PostHog:mainfrom
robertoecf:posthog-code/billing-sidebar-item
Open

feat(sidebar): add Billing & usage shortcut to the nav section#3159
robertoecf wants to merge 2 commits into
PostHog:mainfrom
robertoecf:posthog-code/billing-sidebar-item

Conversation

@robertoecf

Copy link
Copy Markdown

What

Adds a "Billing & usage" item to the sidebar nav section, below Command Center. Clicking it opens Settings at the existing Plan & usage page (openSettings("plan-usage")), and the item stays highlighted while /settings/plan-usage is the active route.

Why

Plan & usage is the page users check to see how much of their monthly/daily allowance is left, but today it is only reachable by opening Settings and scanning the category list. A one-click shortcut in the nav puts usage where users already look.

Notes

  • Gated by the existing BILLING_FLAG, same as the other billing surfaces, so it only shows for users in the billing rollout.
  • Hidden in the Channels space: settings have no /website mirror, matching how other unmirrored destinations are handled.
  • No new route or view; it reuses the settings page as-is. packages/ui typecheck and Biome pass; no generated files touched.

Created with PostHog Code

Plan & usage is only reachable by opening Settings and scanning the
category list. Add a sidebar item below Command Center that opens
Settings at plan-usage directly, highlighted while that route is
active. Gated by the existing billing flag, and hidden in the
Channels space (settings have no /website mirror).

Generated-By: PostHog Code
Task-Id: 7264767a-3409-47d1-8a94-507c8bdef292
@trunk-io

trunk-io Bot commented Jul 6, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@greptile-apps

greptile-apps Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Comments Outside Diff (1)

  1. packages/ui/src/features/sidebar/components/SidebarNavSection.tsx, line 164-176 (link)

    P2 The CommandCenterItem Box carries mb="2" which was previously the bottom padding for the last item in the list. Now that BillingItem can follow it, that margin becomes extra vertical spacing between just those two adjacent items — inconsistent with the gap between all other consecutive items (Skills→MCP Servers, etc.). Consider moving mb to the BillingItem wrapper when it is the last item, or dropping it from CommandCenterItem if the outer padding already handles the bottom gap.

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Reviews (1): Last reviewed commit: "feat(sidebar): add Billing & usage short..." | Re-trigger Greptile

Comment thread packages/ui/src/features/sidebar/components/items/BillingItem.tsx Outdated
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
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