Skip to content

[Feature] put PowerX behind the feature gate / 将 PowerX 置于功能开关之后 - #1543

Merged
edwingao28 merged 1 commit into
masterfrom
powerx-feature-gate
Oct 28, 2026
Merged

edwingao28 merged 1 commit into
masterfrom
powerx-feature-gate

Conversation

@edwingao28

@edwingao28 edwingao28 commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

PowerX is currently a primary dashboard tab that every visitor sees. This PR puts the whole PowerX surface behind the existing ↑↑↓↓ feature gate, the same way CollectiveX, Video and AI Chart are gated.

What changes

  • /powerx moves from the primary to the feature-gated nav group. While the gate is locked it no longer appears in the desktop tab row or the mobile pill strip. Once the gate is unlocked it shows up under Hidden.
  • The AgentX point detail's PowerX view is offered only after unlock. A locked visitor who opens a shared ?view=power link still gets that view, matching how a locked gated tab still names the current page.
  • Measured-power metrics on Historical Trends were already gated (the Measured Energy metric group is gated: true), so they are not changed here.

What stays the same

  • /powerx, /zh/powerx, /powerx/tutorial and legacy redirect links still open for anyone with the URL. The gate controls discovery, not access, which is the existing semantics for gated tabs.
  • The read-only API, the views API and the inferencex-skills PowerX export are unchanged. Per AGENTS.md, a navigation gate alone does not make data sensitive, so no API or skills change is needed.
  • /powerx was already indexable: false, so the sitemap and site search are unaffected.

Risk: the change is presentation-only. Existing PowerX e2e specs run with the gate unlocked (cypress/support/e2e.ts), and the one spec that asserted PowerX's primary-tab position has been updated.

Validation details
  • Ran the tab-nav.cy.tsx component spec locally (21/21 passing). New assertions: no tab-trigger-powerx or mobile-tab-powerx while locked, and PowerX listed in the Hidden popover with href=/powerx once unlocked.
  • Unit tests: the dashboard-routes registry test fails on master (PowerX is still primary) and passes with this change. New agenticDetailViewOptions tests cover locked, unlocked and shared ?view=power links.
  • Took component screenshots of the tab nav at 1280px and 393px with the gate locked and unlocked. Shared in the requesting thread.
Not verified
  • I did not run a full next dev or preview walkthrough against live data.
  • I did not run the full Cypress e2e suite locally; I am relying on CI for it.
  • Unofficial-run overlays: the nav gate does not touch the overlay path. ?unofficialruns= forwarding on gated links is covered by the existing popover test.
AI model disclosure

Prepared with Claude Opus 5.5 (orchestrator; code, tests, and PR text). No delegated agents.

中文

PowerX 目前是所有访客都能看到的主导航标签页。本 PR 把整个 PowerX 入口放到现有的 ↑↑↓↓ 功能开关(feature gate)之后,与 CollectiveX、Video、AI Chart 的做法一致。

  • /powerx 从 primary 导航组改为 feature-gated。未解锁时,它不会出现在桌面端标签栏或移动端标签条中;解锁后会出现在“隐藏”菜单里。
  • AgentX 数据点详情中的 PowerX 视图仅在解锁后提供。如果未解锁的访客打开分享的 ?view=power 链接,仍会显示该视图。
  • Historical Trends 中的实测功耗指标原本就受开关控制,本 PR 不涉及。
  • 直接链接、分享链接和旧版重定向仍可访问。只读 API、views API 和 inferencex-skills 的 PowerX 导出都不变。开关只控制入口是否可见,不限制数据访问。
  • 本 PR 只涉及展示层。已更新唯一一个断言 PowerX 主标签位置的 e2e 用例。

Note

Low Risk
Presentation-only navigation and view-toggle gating; routes, APIs, and shared links remain accessible unchanged.

Overview
PowerX is no longer a primary dashboard tab. The /powerx route moves to the feature-gated nav group (same as CollectiveX and AI Chart), so locked visitors do not see it in the desktop tab row or mobile pill strip; after unlock it appears under Hidden.

AgentX point detail uses a new agenticDetailViewOptions helper wired to useFeatureGate: the PowerX segmented toggle is hidden when locked, shown when unlocked, and still available on a shared ?view=power link while locked (matching gated-tab “current page” behavior). Direct URLs, APIs, and chart state are unchanged—the gate only affects discovery.

Tests and docs are updated: tab-nav and profit-estimator specs no longer expect PowerX in primary tabs; registry and view-option unit tests cover the new grouping and gate rules.

Reviewed by Cursor Bugbot for commit 78287dd. Bugbot is set up for automated code reviews on this repo. Configure here.

Move the /powerx dashboard route to the feature-gated nav group so it is
listed under Hidden only after the gate is unlocked, and offer the AgentX
point detail's PowerX view on the same condition. Direct and shared links
(/powerx, /zh/powerx, ?view=power) still open; the read-only API is
unchanged.

中文:将 PowerX 置于功能开关之后。/powerx 路由改为 feature-gated 导航组,
仅在解锁后显示于“隐藏”菜单;AgentX 数据点详情中的 PowerX 视图遵循同一条件。
直接链接与分享链接(/powerx、/zh/powerx、?view=power)仍可打开,只读 API 不变。
@edwingao28
edwingao28 requested a review from adibarra as a code owner October 28, 2026 20:52
@vercel

vercel Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
inferencemax-app Ready Ready Preview Oct 28, 2026 8:54pm UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview — 78287ddd Deployed Oct 28, 2026 by vercel[bot]
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