@zaip-ai/cli 1.0.8 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/services/adapters.d.ts +1 -1
- package/dist/services/adapters.js +1 -1
- package/dist/services/agent-adapters.js +3 -3
- package/dist/services/agent-adapters.js.map +1 -1
- package/dist/services/agent-adapters.test.js +7 -1
- package/dist/services/agent-adapters.test.js.map +1 -1
- package/dist/services/codex-pre-tool-hook-template.d.ts.map +1 -1
- package/dist/services/codex-pre-tool-hook-template.js +89 -7
- package/dist/services/codex-pre-tool-hook-template.js.map +1 -1
- package/dist/services/codex-rules.d.ts +1 -1
- package/dist/services/codex-rules.d.ts.map +1 -1
- package/dist/services/codex-rules.js +7 -0
- package/dist/services/codex-rules.js.map +1 -1
- package/dist/services/install-agents-template.d.ts.map +1 -1
- package/dist/services/install-agents-template.js +1 -0
- package/dist/services/install-agents-template.js.map +1 -1
- package/dist/services/logger.test.js +2 -2
- package/dist/services/runtime-template.test.js +31 -7
- package/dist/services/runtime-template.test.js.map +1 -1
- package/dist/services/template-manifest.d.ts.map +1 -1
- package/dist/services/template-manifest.js +12 -3
- package/dist/services/template-manifest.js.map +1 -1
- package/package.json +1 -1
- package/templates/.agents/architecture/software-architecture.md +131 -0
- package/templates/.agents/branding/brandbook.docx +0 -0
- package/templates/.agents/branding/brandbook.md +60 -0
- package/templates/.agents/config/agents/catalog.yaml +7 -7
- package/templates/.agents/config/clients/codex/agents/zaip-agent-backend.toml +2 -2
- package/templates/.agents/config/clients/codex/agents/zaip-agent-designer.toml +2 -2
- package/templates/.agents/config/clients/codex/agents/zaip-agent-finalizer.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-frontend.toml +8 -8
- package/templates/.agents/config/clients/codex/agents/zaip-agent-orchestrator.toml +1 -1
- package/templates/.agents/dashboard/.tmp-run-list.json +254 -0
- package/templates/.agents/dashboard/.zaip-managed.json +457 -173
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{CostCalculationGuidePage-Z60df2r-.js → CostCalculationGuidePage-ovxurkIk.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/DashboardHelpDialog-BgVgrfhQ.js +2310 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{PricingSettingsDialog-Coc6pA-1.js → PricingSettingsDialog-vSvvOHQp.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-BomxqCBU.css +1 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-zH758vfs.js +3 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/TraceabilityWorkspace-DLn-Mz2M.js +1 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{TraceabilityWorkspace-CaKwQP43.css → TraceabilityWorkspace-DvvavDLY.css} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/cost-monitor-DKwP1stV.js +68 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/cost-monitor-PoJA2PI1.css +1 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{icons-vendor-DFBuc_qp.js → icons-vendor-B_lDDHn1.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-B31GMG5O.css +1 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-CZQlsLV9.js +2 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{react-vendor-CCQOHdVI.js → react-vendor-B3TJrD4O.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{traceability-pC2_0J8x.js → traceability-7f1j5wx3.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/index.html +7 -7
- package/templates/.agents/dashboard/apps/frontend/package.json +1 -1
- package/templates/.agents/dashboard/apps/frontend/playwright.dom.config.ts +32 -0
- package/templates/.agents/dashboard/apps/frontend/src/App.tsx +199 -140
- package/templates/.agents/dashboard/apps/frontend/src/AppOverlays.tsx +0 -21
- package/templates/.agents/dashboard/apps/frontend/src/DashboardAlternateContent.tsx +20 -11
- package/templates/.agents/dashboard/apps/frontend/src/ProjectSettingsPage.tsx +14 -7
- package/templates/.agents/dashboard/apps/frontend/src/ProjectStackEditor.tsx +4 -2
- package/templates/.agents/dashboard/apps/frontend/src/TraceabilityWorkspace.dom.e2e.ts +56 -0
- package/templates/.agents/dashboard/apps/frontend/src/TraceabilityWorkspace.test.ts +21 -2
- package/templates/.agents/dashboard/apps/frontend/src/TraceabilityWorkspace.tsx +89 -19
- package/templates/.agents/dashboard/apps/frontend/src/cost-period-refresh.test.ts +19 -4
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-api.test.ts +49 -3
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-api.ts +29 -10
- package/templates/.agents/dashboard/apps/frontend/src/operations-period-render.test.ts +4 -4
- package/templates/.agents/dashboard/apps/frontend/src/overview-status-page.test.ts +4 -2
- package/templates/.agents/dashboard/apps/frontend/src/project-settings-page.css +36 -26
- package/templates/.agents/dashboard/apps/frontend/src/project-settings.test.ts +2 -2
- package/templates/.agents/dashboard/apps/frontend/src/snapshot-banner-semantics.test.ts +47 -6
- package/templates/.agents/dashboard/apps/frontend/src/snapshot-coherence.test.ts +59 -9
- package/templates/.agents/dashboard/apps/frontend/src/sqlite-page-export.test.ts +32 -0
- package/templates/.agents/dashboard/apps/frontend/src/sqlite-page-export.ts +21 -0
- package/templates/.agents/dashboard/apps/frontend/src/styles.css +19 -0
- package/templates/.agents/dashboard/apps/frontend/src/traceability-task-pagination.test.ts +32 -0
- package/templates/.agents/dashboard/apps/frontend/src/traceability-task-pagination.ts +36 -0
- package/templates/.agents/dashboard/apps/frontend/src/traceability-workspace.css +6 -2
- package/templates/.agents/dashboard/apps/frontend/src/use-app-cost-loaders.test.ts +137 -23
- package/templates/.agents/dashboard/apps/frontend/src/use-app-cost-loaders.ts +229 -35
- package/templates/.agents/dashboard/apps/frontend/src/use-app-effects.ts +61 -7
- package/templates/.agents/dashboard/apps/frontend/src/use-app-operations-pages.ts +3 -6
- package/templates/.agents/dashboard/apps/frontend/src/use-app-trace-documents.ts +7 -1
- package/templates/.agents/dashboard/apps/frontend/src/use-app-work-list-page.test.ts +163 -0
- package/templates/.agents/dashboard/apps/frontend/src/use-app-work-list-page.ts +136 -0
- package/templates/.agents/dashboard/apps/frontend/src/use-operations-detail-export.ts +76 -0
- package/templates/.agents/dashboard/apps/frontend/src/work-list-load-dedup.test.ts +23 -0
- package/templates/.agents/dashboard/apps/frontend/src/work-list-load-dedup.ts +27 -0
- package/templates/.agents/dashboard/apps/frontend/src/work-list-pagination.test.ts +39 -15
- package/templates/.agents/dashboard/apps/frontend/src/work-list-pagination.ts +3 -4
- package/templates/.agents/dashboard/apps/frontend/vite.config.ts +4 -1
- package/templates/.agents/dashboard/modules/cost-monitor/package.json +1 -1
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CompactLifecycleCostTable.test.ts +89 -19
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CompactLifecycleCostTable.tsx +31 -16
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostCharts.test.ts +43 -14
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostCharts.tsx +5 -5
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostDeveloperAttributionPanel.tsx +60 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostDeveloperAttributionTable.tsx +191 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostFilters.loading.test.ts +14 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostFilters.run-page.test.ts +18 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostFilters.tsx +18 -3
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostModelsAuditTable.tsx +1 -1
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorContent.tsx +75 -44
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorLoadErrors.tsx +35 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorPage.test.ts +162 -40
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorPage.tsx +221 -79
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTableLoading.test.ts +132 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTableLoading.tsx +70 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTables.test.ts +203 -155
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTables.tsx +164 -125
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor-copy.ts +2 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor-views.ts +3 -1
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor.css +5 -2
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-page-range.ts +35 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/index.ts +2 -2
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/period-cost-groups.ts +2 -1
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/use-compact-cost-page.ts +32 -9
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/use-cost-group-page.test.ts +37 -2
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/use-cost-group-page.ts +131 -9
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/use-cost-run-page.ts +34 -17
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-monitor-projection.test.ts +0 -24
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-summary-projection.test.ts +225 -424
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-summary-projection.ts +24 -15
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-summary-terminal-day.test.ts +6 -1
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/source-size-cost-server/build-cost-monitor-projection-agents.test.ts +31 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/source-size-cost-server/build-cost-summary-projection-duration.test.ts +414 -0
- package/templates/.agents/dashboard/modules/operations/package.json +1 -1
- package/templates/.agents/dashboard/modules/operations/src/contracts.ts +46 -26
- package/templates/.agents/dashboard/modules/operations/src/react/DeveloperAttributionPanel.test.ts +54 -0
- package/templates/.agents/dashboard/modules/operations/src/react/DeveloperAttributionPanel.tsx +247 -0
- package/templates/.agents/dashboard/modules/operations/src/react/EntityTables.tsx +31 -11
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsMainContent.tsx +39 -13
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview.helpers.tsx +107 -2
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview.macro-metrics.test.ts +55 -0
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview.test.ts +23 -29
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview.tsx +211 -184
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverviewTopPanel.tsx +127 -0
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsPage.tsx +60 -51
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsPageNavigation.tsx +1 -4
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsPageOverview.tsx +3 -0
- package/templates/.agents/dashboard/modules/operations/src/react/PagedWorkList.test.tsx +43 -0
- package/templates/.agents/dashboard/modules/operations/src/react/PagedWorkList.tsx +181 -0
- package/templates/.agents/dashboard/modules/operations/src/react/PeriodSummaryTable.tsx +32 -10
- package/templates/.agents/dashboard/modules/operations/src/react/TaskDetailsDialog.tsx +9 -3
- package/templates/.agents/dashboard/modules/operations/src/react/UnifiedWorkBoard.tsx +13 -5
- package/templates/.agents/dashboard/modules/operations/src/react/UnifiedWorkList.test.ts +16 -6
- package/templates/.agents/dashboard/modules/operations/src/react/UnifiedWorkList.tsx +14 -4
- package/templates/.agents/dashboard/modules/operations/src/react/conversation-rows.ts +1 -2
- package/templates/.agents/dashboard/modules/operations/src/react/developer-identities.test.ts +18 -0
- package/templates/.agents/dashboard/modules/operations/src/react/developer-identities.ts +30 -0
- package/templates/.agents/dashboard/modules/operations/src/react/execution-metrics.ts +1 -0
- package/templates/.agents/dashboard/modules/operations/src/react/export/ExcelExportAction.test.ts +393 -4
- package/templates/.agents/dashboard/modules/operations/src/react/export/ExcelExportAction.tsx +484 -61
- package/templates/.agents/dashboard/modules/operations/src/react/export/export-layout.test.ts +23 -1
- package/templates/.agents/dashboard/modules/operations/src/react/export/xlsx-runtime-e2e.test.ts +248 -0
- package/templates/.agents/dashboard/modules/operations/src/react/index.ts +1 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operation-duration.test.ts +4 -4
- package/templates/.agents/dashboard/modules/operations/src/react/operation-duration.ts +6 -4
- package/templates/.agents/dashboard/modules/operations/src/react/operations-coverage-toast.test.ts +4 -3
- package/templates/.agents/dashboard/modules/operations/src/react/operations-date-filters.css +1 -1
- package/templates/.agents/dashboard/modules/operations/src/react/operations-global-filters.test.ts +4 -1
- package/templates/.agents/dashboard/modules/operations/src/react/operations-overview-period-filter.test.ts +22 -12
- package/templates/.agents/dashboard/modules/operations/src/react/operations-overview.css +4 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operations-overview.status-cards.test.ts +1 -1
- package/templates/.agents/dashboard/modules/operations/src/react/operations-page-contract.ts +53 -6
- package/templates/.agents/dashboard/modules/operations/src/react/operations-view-order.test.ts +2 -4
- package/templates/.agents/dashboard/modules/operations/src/react/period-summary.test.ts +82 -6
- package/templates/.agents/dashboard/modules/operations/src/react/period-summary.ts +1 -0
- package/templates/.agents/dashboard/modules/operations/src/react/work-board-model.test.ts +2 -1
- package/templates/.agents/dashboard/modules/operations/src/react/work-board-model.ts +1 -1
- package/templates/.agents/dashboard/modules/operations/src/server/execution-relationship-counts.test.ts +19 -7
- package/templates/.agents/dashboard/modules/operations/src/server/execution-relationship-counts.ts +4 -1
- package/templates/.agents/dashboard/modules/operations/src/server/metric-coverage.ts +1 -0
- package/templates/.agents/dashboard/modules/operations/src/server/quick-daily-operations-projection.ts +11 -5
- package/templates/.agents/dashboard/modules/traceability/package.json +1 -1
- package/templates/.agents/dashboard/packages/branding/package.json +1 -1
- package/templates/.agents/dashboard/packages/branding/src/index.ts +1 -1
- package/templates/.agents/dashboard/packages/contracts/package.json +1 -1
- package/templates/.agents/dashboard/packages/contracts/src/index.ts +1 -0
- package/templates/.agents/dashboard/packages/data-export/package.json +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/dist/server.cjs +533 -338
- package/templates/.agents/dashboard/packages/local-runtime/dist/sqlite-read-model.cjs +506 -311
- package/templates/.agents/dashboard/packages/local-runtime/gitignore.template +2 -0
- package/templates/.agents/dashboard/packages/local-runtime/package.json +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/scripts/build-sqlite-dashboard.mjs +15 -7
- package/templates/.agents/dashboard/packages/local-runtime/scripts/build-sqlite-runtime.mjs +44 -13
- package/templates/.agents/dashboard/packages/local-runtime/scripts/rebuild-sqlite-read-model.mjs +8 -3
- package/templates/.agents/dashboard/packages/local-runtime/scripts/source-size-runtime-scripts/sqlite-read-model-fixture.mjs +397 -0
- package/templates/.agents/dashboard/packages/local-runtime/scripts/test-sqlite-read-model.mjs +472 -145
- package/templates/.agents/dashboard/packages/local-runtime/scripts/test-unix-launchers.mjs +15 -3
- package/templates/.agents/dashboard/packages/local-runtime/scripts/validate-sqlite-read-model.mjs +141 -33
- package/templates/.agents/dashboard/packages/local-runtime/server.mjs +533 -338
- package/templates/.agents/dashboard/packages/local-runtime/src/project-settings.test.ts +6 -2
- package/templates/.agents/dashboard/packages/local-runtime/src/project-settings.ts +3 -3
- package/templates/.agents/dashboard/packages/local-runtime/src/server-board.test.ts +89 -16
- package/templates/.agents/dashboard/packages/local-runtime/src/server-board.ts +33 -16
- package/templates/.agents/dashboard/packages/local-runtime/src/server-classification-page.test.ts +87 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-period-macro-metric.test.ts +44 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-period-macro-metric.ts +125 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-reconciliation-refresh.test.ts +66 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-request-authority.test.ts +61 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-request-authority.ts +18 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-run-projections.test.ts +42 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-refresh.ts +97 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot.test.ts +22 -5
- package/templates/.agents/dashboard/packages/local-runtime/src/server-sqlite-task-trace.ts +91 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-workspace.ts +7 -3
- package/templates/.agents/dashboard/packages/local-runtime/src/server.test-fixtures.ts +36 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server.test.ts +230 -132
- package/templates/.agents/dashboard/packages/local-runtime/src/server.ts +224 -182
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-artifact-counts.ts +28 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-agent-page.test.ts +63 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-agent-page.ts +109 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-aggregates.ts +497 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-fast-page-parity.test-support.ts +65 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-group-page.test.ts +176 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-group-page.ts +119 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-group-projection.ts +41 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-invocation-page.test.ts +16 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-invocation-page.ts +29 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-first-fold-cache.ts +355 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-first-fold-persistence.ts +121 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-first-fold-timing.ts +27 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-metric-contract.ts +16 -2
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-operations-projection.ts +15 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-operations-work-list.test.ts +223 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-operations-work-list.ts +304 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-cache.test-support.ts +23 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-first-fold-types.ts +89 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-multi-provider-fixture.ts +227 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-multi-provider.test.ts +691 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-source-fingerprint.ts +81 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model.test.ts +1655 -567
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model.ts +2168 -1268
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-snapshot-cache.ts +129 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-snapshot-install.test.ts +26 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-snapshot-install.ts +28 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-snapshot-seed.test.ts +116 -0
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-launch-page.mjs +146 -0
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-launch-page.test.mjs +165 -0
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-refresh.mjs +140 -0
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard.mjs +255 -289
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard.test.mjs +94 -88
- package/templates/.agents/dashboard/packages/ui/package.json +1 -1
- package/templates/.agents/dashboard/packages/windows-launcher/Program.cs +5 -2
- package/templates/.agents/dashboard/tests/e2e/package.json +1 -1
- package/templates/.agents/dashboard/tests/e2e/playwright.config.ts +4 -1
- package/templates/.agents/dashboard/tests/e2e/specs/cost-monitor-loading.spec.ts +142 -0
- package/templates/.agents/dashboard/tests/e2e/specs/cost-monitor-pagination.spec.ts +232 -0
- package/templates/.agents/dashboard/tests/e2e/specs/dashboard-performance-matrix.spec.ts +743 -0
- package/templates/.agents/dashboard/tests/e2e/specs/dashboard.spec.ts +189 -214
- package/templates/.agents/dashboard/zaip-dashboard-windows.exe +0 -0
- package/templates/.agents/design/.zaip-managed.json +3 -3
- package/templates/.agents/design/apps/catalog/package.json +1 -1
- package/templates/.agents/design/packages/local-runtime/package.json +1 -1
- package/templates/.agents/growth/estrategia-bootstrap-90-dias.md +169 -0
- package/templates/.agents/growth/strategy.md +27 -0
- package/templates/.agents/marketing/estrategia-marketing-zaip-90-dias.md +197 -0
- package/templates/.agents/marketing/strategy.md +29 -0
- package/templates/.agents/requirements/autonomous-assurance.md +6 -6
- package/templates/.agents/requirements/comparative-audit.md +1 -1
- package/templates/.agents/requirements/context-engine.md +1 -1
- package/templates/.agents/requirements/cost-observability.md +1 -1
- package/templates/.agents/requirements/dashboard-launch.md +1 -1
- package/templates/.agents/requirements/data-export.md +1 -1
- package/templates/.agents/requirements/design-system.md +1 -1
- package/templates/.agents/requirements/execution-engine.md +3 -3
- package/templates/.agents/requirements/kanban-dashboard.md +10 -2
- package/templates/.agents/requirements/model-orchestration.md +1 -1
- package/templates/.agents/requirements/public-distribution.md +1 -1
- package/templates/.agents/requirements/software-architecture.md +1 -1
- package/templates/.agents/requirements/strategic-improvements.md +1 -1
- package/templates/.agents/requirements/work-lifecycle.md +4 -4
- package/templates/.agents/requirements/zaip-strategic-95.md +1 -1
- package/templates/.agents/rules/dashboard-ui-consistency.md +14 -0
- package/templates/.agents/rules/frontend-lite.md +4 -4
- package/templates/.agents/rules/run-lifecycle-closure.md +4 -4
- package/templates/.agents/runtime/VERSION +1 -1
- package/templates/.agents/runtime/bin/zaip.mjs +1142 -1041
- package/templates/.agents/runtime/checksums.sha256 +6 -6
- package/templates/.agents/runtime/manifest.json +1 -1
- package/templates/.agents/runtime/pnpm-lock.sha256 +1 -1
- package/templates/.agents/runtime/provenance.json +5 -5
- package/templates/.agents/runtime/sbom.cdx.json +3 -3
- package/templates/.agents/sales/playbook.md +32 -0
- package/templates/.agents/sales/roteiro-comercial-zaip.md +252 -0
- package/templates/.agents/skills/criar-pasta-obsidian/scripts/generate-obsidian-vault.test.mjs +20 -16
- package/templates/.agents/skills/zaip-aios/SKILL.md +1 -1
- package/templates/.agents/skills/zaip-skill-agent-catalog/SKILL.md +22 -0
- package/templates/.agents/skills/zaip-skill-agent-catalog/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-author-skills/SKILL.md +3 -2
- package/templates/.agents/skills/zaip-skill-author-skills/scripts/audit-skill-catalog.mjs +49 -0
- package/templates/.agents/skills/zaip-skill-author-skills/scripts/author-skill-scripts.test.mjs +27 -0
- package/templates/.agents/skills/zaip-skill-author-skills/scripts/run-skill-tests.mjs +37 -0
- package/templates/.agents/skills/zaip-skill-backend/SKILL.md +1 -0
- package/templates/.agents/skills/zaip-skill-brand-governance/SKILL.md +9 -2
- package/templates/.agents/skills/zaip-skill-brand-governance/references/brandbook-framework.md +39 -0
- package/templates/.agents/skills/zaip-skill-brand-governance/references/brandbook-standards.md +1 -1
- package/templates/.agents/skills/zaip-skill-change/SKILL.md +1 -1
- package/templates/.agents/skills/zaip-skill-change/references/observable-evidence.md +83 -0
- package/templates/.agents/skills/zaip-skill-dashboard-diagnostics/SKILL.md +22 -0
- package/templates/.agents/skills/zaip-skill-dashboard-diagnostics/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-enforce-architecture/SKILL.md +2 -0
- package/templates/.agents/skills/zaip-skill-execution/SKILL.md +1 -1
- package/templates/.agents/skills/zaip-skill-frontend/SKILL.md +4 -3
- package/templates/.agents/skills/zaip-skill-frontend/agents/openai.yaml +2 -2
- package/templates/.agents/skills/zaip-skill-github-deploy/SKILL.md +10 -10
- package/templates/.agents/skills/zaip-skill-growth-strategy-revops/SKILL.md +6 -0
- package/templates/.agents/skills/zaip-skill-lifecycle-closure/SKILL.md +27 -0
- package/templates/.agents/skills/zaip-skill-lifecycle-closure/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-marketing/SKILL.md +6 -0
- package/templates/.agents/skills/zaip-skill-prd/SKILL.md +4 -0
- package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-local-telemetry.mjs +111 -104
- package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-explicit-recovery.mjs +223 -0
- package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-lib.mjs +55 -9
- package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-lib.test.mjs +145 -14
- package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-remeasurement.mjs +19 -9
- package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-remeasurement.test.mjs +82 -5
- package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/source-size-telemetry/model-identity-reconciliation.mjs +77 -0
- package/templates/.agents/skills/zaip-skill-release-qualification/SKILL.md +20 -0
- package/templates/.agents/skills/zaip-skill-release-qualification/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-review/SKILL.md +5 -0
- package/templates/.agents/skills/zaip-skill-rules/SKILL.md +1 -1
- package/templates/.agents/skills/zaip-skill-sales-methodology/SKILL.md +6 -0
- package/templates/.agents/skills/zaip-skill-spec/SKILL.md +4 -0
- package/templates/.agents/skills/zaip-skill-sqlite-read-model/SKILL.md +22 -90
- package/templates/.agents/skills/zaip-skill-sqlite-read-model/scripts/ensure-node.mjs +28 -5
- package/templates/.agents/zaip-aios/INDEX.md +57 -22
- package/templates/.agents/zaip-aios/README.md +24 -13
- package/templates/.agents/zaip-aios/VERSION +1 -1
- package/templates/.agents/zaip-aios/guides/02-requirements.md +5 -0
- package/templates/.agents/zaip-aios/guides/06-execucao.md +13 -4
- package/templates/.agents/zaip-aios/guides/07-revisao-e-validacao.md +7 -0
- package/templates/.agents/zaip-aios/guides/10-seguranca.md +23 -0
- package/templates/.agents/zaip-aios/guides/11-observabilidade-e-custos.md +6 -6
- package/templates/.agents/zaip-aios/guides/13-boas-praticas.md +3 -0
- package/templates/.agents/zaip-aios/guides/16-lifecycle-e-reconciliacao.md +12 -3
- package/templates/.agents/zaip-aios/guides/17-como-o-custo-e-calculado.md +5 -5
- package/templates/.agents/zaip-aios/guides/18-catalogo-de-agentes.md +76 -0
- package/templates/.agents/zaip-aios/guides/19-assurance-e-autonomia.md +95 -0
- package/templates/.agents/zaip-aios/guides/20-instalacao-detalhada.md +366 -0
- package/templates/.agents/zaip-aios/guides/21-telemetria-monitor-custos.md +46 -0
- package/templates/.agents/zaip-aios/guides/22-fluxos-e-roteamento.md +74 -0
- package/templates/.agents/zaip-aios/guides/23-orquestracao-de-modelos.md +483 -0
- package/templates/.agents/zaip-aios/guides/24-calculo-de-custos-openai.md +85 -0
- package/templates/.agents/zaip-aios/guides/25-fontes-de-precos-openai.md +19 -0
- package/templates/.agents/zaip-aios/guides/26-qualidade-e-release.md +111 -0
- package/templates/.agents/zaip-aios/guides/27-telemetria-git-native.md +172 -0
- package/templates/.agents/zaip-aios/guides/28-lifecycle-completo.md +149 -0
- package/templates/.agents/zaip-aios/guides/assets/diagrams/lifecycles-task-spec-prd.png +0 -0
- package/templates/.agents/zaip-aios/guides/assets/diagrams/prd-lifecycle.png +0 -0
- package/templates/.agents/zaip-aios/guides/assets/diagrams/spec-lifecycle.png +0 -0
- package/templates/.agents/zaip-aios/guides/assets/diagrams/task-lifecycle.png +0 -0
- package/templates/template-manifest.json +756 -235
- package/templates/.agents/dashboard/apps/frontend/dist/assets/DashboardHelpDialog-Cs6dzDmW.js +0 -1505
- package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-QE1k9yZB.css +0 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-_Pf5DA_A.js +0 -3
- package/templates/.agents/dashboard/apps/frontend/dist/assets/TraceabilityWorkspace-BVlz3DLZ.js +0 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/cost-monitor-BZ5WdaMN.css +0 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/cost-monitor-Cf9ctPVt.js +0 -68
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-8A4DcNXM.js +0 -2
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-DK_enB5Z.css +0 -1
- package/templates/.agents/dashboard/apps/frontend/src/use-idle-cost-prefetch.ts +0 -45
|
@@ -10,7 +10,6 @@ import type {
|
|
|
10
10
|
TaskDetailProjection,
|
|
11
11
|
} from "@zaip-ai/dashboard-operations/contracts";
|
|
12
12
|
import type { TaskTrace } from "@zaip-ai/dashboard-traceability/contracts";
|
|
13
|
-
|
|
14
13
|
export interface ReconciliationBlockedItem {
|
|
15
14
|
id: string;
|
|
16
15
|
reason: string | null;
|
|
@@ -56,7 +55,6 @@ export interface SqliteViewPage {
|
|
|
56
55
|
totals?: Record<string, unknown>;
|
|
57
56
|
rows: Array<Record<string, unknown>>;
|
|
58
57
|
}
|
|
59
|
-
|
|
60
58
|
export type OperationsScope = "quick" | "overview" | "detail";
|
|
61
59
|
export type WorkBoardStage =
|
|
62
60
|
| "definition"
|
|
@@ -73,7 +71,13 @@ export interface OperationsBoardPage {
|
|
|
73
71
|
stage: WorkBoardStage;
|
|
74
72
|
offset: number;
|
|
75
73
|
total: number;
|
|
76
|
-
totals_by_kind: {
|
|
74
|
+
totals_by_kind: {
|
|
75
|
+
all: number;
|
|
76
|
+
task: number;
|
|
77
|
+
"standalone-task": number;
|
|
78
|
+
prd: number;
|
|
79
|
+
spec: number;
|
|
80
|
+
};
|
|
77
81
|
prds: MacroProjection[];
|
|
78
82
|
specs: MacroProjection[];
|
|
79
83
|
tasks: DashboardTaskProjection[];
|
|
@@ -246,6 +250,7 @@ export class DashboardApiClient {
|
|
|
246
250
|
origin?: string;
|
|
247
251
|
workType?: string;
|
|
248
252
|
priority?: string;
|
|
253
|
+
kind?: string;
|
|
249
254
|
} = {},
|
|
250
255
|
signal?: AbortSignal,
|
|
251
256
|
): Promise<SqliteViewPage> {
|
|
@@ -261,6 +266,7 @@ export class DashboardApiClient {
|
|
|
261
266
|
if (options.origin) query.set("origin", options.origin);
|
|
262
267
|
if (options.workType) query.set("workType", options.workType);
|
|
263
268
|
if (options.priority) query.set("priority", options.priority);
|
|
269
|
+
if (options.kind) query.set("kind", options.kind);
|
|
264
270
|
return this.get(withPeriod(`/api/v2/sqlite-views?${query.toString()}`, period), signal);
|
|
265
271
|
}
|
|
266
272
|
|
|
@@ -423,6 +429,21 @@ export class DashboardApiClient {
|
|
|
423
429
|
);
|
|
424
430
|
}
|
|
425
431
|
|
|
432
|
+
refreshProjection(
|
|
433
|
+
currency: "BRL" | "USD" = "BRL",
|
|
434
|
+
period?: { from: string | null; to: string | null },
|
|
435
|
+
): Promise<{
|
|
436
|
+
operations: OperationsProjection;
|
|
437
|
+
costs: CostMonitorProjection;
|
|
438
|
+
dashboard?: { title: string; repository_name: string };
|
|
439
|
+
projection: { source_latest_at: string | null; served_at: string };
|
|
440
|
+
}> {
|
|
441
|
+
return this.post(
|
|
442
|
+
withPeriod(`${dashboardApiPaths.refreshProjection}?currency=${currency}`, period),
|
|
443
|
+
reconciliationRequestTimeoutMs,
|
|
444
|
+
);
|
|
445
|
+
}
|
|
446
|
+
|
|
426
447
|
task(taskId: string): Promise<TaskDetailProjection> {
|
|
427
448
|
return this.get(dashboardApiPaths.task(taskId));
|
|
428
449
|
}
|
|
@@ -434,11 +455,9 @@ export class DashboardApiClient {
|
|
|
434
455
|
spec(specId: string): Promise<SpecDetailProjection> {
|
|
435
456
|
return this.get(dashboardApiPaths.spec(specId));
|
|
436
457
|
}
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
return this.get(dashboardApiPaths.taskTrace(taskId));
|
|
458
|
+
taskTrace(taskId: string, signal?: AbortSignal): Promise<TaskTrace> {
|
|
459
|
+
return this.get(dashboardApiPaths.taskTrace(taskId), signal);
|
|
440
460
|
}
|
|
441
|
-
|
|
442
461
|
pricing(): Promise<PricingCatalog> {
|
|
443
462
|
return this.get("/api/v2/pricing");
|
|
444
463
|
}
|
|
@@ -572,9 +591,9 @@ function operationsPageParams(
|
|
|
572
591
|
}
|
|
573
592
|
|
|
574
593
|
export const dashboardRequestTimeoutMs = 60_000;
|
|
575
|
-
// The
|
|
576
|
-
// transport margin
|
|
577
|
-
export const reconciliationRequestTimeoutMs =
|
|
594
|
+
// The command may use two minutes plus a projection rebuild; keep enough
|
|
595
|
+
// transport margin to avoid false browser failures after healthy reconciliation.
|
|
596
|
+
export const reconciliationRequestTimeoutMs = 180_000;
|
|
578
597
|
|
|
579
598
|
export async function fetchWithTimeout(
|
|
580
599
|
path: string,
|
|
@@ -94,12 +94,12 @@ describe("App-owned Operations period render", () => {
|
|
|
94
94
|
expect(css).toContain("prefers-reduced-motion: reduce");
|
|
95
95
|
});
|
|
96
96
|
|
|
97
|
-
it("
|
|
97
|
+
it("reserves the global gate for a period replacement, not secondary pages", () => {
|
|
98
98
|
const app = readFileSync(new URL("./App.tsx", import.meta.url), "utf8");
|
|
99
99
|
expect(app).toContain("const globalLoadingPending =");
|
|
100
|
-
expect(app).toContain("
|
|
101
|
-
expect(app).toContain("entityPage.loading");
|
|
102
|
-
expect(app).toContain("Object.values(boardStates).some((state) => state.loading)");
|
|
100
|
+
expect(app).toContain("periodTransitionPending ||");
|
|
101
|
+
expect(app).not.toContain("entityPage.loading ||");
|
|
102
|
+
expect(app).not.toContain("Object.values(boardStates).some((state) => state.loading)");
|
|
103
103
|
expect(app).toContain("<PeriodTransitionShell pending={globalLoadingPending}>");
|
|
104
104
|
});
|
|
105
105
|
});
|
|
@@ -6,8 +6,10 @@ const source = readFileSync(new URL("./App.tsx", import.meta.url), "utf8");
|
|
|
6
6
|
describe("overview status page loading", () => {
|
|
7
7
|
it("requests a dedicated stage and kind page instead of reusing the mixed board page", () => {
|
|
8
8
|
expect(source).toContain("const loadOverviewStatusPage");
|
|
9
|
-
expect(source).toContain("
|
|
10
|
-
expect(source).toContain(
|
|
9
|
+
expect(source).toContain('kind: kind === "task" ? "all-tasks" : kind');
|
|
10
|
+
expect(source).toContain(
|
|
11
|
+
'kind === "task" ? page.tasks : kind === "spec" ? page.specs : page.prds',
|
|
12
|
+
);
|
|
11
13
|
});
|
|
12
14
|
|
|
13
15
|
it("keeps a dedicated collection paginated by the loaded typed rows", () => {
|
|
@@ -20,33 +20,34 @@
|
|
|
20
20
|
|
|
21
21
|
.project-settings-state-card {
|
|
22
22
|
display: grid;
|
|
23
|
+
gap: 12px;
|
|
23
24
|
justify-items: center;
|
|
24
|
-
max-width:
|
|
25
|
+
max-width: 420px;
|
|
25
26
|
border: 1px solid #dbe4ef;
|
|
26
27
|
border-radius: 24px;
|
|
27
|
-
padding: clamp(32px, 6vw,
|
|
28
|
+
padding: clamp(32px, 6vw, 48px);
|
|
28
29
|
background: #fff;
|
|
29
30
|
box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
|
|
30
31
|
text-align: center;
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
.project-settings-loader {
|
|
34
|
-
width:
|
|
35
|
-
height:
|
|
36
|
-
|
|
37
|
-
border: 4px solid rgba(0, 176, 240, 0.18);
|
|
35
|
+
width: 32px;
|
|
36
|
+
height: 32px;
|
|
37
|
+
border: 3px solid rgba(0, 176, 240, 0.18);
|
|
38
38
|
border-top-color: #00b0f0;
|
|
39
39
|
border-radius: 50%;
|
|
40
40
|
animation: project-settings-spin 0.8s linear infinite;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
.project-settings-state-card h1 {
|
|
44
|
-
max-width:
|
|
44
|
+
max-width: 18ch;
|
|
45
|
+
font-size: clamp(1.75rem, 5vw, 2.25rem);
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
.project-settings-state-card button {
|
|
48
49
|
width: auto;
|
|
49
|
-
margin-top:
|
|
50
|
+
margin-top: 12px;
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
.project-settings-header {
|
|
@@ -59,7 +60,7 @@
|
|
|
59
60
|
|
|
60
61
|
.project-settings-header p,
|
|
61
62
|
.project-settings-state p {
|
|
62
|
-
margin: 0
|
|
63
|
+
margin: 0;
|
|
63
64
|
color: #006b91;
|
|
64
65
|
font-size: 0.75rem;
|
|
65
66
|
font-weight: 700;
|
|
@@ -406,15 +407,18 @@
|
|
|
406
407
|
|
|
407
408
|
.project-stack-versions > div {
|
|
408
409
|
display: grid;
|
|
409
|
-
grid-template-columns: minmax(0, 1fr);
|
|
410
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
410
411
|
gap: 8px;
|
|
411
412
|
}
|
|
412
413
|
|
|
413
414
|
.project-stack-versions article {
|
|
414
415
|
display: grid;
|
|
415
|
-
grid-template-columns: minmax(
|
|
416
|
-
|
|
417
|
-
|
|
416
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
417
|
+
grid-template-areas:
|
|
418
|
+
"identity badge"
|
|
419
|
+
"source source";
|
|
420
|
+
gap: 7px 12px;
|
|
421
|
+
align-items: start;
|
|
418
422
|
min-width: 0;
|
|
419
423
|
border: 1px solid #dbe4ef;
|
|
420
424
|
border-radius: 12px;
|
|
@@ -422,13 +426,22 @@
|
|
|
422
426
|
background: #f8fafc;
|
|
423
427
|
}
|
|
424
428
|
|
|
425
|
-
.project-stack-
|
|
429
|
+
.project-stack-version-identity {
|
|
430
|
+
display: flex;
|
|
431
|
+
grid-area: identity;
|
|
432
|
+
align-items: baseline;
|
|
433
|
+
gap: 8px;
|
|
434
|
+
min-width: 0;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
.project-stack-version-identity strong {
|
|
426
438
|
min-width: 0;
|
|
427
439
|
color: #334155;
|
|
428
440
|
font-size: 0.8rem;
|
|
429
441
|
}
|
|
430
442
|
|
|
431
|
-
.project-stack-
|
|
443
|
+
.project-stack-version-identity code {
|
|
444
|
+
flex: none;
|
|
432
445
|
min-width: 0;
|
|
433
446
|
color: #0f172a;
|
|
434
447
|
font-size: 0.8rem;
|
|
@@ -436,6 +449,7 @@
|
|
|
436
449
|
}
|
|
437
450
|
|
|
438
451
|
.project-stack-versions article small {
|
|
452
|
+
grid-area: source;
|
|
439
453
|
min-width: 0;
|
|
440
454
|
color: #64748b;
|
|
441
455
|
font-size: 0.68rem;
|
|
@@ -444,6 +458,7 @@
|
|
|
444
458
|
}
|
|
445
459
|
|
|
446
460
|
.project-stack-versions article span {
|
|
461
|
+
grid-area: badge;
|
|
447
462
|
width: fit-content;
|
|
448
463
|
border-radius: 999px;
|
|
449
464
|
padding: 3px 6px;
|
|
@@ -726,29 +741,24 @@
|
|
|
726
741
|
|
|
727
742
|
.project-stack-versions article {
|
|
728
743
|
grid-template-areas:
|
|
729
|
-
"
|
|
730
|
-
"
|
|
744
|
+
"identity badge"
|
|
745
|
+
"source source";
|
|
731
746
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
732
747
|
gap: 6px 10px;
|
|
733
748
|
align-items: start;
|
|
734
749
|
padding: 10px 12px;
|
|
735
750
|
}
|
|
736
751
|
|
|
737
|
-
.project-stack-versions
|
|
738
|
-
grid-
|
|
739
|
-
}
|
|
740
|
-
|
|
741
|
-
.project-stack-versions article code {
|
|
742
|
-
grid-area: version;
|
|
752
|
+
.project-stack-versions > div {
|
|
753
|
+
grid-template-columns: 1fr;
|
|
743
754
|
}
|
|
744
755
|
|
|
745
756
|
.project-stack-versions article span {
|
|
746
|
-
|
|
757
|
+
align-self: start;
|
|
747
758
|
}
|
|
748
759
|
|
|
749
760
|
.project-stack-versions article small {
|
|
750
|
-
|
|
751
|
-
text-align: right;
|
|
761
|
+
text-align: left;
|
|
752
762
|
}
|
|
753
763
|
|
|
754
764
|
.project-stack-table {
|
|
@@ -34,8 +34,8 @@ const config: ProjectConfigSettings = {
|
|
|
34
34
|
|
|
35
35
|
describe("project settings form mapping", () => {
|
|
36
36
|
it("renders a canonical framework SemVer as a short major.minor label", () => {
|
|
37
|
-
expect(shortFrameworkVersion("1.0
|
|
38
|
-
expect(shortFrameworkVersion("v1.0
|
|
37
|
+
expect(shortFrameworkVersion("1.3.0")).toBe("v1.3");
|
|
38
|
+
expect(shortFrameworkVersion("v1.3.0")).toBe("v1.3");
|
|
39
39
|
expect(shortFrameworkVersion("1.0")).toBeNull();
|
|
40
40
|
});
|
|
41
41
|
|
|
@@ -6,25 +6,60 @@ describe("snapshot update banner semantics", () => {
|
|
|
6
6
|
it("delays the notice, then hides it on dismiss or completed initial load", () => {
|
|
7
7
|
expect(snapshotNoticeDelayMs).toBe(1_500);
|
|
8
8
|
// A fast first-fold load completes before the delay and never flashes.
|
|
9
|
-
expect(
|
|
9
|
+
expect(
|
|
10
|
+
shouldShowSnapshotNotice({
|
|
11
|
+
snapshotUpdating: true,
|
|
12
|
+
initialDataPending: true,
|
|
13
|
+
dismissed: false,
|
|
14
|
+
delayElapsed: false,
|
|
15
|
+
}),
|
|
16
|
+
).toBe(false);
|
|
10
17
|
// A genuinely slow initial read receives the helpful stale-snapshot notice.
|
|
11
|
-
expect(
|
|
12
|
-
|
|
13
|
-
|
|
18
|
+
expect(
|
|
19
|
+
shouldShowSnapshotNotice({
|
|
20
|
+
snapshotUpdating: true,
|
|
21
|
+
initialDataPending: true,
|
|
22
|
+
dismissed: false,
|
|
23
|
+
delayElapsed: true,
|
|
24
|
+
}),
|
|
25
|
+
).toBe(true);
|
|
26
|
+
expect(
|
|
27
|
+
shouldShowSnapshotNotice({
|
|
28
|
+
snapshotUpdating: true,
|
|
29
|
+
initialDataPending: true,
|
|
30
|
+
dismissed: true,
|
|
31
|
+
delayElapsed: true,
|
|
32
|
+
}),
|
|
33
|
+
).toBe(false);
|
|
34
|
+
expect(
|
|
35
|
+
shouldShowSnapshotNotice({
|
|
36
|
+
snapshotUpdating: true,
|
|
37
|
+
initialDataPending: false,
|
|
38
|
+
dismissed: false,
|
|
39
|
+
delayElapsed: true,
|
|
40
|
+
}),
|
|
41
|
+
).toBe(false);
|
|
14
42
|
});
|
|
15
43
|
|
|
16
44
|
it("presents a stale local snapshot as neutral status and reserves alert red for errors", () => {
|
|
17
45
|
const app = readFileSync(new URL("./App.tsx", import.meta.url), "utf8");
|
|
18
46
|
const boundary = readFileSync(new URL("./AppLoadingBoundary.tsx", import.meta.url), "utf8");
|
|
47
|
+
const overlays = readFileSync(new URL("./AppOverlays.tsx", import.meta.url), "utf8");
|
|
19
48
|
const styles = readFileSync(new URL("./styles.css", import.meta.url), "utf8");
|
|
20
|
-
const snapshot = app.slice(
|
|
49
|
+
const snapshot = app.slice(
|
|
50
|
+
app.indexOf("const initialDataPending"),
|
|
51
|
+
app.indexOf("const renderedOperations"),
|
|
52
|
+
);
|
|
53
|
+
const compactSnapshot = snapshot.replace(/\s+/g, " ");
|
|
21
54
|
const error = app.slice(app.indexOf("{error ?"), app.indexOf("{/* Cost Monitor boundary"));
|
|
22
55
|
|
|
23
56
|
expect(snapshot).toContain('className="app-notice app-snapshot-status" role="status"');
|
|
24
57
|
expect(snapshot).toContain('aria-live="polite"');
|
|
25
58
|
expect(snapshot).toContain("shouldShowSnapshotNotice({");
|
|
26
59
|
expect(snapshot).toContain("delayElapsed: snapshotNoticeDelayElapsed,");
|
|
27
|
-
expect(
|
|
60
|
+
expect(compactSnapshot).toMatch(
|
|
61
|
+
/window\.setTimeout\(\s*\(\) => setSnapshotNoticeDelayElapsed\(true\),\s*snapshotNoticeDelayMs,?\s*\)/,
|
|
62
|
+
);
|
|
28
63
|
expect(snapshot).toContain("return () => window.clearTimeout(timeout);");
|
|
29
64
|
expect(snapshot).toContain("setSnapshotNoticeDismissed(true)");
|
|
30
65
|
expect(snapshot).toContain('"Fechar aviso de atualização do snapshot"');
|
|
@@ -36,7 +71,13 @@ describe("snapshot update banner semantics", () => {
|
|
|
36
71
|
expect(error).toContain('aria-live="assertive"');
|
|
37
72
|
expect(error).toContain('"Fechar erro"');
|
|
38
73
|
expect(error).toContain('"Dismiss error"');
|
|
74
|
+
expect(overlays).not.toContain('role="alert"');
|
|
75
|
+
expect(overlays).not.toContain('className="app-warning"');
|
|
76
|
+
expect(overlays).not.toContain("startupReconciliation");
|
|
77
|
+
expect(overlays).not.toContain('"Fechar aviso de reconciliação"');
|
|
78
|
+
expect(overlays).not.toContain('"Dismiss reconciliation notice"');
|
|
39
79
|
expect(styles).toContain(".app-snapshot-status {");
|
|
80
|
+
expect(styles).toContain(".app-refresh-status-close {");
|
|
40
81
|
expect(styles).toContain("background: rgba(8, 47, 73, 0.96);");
|
|
41
82
|
expect(styles).toContain(".app-warning.app-error {");
|
|
42
83
|
expect(styles).toContain("background: rgba(69, 16, 16, 0.96);");
|
|
@@ -2,6 +2,7 @@ import { readFileSync } from "node:fs";
|
|
|
2
2
|
import { describe, expect, it } from "vitest";
|
|
3
3
|
import { isCurrentDashboardRequest, mergeBoardPages, needsAtomicCostSnapshot } from "./App.js";
|
|
4
4
|
import { loadAtomicCostSnapshot } from "./snapshot-coherence.js";
|
|
5
|
+
import { projectionRefreshDebounceMs, shouldRefreshVisibleProjection } from "./use-app-effects.js";
|
|
5
6
|
|
|
6
7
|
describe("atomic Cost snapshot loading", () => {
|
|
7
8
|
it("keeps Operations, Cost, and cards on one source generation while the source moves", async () => {
|
|
@@ -47,12 +48,18 @@ describe("atomic Cost snapshot loading", () => {
|
|
|
47
48
|
expect(costSelection).not.toContain("loadOperationsDetails");
|
|
48
49
|
});
|
|
49
50
|
|
|
50
|
-
it("
|
|
51
|
+
it("never blocks the dashboard or starts a full snapshot for a paged Cost request", () => {
|
|
51
52
|
const app = readFileSync(new URL("./App.tsx", import.meta.url), "utf8");
|
|
52
|
-
const globalGate = app.slice(
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
const globalGate = app.slice(
|
|
54
|
+
app.indexOf("const globalLoadingPending"),
|
|
55
|
+
app.indexOf("const renderedOperations"),
|
|
56
|
+
);
|
|
57
|
+
expect(app).toContain("const [, setCostSurfaceLoading] = useState(false);");
|
|
58
|
+
expect(globalGate).not.toContain("costSurfaceLoading");
|
|
59
|
+
expect(globalGate).not.toContain("operationsSurfaceLoading");
|
|
60
|
+
expect(globalGate).not.toContain("entityPage.loading");
|
|
61
|
+
expect(app).not.toContain("api.snapshot(currency, period)");
|
|
62
|
+
expect(app).not.toContain("useIdleCostPrefetch");
|
|
56
63
|
});
|
|
57
64
|
|
|
58
65
|
it("does not request Cost Monitor while the initial route is Operations", () => {
|
|
@@ -94,6 +101,46 @@ describe("atomic Cost snapshot loading", () => {
|
|
|
94
101
|
expect(app).toContain('setLoadingArea("costs")');
|
|
95
102
|
});
|
|
96
103
|
|
|
104
|
+
it("coalesces focus and visibility events into one non-reconciling projection refresh", () => {
|
|
105
|
+
expect(
|
|
106
|
+
shouldRefreshVisibleProjection({
|
|
107
|
+
visibilityState: "visible",
|
|
108
|
+
inFlight: false,
|
|
109
|
+
lastRefreshAt: 0,
|
|
110
|
+
now: projectionRefreshDebounceMs,
|
|
111
|
+
}),
|
|
112
|
+
).toBe(true);
|
|
113
|
+
expect(
|
|
114
|
+
shouldRefreshVisibleProjection({
|
|
115
|
+
visibilityState: "visible",
|
|
116
|
+
inFlight: false,
|
|
117
|
+
lastRefreshAt: projectionRefreshDebounceMs,
|
|
118
|
+
now: projectionRefreshDebounceMs + 1,
|
|
119
|
+
}),
|
|
120
|
+
).toBe(false);
|
|
121
|
+
expect(
|
|
122
|
+
shouldRefreshVisibleProjection({
|
|
123
|
+
visibilityState: "hidden",
|
|
124
|
+
inFlight: false,
|
|
125
|
+
lastRefreshAt: 0,
|
|
126
|
+
now: projectionRefreshDebounceMs * 2,
|
|
127
|
+
}),
|
|
128
|
+
).toBe(false);
|
|
129
|
+
const effects = readFileSync(new URL("./use-app-effects.ts", import.meta.url), "utf8");
|
|
130
|
+
expect(effects).toContain('window.addEventListener("focus", refreshVisibleProjection)');
|
|
131
|
+
expect(effects).toContain(
|
|
132
|
+
'document.addEventListener("visibilitychange", refreshVisibleProjection)',
|
|
133
|
+
);
|
|
134
|
+
expect(effects).not.toContain("setInterval");
|
|
135
|
+
expect(effects).toContain("void refresh(false, false, true)");
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
it("does not reconcile open work automatically", () => {
|
|
139
|
+
const app = readFileSync(new URL("./App.tsx", import.meta.url), "utf8");
|
|
140
|
+
expect(app).not.toContain("startupReconciliation");
|
|
141
|
+
expect(app).toContain("await refresh(false, reconcileOpenWork, !reconcileOpenWork)");
|
|
142
|
+
});
|
|
143
|
+
|
|
97
144
|
it("removes the global Cost detail request and keeps stale request guards", () => {
|
|
98
145
|
const app = readFileSync(new URL("./App.tsx", import.meta.url), "utf8");
|
|
99
146
|
const costPage = readFileSync(
|
|
@@ -193,13 +240,16 @@ describe("atomic Cost snapshot loading", () => {
|
|
|
193
240
|
app.indexOf("const loadCostDetails"),
|
|
194
241
|
);
|
|
195
242
|
|
|
196
|
-
expect(boardHydration).toContain("
|
|
197
|
-
expect(boardHydration).toContain(
|
|
198
|
-
|
|
243
|
+
expect(boardHydration).toContain("offset += 3");
|
|
244
|
+
expect(boardHydration).toContain(
|
|
245
|
+
"await Promise.all(batch.map((stage) => loadMoreBoard(stage)))",
|
|
246
|
+
);
|
|
247
|
+
expect(boardHydration).toContain("window.requestIdleCallback(() => void hydrateBoard())");
|
|
248
|
+
expect(boardHydration).toContain("window.setTimeout(() => void hydrateBoard(), 0)");
|
|
199
249
|
expect(boardHydration).toContain("!boardInitialPageRef.current.has(stage)");
|
|
200
250
|
expect(boardHydration).toContain("boardInitialPageRef.current.add(stage)");
|
|
201
251
|
expect(boardHydration).toContain("!boardInFlightRef.current.has(stage)");
|
|
202
|
-
expect(boardHydration).toContain("
|
|
252
|
+
expect(boardHydration).toContain("boardInitialPageRef.current.add(stage)");
|
|
203
253
|
});
|
|
204
254
|
|
|
205
255
|
it("merges concurrent board pages without replacing rows from another stage", () => {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { describe, expect, it, vi } from "vitest";
|
|
2
|
+
import { allSqliteExportPages } from "./sqlite-page-export.js";
|
|
3
|
+
|
|
4
|
+
describe("complete SQLite export", () => {
|
|
5
|
+
it("exports every filtered page, even when the visual page contains only ten rows", async () => {
|
|
6
|
+
const second = vi.fn().mockResolvedValue({
|
|
7
|
+
offset: 100,
|
|
8
|
+
total_count: 145,
|
|
9
|
+
has_more: false,
|
|
10
|
+
rows: Array.from({ length: 45 }, (_, id) => ({ id: `standalone-${id}` })),
|
|
11
|
+
});
|
|
12
|
+
const first = {
|
|
13
|
+
offset: 0,
|
|
14
|
+
total_count: 145,
|
|
15
|
+
has_more: true,
|
|
16
|
+
rows: Array.from({ length: 100 }, (_, id) => ({ id: `standalone-${id}` })),
|
|
17
|
+
};
|
|
18
|
+
const pages = [] as Array<readonly { id: string }[]>;
|
|
19
|
+
for await (const page of allSqliteExportPages(first, second)) pages.push(page);
|
|
20
|
+
|
|
21
|
+
expect(pages.flat()).toHaveLength(145);
|
|
22
|
+
expect(second).toHaveBeenCalledWith(100);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
it("keeps the active PRD or standalone-task kind in the export source", async () => {
|
|
26
|
+
const source = await import("node:fs/promises").then(({ readFile }) =>
|
|
27
|
+
readFile(new URL("./use-operations-detail-export.ts", import.meta.url), "utf8"),
|
|
28
|
+
);
|
|
29
|
+
expect(source).toContain('source === "operations_work_list" && filters.kind');
|
|
30
|
+
expect(source).toContain("limit: 100");
|
|
31
|
+
});
|
|
32
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type SqliteExportPage<Row extends Record<string, unknown>> = {
|
|
2
|
+
offset: number;
|
|
3
|
+
total_count: number;
|
|
4
|
+
has_more: boolean;
|
|
5
|
+
rows: readonly Row[];
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
/** Export transport deliberately follows every server page, unlike the UI. */
|
|
9
|
+
export async function* allSqliteExportPages<Row extends Record<string, unknown>>(
|
|
10
|
+
firstPage: SqliteExportPage<Row>,
|
|
11
|
+
loadPage: (offset: number) => Promise<SqliteExportPage<Row>>,
|
|
12
|
+
): AsyncGenerator<readonly Row[]> {
|
|
13
|
+
let page = firstPage;
|
|
14
|
+
while (true) {
|
|
15
|
+
if (page.rows.length === 0) return;
|
|
16
|
+
yield page.rows;
|
|
17
|
+
const nextOffset = page.offset + page.rows.length;
|
|
18
|
+
if (!page.has_more || nextOffset >= page.total_count) return;
|
|
19
|
+
page = await loadPage(nextOffset);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -438,6 +438,25 @@ select:focus-visible {
|
|
|
438
438
|
font-size: 0.78rem;
|
|
439
439
|
}
|
|
440
440
|
|
|
441
|
+
.app-refresh-status-close {
|
|
442
|
+
flex: 0 0 auto;
|
|
443
|
+
align-self: flex-start;
|
|
444
|
+
border: 0;
|
|
445
|
+
border-radius: 6px;
|
|
446
|
+
padding: 0 5px;
|
|
447
|
+
color: #cbd5e1;
|
|
448
|
+
background: transparent;
|
|
449
|
+
cursor: pointer;
|
|
450
|
+
font-size: 1.25rem;
|
|
451
|
+
line-height: 1;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
.app-refresh-status-close:hover,
|
|
455
|
+
.app-refresh-status-close:focus-visible {
|
|
456
|
+
color: #f8fafc;
|
|
457
|
+
background: rgba(148, 163, 184, 0.16);
|
|
458
|
+
}
|
|
459
|
+
|
|
441
460
|
.app-reconciliation-result {
|
|
442
461
|
position: fixed;
|
|
443
462
|
z-index: 80;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import {
|
|
3
|
+
appendTraceabilityTaskPage,
|
|
4
|
+
nextTraceabilityVisibleCount,
|
|
5
|
+
traceabilityTaskPageSize,
|
|
6
|
+
} from "./traceability-task-pagination.js";
|
|
7
|
+
|
|
8
|
+
describe("traceability task pagination", () => {
|
|
9
|
+
it("advances offsets through the API total while preserving unique tasks", () => {
|
|
10
|
+
const task = (id: string) => ({ id, title: id }) as never;
|
|
11
|
+
const first = appendTraceabilityTaskPage({
|
|
12
|
+
cursor: { offset: 0, stageIndex: 0 },
|
|
13
|
+
page: { tasks: [task("TASK-1"), task("TASK-2")], total: 3 } as never,
|
|
14
|
+
tasks: [],
|
|
15
|
+
});
|
|
16
|
+
const second = appendTraceabilityTaskPage({
|
|
17
|
+
cursor: first.cursor,
|
|
18
|
+
page: { tasks: [task("TASK-2"), task("TASK-3")], total: 3 } as never,
|
|
19
|
+
tasks: first.tasks,
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
expect(first.cursor).toEqual({ offset: 2, stageIndex: 0 });
|
|
23
|
+
expect(second.cursor).toEqual({ offset: 0, stageIndex: 1 });
|
|
24
|
+
expect(second.tasks.map((item) => item.id)).toEqual(["TASK-1", "TASK-2", "TASK-3"]);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it("advances the rendered list by a deterministic concise batch", () => {
|
|
28
|
+
expect(traceabilityTaskPageSize).toBe(10);
|
|
29
|
+
expect(nextTraceabilityVisibleCount(12, 30, 12)).toBe(24);
|
|
30
|
+
expect(nextTraceabilityVisibleCount(24, 30, 12)).toBe(30);
|
|
31
|
+
});
|
|
32
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { OperationsProjection } from "@zaip-ai/dashboard-operations/contracts";
|
|
2
|
+
import type { OperationsBoardPage } from "./dashboard-api.js";
|
|
3
|
+
|
|
4
|
+
/** The selector is a navigation aid, not a full task export. */
|
|
5
|
+
export const traceabilityTaskPageSize = 10;
|
|
6
|
+
|
|
7
|
+
export type TraceabilityTaskCursor = { offset: number; stageIndex: number };
|
|
8
|
+
|
|
9
|
+
export function appendTraceabilityTaskPage({
|
|
10
|
+
cursor,
|
|
11
|
+
page,
|
|
12
|
+
tasks,
|
|
13
|
+
}: {
|
|
14
|
+
cursor: TraceabilityTaskCursor;
|
|
15
|
+
page: OperationsBoardPage;
|
|
16
|
+
tasks: OperationsProjection["tasks"];
|
|
17
|
+
}): { cursor: TraceabilityTaskCursor; tasks: OperationsProjection["tasks"] } {
|
|
18
|
+
const tasksById = new Map(tasks.map((task) => [task.id, task]));
|
|
19
|
+
for (const task of page.tasks) tasksById.set(task.id, task);
|
|
20
|
+
const nextOffset = cursor.offset + page.tasks.length;
|
|
21
|
+
return {
|
|
22
|
+
tasks: [...tasksById.values()],
|
|
23
|
+
cursor:
|
|
24
|
+
page.tasks.length === 0 || nextOffset >= page.total
|
|
25
|
+
? { offset: 0, stageIndex: cursor.stageIndex + 1 }
|
|
26
|
+
: { ...cursor, offset: nextOffset },
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function nextTraceabilityVisibleCount(
|
|
31
|
+
visibleCount: number,
|
|
32
|
+
totalCount: number,
|
|
33
|
+
batchSize: number,
|
|
34
|
+
): number {
|
|
35
|
+
return Math.min(totalCount, visibleCount + batchSize);
|
|
36
|
+
}
|
|
@@ -63,13 +63,17 @@
|
|
|
63
63
|
outline: none;
|
|
64
64
|
background: rgba(56, 189, 248, 0.15);
|
|
65
65
|
}
|
|
66
|
-
.traceability-task-results
|
|
67
|
-
.traceability-task-
|
|
66
|
+
.traceability-task-no-results,
|
|
67
|
+
.traceability-task-pagination-status {
|
|
68
68
|
color: #a8b6c9;
|
|
69
69
|
}
|
|
70
70
|
.traceability-task-no-results {
|
|
71
71
|
padding: 12px;
|
|
72
72
|
}
|
|
73
|
+
.traceability-task-pagination-status {
|
|
74
|
+
margin: 0;
|
|
75
|
+
font-size: 0.78rem;
|
|
76
|
+
}
|
|
73
77
|
.traceability-workspace > header small {
|
|
74
78
|
max-width: 360px;
|
|
75
79
|
color: #71829a;
|