From 601f01ef99e8c8bceaef68d124a528942b28efff Mon Sep 17 00:00:00 2001 From: overtrue Date: Wed, 4 Feb 2026 08:18:59 +0800 Subject: [PATCH 1/8] feat: move status route and format repo --- .github/ISSUE_TEMPLATE/bug_report.md | 6 +- .github/ISSUE_TEMPLATE/feature_request.md | 6 +- .github/prompts/analyze.prompt.md | 63 ++-- .github/prompts/clarify.prompt.md | 89 ++--- .github/prompts/constitution.prompt.md | 9 +- .github/prompts/implement.prompt.md | 2 +- .github/prompts/plan.prompt.md | 6 +- .github/prompts/specify.prompt.md | 2 +- .github/prompts/tasks.prompt.md | 10 +- .github/workflows/build.yml | 6 +- .github/workflows/quality.yml | 9 +- AGENTS.md | 1 + app/(auth)/auth/login/page.tsx | 7 +- app/(auth)/config/page.tsx | 64 +--- app/(auth)/layout.tsx | 6 +- app/(dashboard)/403/page.tsx | 44 +-- .../_components/performance-backend-card.tsx | 40 +- .../performance-infrastructure-card.tsx | 54 +-- .../_components/performance-server-list.tsx | 72 +--- .../_components/performance-summary-cards.tsx | 37 +- .../_components/performance-usage-card.tsx | 44 +-- app/(dashboard)/access-keys/page.tsx | 47 +-- .../browser/[bucket]/[[...key]]/page.tsx | 16 +- app/(dashboard)/browser/page.tsx | 19 +- app/(dashboard)/buckets/[key]/page.tsx | 12 +- app/(dashboard)/events-target/page.tsx | 57 +-- app/(dashboard)/events/page.tsx | 111 ++---- app/(dashboard)/import-export/page.tsx | 113 ++---- app/(dashboard)/layout.tsx | 6 +- app/(dashboard)/lifecycle/page.tsx | 181 ++++----- app/(dashboard)/page.tsx | 235 +----------- app/(dashboard)/policies/page.tsx | 19 +- app/(dashboard)/replication/page.tsx | 153 ++++---- app/(dashboard)/settings/page.tsx | 68 +--- app/(dashboard)/site-replication/page.tsx | 31 +- app/(dashboard)/sse/page.tsx | 94 ++--- .../{performance => status}/page.tsx | 6 +- app/(dashboard)/tiers/page.tsx | 26 +- app/(dashboard)/user-groups/page.tsx | 48 +-- app/(dashboard)/users/page.tsx | 39 +- app/globals.css | 4 +- app/layout.tsx | 23 +- components/access-keys/edit-item.tsx | 53 ++- components/access-keys/new-item.tsx | 61 ++- components/app-sidebar.tsx | 2 +- components/auth/heroes/hero-static.tsx | 23 +- components/auth/login-form.tsx | 49 +-- components/buckets/events-tab.tsx | 69 +--- components/buckets/info.tsx | 101 ++--- components/buckets/lifecycle-tab.tsx | 46 +-- components/buckets/new-form.tsx | 56 +-- components/buckets/replication-tab.tsx | 35 +- components/buckets/selector.tsx | 55 +-- components/dashboard-auth-guard.tsx | 28 +- .../data-table/data-table-pagination.tsx | 41 +-- components/data-table/data-table.tsx | 22 +- components/datetime-picker.tsx | 18 +- components/dialog-host.tsx | 14 +- components/empty-state.tsx | 22 +- components/events-target/new-form.tsx | 46 +-- components/events/columns.tsx | 28 +- components/events/new-form.tsx | 97 +---- components/language-switcher.tsx | 17 +- components/license/article.tsx | 9 +- components/license/enterprise-section.tsx | 105 ++---- components/lifecycle/new-form.tsx | 346 +++++++----------- components/object/list.tsx | 161 +++----- components/object/new-form.tsx | 19 +- components/object/path-links.tsx | 28 +- components/object/preview-modal.tsx | 72 +--- components/object/upload-picker.tsx | 139 ++----- components/object/versions.tsx | 65 +--- components/object/view.tsx | 27 +- components/page-header.tsx | 11 +- components/page.tsx | 8 +- components/policies/form.tsx | 37 +- components/replication/new-form.tsx | 327 +++++++---------- components/search-input.tsx | 21 +- components/site-replication/new-form.tsx | 281 ++++++-------- components/tasks/item.tsx | 4 +- components/tasks/panel.tsx | 11 +- components/tasks/stats-button.tsx | 12 +- components/theme-switcher.tsx | 12 +- components/tiers/change-key.tsx | 19 +- components/tiers/new-form.tsx | 49 +-- components/top-nav-breadcrumb.tsx | 8 +- components/ui/accordion.tsx | 50 +-- components/ui/alert-dialog.tsx | 86 ++--- components/ui/alert.tsx | 46 +-- components/ui/aspect-ratio.tsx | 4 +- components/ui/avatar.tsx | 42 +-- components/ui/badge.tsx | 15 +- components/ui/breadcrumb.tsx | 51 +-- components/ui/button-group.tsx | 13 +- components/ui/button.tsx | 14 +- components/ui/calendar.tsx | 108 ++---- components/ui/card.tsx | 42 +-- components/ui/carousel.tsx | 46 +-- components/ui/chart.tsx | 115 ++---- components/ui/checkbox.tsx | 10 +- components/ui/collapsible.tsx | 26 +- components/ui/combobox.tsx | 85 ++--- components/ui/command.tsx | 83 ++--- components/ui/context-menu.tsx | 84 ++--- components/ui/dialog.tsx | 67 +--- components/ui/direction.tsx | 6 +- components/ui/drawer.tsx | 57 +-- components/ui/dropdown-menu.tsx | 85 ++--- components/ui/empty.tsx | 37 +- components/ui/field.tsx | 35 +- components/ui/flip-words.tsx | 7 +- components/ui/hover-card.tsx | 14 +- components/ui/input-group.tsx | 68 ++-- components/ui/input-otp.tsx | 20 +- components/ui/input.tsx | 2 +- components/ui/item.tsx | 53 +-- components/ui/kbd.tsx | 10 +- components/ui/label.tsx | 7 +- components/ui/menubar.tsx | 86 ++--- components/ui/native-select.tsx | 30 +- components/ui/navigation-menu.tsx | 57 +-- components/ui/pagination.tsx | 67 +--- components/ui/popover.tsx | 51 +-- components/ui/progress.tsx | 11 +- components/ui/radio-group.tsx | 20 +- components/ui/resizable.tsx | 20 +- components/ui/scroll-area.tsx | 14 +- components/ui/select.tsx | 71 ++-- components/ui/separator.tsx | 2 +- components/ui/sheet.tsx | 67 +--- components/ui/sidebar.tsx | 113 ++---- components/ui/skeleton.tsx | 8 +- components/ui/slider.tsx | 11 +- components/ui/sonner.tsx | 28 +- components/ui/spinner.tsx | 9 +- components/ui/switch.tsx | 2 +- components/ui/table.tsx | 49 +-- components/ui/tabs.tsx | 28 +- components/ui/textarea.tsx | 2 +- components/ui/toggle-group.tsx | 11 +- components/ui/toggle.tsx | 11 +- components/ui/tooltip.tsx | 23 +- components/upload-zone.tsx | 10 +- components/user-group/edit-form.tsx | 36 +- components/user-group/members.tsx | 25 +- components/user-group/new-form.tsx | 25 +- components/user-group/policies.tsx | 55 +-- .../user-group/set-policies-multiple.tsx | 58 +-- components/user/change-password.tsx | 34 +- components/user/dropdown.tsx | 20 +- components/user/edit-form.tsx | 15 +- components/user/new-form.tsx | 60 +-- components/user/notice.tsx | 24 +- components/user/selector.tsx | 36 +- config/navs.ts | 4 +- contexts/api-context.tsx | 6 +- contexts/auth-context.tsx | 71 +--- contexts/task-context.tsx | 24 +- hooks/use-access-keys.ts | 12 +- hooks/use-bucket.ts | 248 ++++++------- hooks/use-data-table.tsx | 4 +- hooks/use-event-target.ts | 15 +- hooks/use-groups.ts | 32 +- hooks/use-import-export.ts | 12 +- hooks/use-local-storage.ts | 11 +- hooks/use-object.ts | 106 ++---- hooks/use-permissions.tsx | 42 +-- hooks/use-policies.ts | 34 +- hooks/use-sse.ts | 22 +- hooks/use-tiers.ts | 6 +- hooks/use-users.ts | 42 +-- i18n/locales/de-DE.json | 1 + i18n/locales/en-US.json | 1 + i18n/locales/es-ES.json | 1 + i18n/locales/fr-FR.json | 1 + i18n/locales/id-ID.json | 1 + i18n/locales/it-IT.json | 1 + i18n/locales/ja-JP.json | 1 + i18n/locales/ko-KR.json | 1 + i18n/locales/pt-BR.json | 1 + i18n/locales/ru-RU.json | 1 + i18n/locales/tr-TR.json | 1 + i18n/locales/zh-CN.json | 1 + lib/aws4fetch.ts | 254 ++++++------- lib/bucket-policy.ts | 100 ++--- lib/config-helpers.ts | 10 +- lib/config.ts | 16 +- lib/console-permissions.ts | 2 +- lib/console-policy-parser.ts | 54 +-- lib/delete-task.ts | 50 +-- lib/error-handler.ts | 51 +-- lib/events.ts | 9 +- lib/export-file.ts | 8 +- lib/feedback/dialog.tsx | 10 +- lib/feedback/message.tsx | 15 +- lib/i18n.ts | 4 +- lib/sts.ts | 7 +- lib/task-manager.ts | 13 +- lib/upload-task.ts | 22 +- lib/utils.ts | 5 +- postcss.config.mjs | 4 +- 201 files changed, 2521 insertions(+), 5932 deletions(-) rename app/(dashboard)/{performance => status}/page.tsx (96%) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index f9dca550..a91f3e8b 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,9 +1,9 @@ --- name: Bug Report about: Create a report to help us improve -title: '[BUG] ' -labels: ['bug', 'needs-triage'] -assignees: '' +title: "[BUG] " +labels: ["bug", "needs-triage"] +assignees: "" --- # Bug Report diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index b3585ba3..8982830c 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,9 +1,9 @@ --- name: Feature Request about: Suggest an idea for this project -title: '[FEATURE] ' -labels: ['enhancement', 'needs-discussion'] -assignees: '' +title: "[FEATURE] " +labels: ["enhancement", "needs-discussion"] +assignees: "" --- # Feature Request diff --git a/.github/prompts/analyze.prompt.md b/.github/prompts/analyze.prompt.md index f4c1a7bd..584177af 100644 --- a/.github/prompts/analyze.prompt.md +++ b/.github/prompts/analyze.prompt.md @@ -20,7 +20,7 @@ Execution steps: - SPEC = FEATURE_DIR/spec.md - PLAN = FEATURE_DIR/plan.md - TASKS = FEATURE_DIR/tasks.md - Abort with an error message if any required file is missing (instruct the user to run missing prerequisite command). + Abort with an error message if any required file is missing (instruct the user to run missing prerequisite command). 2. Load artifacts: - Parse spec.md sections: Overview/Context, Functional Requirements, Non-Functional Requirements, User Stories, Edge Cases (if present). @@ -36,26 +36,26 @@ Execution steps: 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, ???, , 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, ???, , 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). 5. Severity assignment heuristic: - CRITICAL: Violates constitution MUST, missing core spec artifact, or requirement with zero coverage that blocks baseline functionality. @@ -66,9 +66,11 @@ Execution steps: 6. Produce a Markdown report (no file writes) with sections: ### Specification Analysis Report - | ID | Category | Severity | Location(s) | Summary | Recommendation | - |----|----------|----------|-------------|---------|----------------| - | A1 | Duplication | HIGH | spec.md:L120-134 | Two similar requirements ... | Merge phrasing; keep clearer version | + + | ID | Category | Severity | Location(s) | Summary | Recommendation | + | --- | ----------- | -------- | ---------------- | ---------------------------- | ------------------------------------ | + | A1 | Duplication | HIGH | spec.md:L120-134 | Two similar requirements ... | Merge phrasing; keep clearer version | + (Add one row per finding; generate stable IDs prefixed by category initial.) Additional subsections: @@ -77,12 +79,12 @@ Execution steps: - Constitution Alignment Issues (if any) - Unmapped Tasks (if any) - Metrics: - * Total Requirements - * Total Tasks - * Coverage % (requirements with >=1 task) - * Ambiguity Count - * Duplication Count - * Critical Issues Count + - Total Requirements + - Total Tasks + - Coverage % (requirements with >=1 task) + - Ambiguity Count + - Duplication Count + - Critical Issues Count 7. At end of report, output a concise Next Actions block: - If CRITICAL issues exist: Recommend resolving before `/implement`. @@ -92,6 +94,7 @@ Execution steps: 8. Ask the user: "Would you like me to suggest concrete remediation edits for the top N issues?" (Do NOT apply them automatically.) Behavior rules: + - NEVER modify files. - NEVER hallucinate missing sections—if absent, report them. - KEEP findings deterministic: if rerun without changes, produce consistent IDs and counts. diff --git a/.github/prompts/clarify.prompt.md b/.github/prompts/clarify.prompt.md index 26ff530b..941e45cb 100644 --- a/.github/prompts/clarify.prompt.md +++ b/.github/prompts/clarify.prompt.md @@ -77,56 +77,56 @@ Execution steps: - Information is better deferred to planning phase (note internally) 3. Generate (internally) a prioritized queue of candidate clarification questions (maximum 5). Do NOT output them all at once. Apply these constraints: - - Maximum of 5 total questions across the whole session. - - Each question must be answerable with EITHER: - * A short multiple‑choice selection (2–5 distinct, mutually exclusive options), OR - * A one-word / short‑phrase answer (explicitly constrain: "Answer in <=5 words"). + - Maximum of 5 total questions across the whole session. + - Each question must be answerable with EITHER: + - A short multiple‑choice selection (2–5 distinct, mutually exclusive options), OR + - A one-word / short‑phrase answer (explicitly constrain: "Answer in <=5 words"). - Only include questions whose answers materially impact architecture, data modeling, task decomposition, test design, UX behavior, operational readiness, or compliance validation. - Ensure category coverage balance: attempt to cover the highest impact unresolved categories first; avoid asking two low-impact questions when a single high-impact area (e.g., security posture) is unresolved. - Exclude questions already answered, trivial stylistic preferences, or plan-level execution details (unless blocking correctness). - Favor clarifications that reduce downstream rework risk or prevent misaligned acceptance tests. - - If more than 5 categories remain unresolved, select the top 5 by (Impact * Uncertainty) heuristic. + - If more than 5 categories remain unresolved, select the top 5 by (Impact \* Uncertainty) heuristic. 4. Sequential questioning loop (interactive): - - Present EXACTLY ONE question at a time. - - For multiple‑choice questions render options as a Markdown table: - - | Option | Description | - |--------|-------------| - | A |