Skip to content

Conversation

@overtrue
Copy link
Collaborator

@overtrue overtrue commented Feb 4, 2026

Pull Request

Description

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test improvements
  • Security fix

Testing

  • Unit tests added/updated
  • Manual testing completed
pnpm test:run

Checklist

  • Code follows the project's style guidelines
  • Self-review completed
  • TypeScript types are properly defined
  • All commit messages are in English (Conventional Commits)
  • All existing tests pass
  • No new dependencies added, or they are justified

Related Issues

Closes #

Screenshots (if applicable)

Additional Notes

Copilot AI review requested due to automatic review settings February 4, 2026 13:39
@overtrue overtrue merged commit ca87e9e into main Feb 4, 2026
15 checks passed
@overtrue overtrue deleted the codex/status-home-redirect branch February 4, 2026 13:42
Copy link

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

This PR updates navigation/routing around the “Running Status” (/status) area and tightens dashboard access behavior, alongside a broad set of formatting-only changes.

Changes:

  • Replace the former “Performance” navigation entry with “Running Status” and map permissions to /status.
  • Add a permission-aware dashboard guard flow (fetch user policy, redirect to /403 when access is denied).
  • Improve config loading behavior (dedupe concurrent loads) and add signed fetching for server version info (used by a new sidebar version footer).

Reviewed changes

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

Show a summary per file
File Description
lib/console-permissions.ts Updates page permission mapping to use /status.
config/navs.ts Changes nav label/route from Performance → Running Status (/status).
app/(dashboard)/status/page.tsx Updates page header text to “Running Status”.
hooks/use-permissions.tsx Adds hasFetchedPolicy and exposes policy-fetching/access checks.
components/dashboard-auth-guard.tsx Enforces permission-based routing and redirects to /403.
lib/config.ts / lib/config-helpers.ts Adds promise de-duplication for config loading and signed version fetch.
components/sidebars/version.tsx / components/app-sidebar.tsx Adds sidebar footer version display using loaded config release info.
i18n/locales/*.json Adds translations for the “Running Status” label.
Comments suppressed due to low confidence (1)

hooks/use-permissions.tsx:87

  • useEffect auto-fetch condition (api && !isAdmin && !userPolicy && !isLoading) will refetch indefinitely when the account has no policy (or fetch fails and sets userPolicy back to null). Since hasFetchedPolicy is now tracked, gate the fetch on !hasFetchedPolicy (and consider resetting hasFetchedPolicy to false when api/auth changes) so a successful fetch with an empty policy does not trigger an infinite request loop.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +26 to +31
useEffect(() => {
if (!isReady || !isAuthenticated || isAdmin) return
if (!userPolicy && !isLoading) {
void fetchUserPolicy()
}
}, [isReady, isAuthenticated, isAdmin, userPolicy, isLoading, fetchUserPolicy])
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

This effect triggers fetchUserPolicy() whenever userPolicy is null and isLoading is false, which can cause repeated fetches (especially for users with no policy / failed fetch) and duplicates the fetch already performed in PermissionsProvider. Consider removing this effect or gating it with !hasFetchedPolicy (and relying on the provider to fetch) to avoid request loops and redundant calls.

Copilot uses AI. Check for mistakes.
Comment on lines +147 to +151
const credentials = getStoredSigningCredentials()
if (!credentials) {
logger.warn("Skip version config fetch: no signing credentials available")
return null
}
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

logger.warn("Skip version config fetch: no signing credentials available") will fire on any configManager.loadConfig() call before login (e.g., on the login page or first render), which can create noisy logs in normal/expected flows. Consider lowering this to debug/info, or only warning when credentials are expected (e.g., after authentication).

Copilot uses AI. Check for mistakes.
Comment on lines 37 to +58
4. Detection passes:
A. Duplication detection:
- Identify near-duplicate requirements. Mark lower-quality phrasing for consolidation.
B. Ambiguity detection:
- Flag vague adjectives (fast, scalable, secure, intuitive, robust) lacking measurable criteria.
- Flag unresolved placeholders (TODO, TKTK, ???, <placeholder>, etc.).
C. Underspecification:
- Requirements with verbs but missing object or measurable outcome.
- User stories missing acceptance criteria alignment.
- Tasks referencing files or components not defined in spec/plan.
D. Constitution alignment:
- Any requirement or plan element conflicting with a MUST principle.
- Missing mandated sections or quality gates from constitution.
E. Coverage gaps:
- Requirements with zero associated tasks.
- Tasks with no mapped requirement/story.
- Non-functional requirements not reflected in tasks (e.g., performance, security).
F. Inconsistency:
- Terminology drift (same concept named differently across files).
- Data entities referenced in plan but absent in spec (or vice versa).
- Task ordering contradictions (e.g., integration tasks before foundational setup tasks without dependency note).
- Conflicting requirements (e.g., one requires to use Next.js while other says to use Vue as the framework).
- Identify near-duplicate requirements. Mark lower-quality phrasing for consolidation.
B. Ambiguity detection:
- Flag vague adjectives (fast, scalable, secure, intuitive, robust) lacking measurable criteria.
- Flag unresolved placeholders (TODO, TKTK, ???, <placeholder>, etc.).
C. Underspecification:
- Requirements with verbs but missing object or measurable outcome.
- User stories missing acceptance criteria alignment.
- Tasks referencing files or components not defined in spec/plan.
D. Constitution alignment:
- Any requirement or plan element conflicting with a MUST principle.
- Missing mandated sections or quality gates from constitution.
E. Coverage gaps:
- Requirements with zero associated tasks.
- Tasks with no mapped requirement/story.
- Non-functional requirements not reflected in tasks (e.g., performance, security).
F. Inconsistency:
- Terminology drift (same concept named differently across files).
- Data entities referenced in plan but absent in spec (or vice versa).
- Task ordering contradictions (e.g., integration tasks before foundational setup tasks without dependency note).
- Conflicting requirements (e.g., one requires to use Next.js while other says to use Vue as the framework).
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

The Markdown list formatting under "4. Detection passes" is currently mis-indented (items B–F are nested under the preceding bullet), which makes the prompt harder to read and may change how it renders in Markdown viewers. Re-indent the A–F sections and their sub-bullets consistently (similar to how other prompt files structure nested lists).

Copilot uses AI. Check for mistakes.
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