@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
|
@@ -39,15 +39,16 @@ import type {
|
|
|
39
39
|
import { DashboardApiClient } from "./dashboard-api.js";
|
|
40
40
|
import { defaultOperationsPeriod, requestPeriodForOperations } from "./operations-period.js";
|
|
41
41
|
import { shouldShowSnapshotNotice, snapshotNoticeDelayMs } from "./snapshot-notice.js";
|
|
42
|
+
import {
|
|
43
|
+
appendTraceabilityTaskPage,
|
|
44
|
+
traceabilityTaskPageSize,
|
|
45
|
+
} from "./traceability-task-pagination.js";
|
|
42
46
|
import { useAppCostLoaders } from "./use-app-cost-loaders.js";
|
|
43
47
|
import { useAppEffects } from "./use-app-effects.js";
|
|
44
48
|
import { useAppOperationsPages } from "./use-app-operations-pages.js";
|
|
45
49
|
import { useAppTraceDocuments } from "./use-app-trace-documents.js";
|
|
46
|
-
import {
|
|
47
|
-
|
|
48
|
-
normalizeWorkListFilters,
|
|
49
|
-
selectedWorkListKinds,
|
|
50
|
-
} from "./work-list-pagination.js";
|
|
50
|
+
import { useAppWorkListPage } from "./use-app-work-list-page.js";
|
|
51
|
+
import { useOperationsDetailExport } from "./use-operations-detail-export.js";
|
|
51
52
|
import "./loading-feedback.css";
|
|
52
53
|
import "./period-transition-overlay.css";
|
|
53
54
|
|
|
@@ -55,16 +56,26 @@ type BoardStageState = { loading: boolean; error: string | null };
|
|
|
55
56
|
type OverviewStatusKind = "task" | "spec" | "prd";
|
|
56
57
|
type OverviewClassification = "lite" | "standard" | "critical" | "empty" | "structured" | "rework";
|
|
57
58
|
type OverviewStatusPage = {
|
|
58
|
-
items:
|
|
59
|
+
items:
|
|
60
|
+
| OperationsProjection["tasks"]
|
|
61
|
+
| OperationsProjection["specs"]
|
|
62
|
+
| OperationsProjection["prds"];
|
|
59
63
|
total: number;
|
|
60
64
|
loading: boolean;
|
|
61
65
|
error: string | null;
|
|
62
66
|
};
|
|
63
|
-
type OverviewStatusPages = Partial<
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
const
|
|
67
|
-
`${
|
|
67
|
+
type OverviewStatusPages = Partial<
|
|
68
|
+
Record<`${WorkBoardStage}:${OverviewStatusKind}`, OverviewStatusPage>
|
|
69
|
+
>;
|
|
70
|
+
const overviewStatusPageKey = (stage: WorkBoardStage, kind: OverviewStatusKind) =>
|
|
71
|
+
`${stage}:${kind}` as const;
|
|
72
|
+
type OverviewClassificationPages = Partial<
|
|
73
|
+
Record<`${OverviewStatusKind}:${OverviewClassification}`, OverviewStatusPage>
|
|
74
|
+
>;
|
|
75
|
+
const overviewClassificationPageKey = (
|
|
76
|
+
kind: OverviewStatusKind,
|
|
77
|
+
classification: OverviewClassification,
|
|
78
|
+
) => `${kind}:${classification}` as const;
|
|
68
79
|
const initialWorkBoardStages: readonly WorkBoardStage[] = [
|
|
69
80
|
"definition",
|
|
70
81
|
"planning",
|
|
@@ -88,16 +99,6 @@ const traceTaskSearchStages: readonly WorkBoardStage[] = [
|
|
|
88
99
|
"definition",
|
|
89
100
|
];
|
|
90
101
|
|
|
91
|
-
/** Mounts the Daily Cost view without requesting the historical summary blob. */
|
|
92
|
-
function dailyCostSeed(
|
|
93
|
-
currency: "BRL" | "USD",
|
|
94
|
-
filters: CostMonitorProjection["filters"],
|
|
95
|
-
): CostMonitorProjection {
|
|
96
|
-
const metric = { events: 0, tokens: { input: null, cached_input: null, output: null, reasoning: null, total: null }, cost: { usd: null, brl: null }, coverage: { events: 0, tokens: 0, usd: 0, brl: 0 } };
|
|
97
|
-
const usage = { conversation: metric, planning: metric, execution: metric, total: metric, new_work: metric, rework: metric };
|
|
98
|
-
return { schema_version: 2, layout_version: 2, readonly: true, source: ".agents/records", aggregate_only: true, data_source: "run_records", legacy_effort_baseline: null, currency, pricing: { catalog_updated_at: null, fx_rate: null, conversion_applied: false }, filters, overview: { task_count: 0, run_count: 0, event_count: 0, total_tokens: null, estimated_usd: null, estimated_brl: null, recorded_usd: null, recorded_brl: null, average_run_cost_usd: null, average_run_cost_brl: null, average_run_duration_ms: null, known_tokens_per_cycle: null, top_10_token_share: null, coverage: { events: 0, tokens: 0, usd: 0, brl: 0 } }, filters_available: { providers: [], agents: [], models: [], statuses: [], priorities: [], risks: [], phases: [], origins: [], work_types: [] }, configured_agents: [], usage, origins: { conversation: usage, task: usage, spec: usage, prd: usage }, prds: [], specs: [], runs: [], groups: { conversations: [], tasks: [], providers: [], agents: [], models: [], daily: [], monthly: [], annual: [] } };
|
|
99
|
-
}
|
|
100
|
-
|
|
101
102
|
export {
|
|
102
103
|
isAbortError,
|
|
103
104
|
isCurrentDashboardRequest,
|
|
@@ -115,7 +116,8 @@ export function App() {
|
|
|
115
116
|
const [snapshotNoticeDelayElapsed, setSnapshotNoticeDelayElapsed] = useState(false);
|
|
116
117
|
const token = useMemo(readDashboardSessionToken, []);
|
|
117
118
|
const api = useMemo(() => new DashboardApiClient(token), [token]);
|
|
118
|
-
const { loadCostDetail, loadCostReadModelPage, loadCostRunPage, loadCostGroupPage } =
|
|
119
|
+
const { loadCostDetail, loadCostReadModelPage, loadCostRunPage, loadCostGroupPage } =
|
|
120
|
+
useAppCostLoaders(api);
|
|
119
121
|
const [dashboardView, setDashboardView] = useState<DashboardView | null>(() =>
|
|
120
122
|
initialDashboardView(window.location.pathname),
|
|
121
123
|
);
|
|
@@ -141,7 +143,8 @@ export function App() {
|
|
|
141
143
|
{},
|
|
142
144
|
);
|
|
143
145
|
const [overviewStatusPages, setOverviewStatusPages] = useState<OverviewStatusPages>({});
|
|
144
|
-
const [overviewClassificationPages, setOverviewClassificationPages] =
|
|
146
|
+
const [overviewClassificationPages, setOverviewClassificationPages] =
|
|
147
|
+
useState<OverviewClassificationPages>({});
|
|
145
148
|
const [costs, setCosts] = useState<CostMonitorProjection | null>(null);
|
|
146
149
|
const [displayedCosts, setDisplayedCosts] = useState<CostMonitorProjection | null>(null);
|
|
147
150
|
const [costLocale, setCostLocale] = useState<CostLocale>(savedLocale);
|
|
@@ -162,8 +165,8 @@ export function App() {
|
|
|
162
165
|
const [fxRate, setFxRate] = useState<FxRate | null>(null);
|
|
163
166
|
const [pathname, setPathname] = useState(window.location.pathname);
|
|
164
167
|
const [operationsLoading, setOperationsLoading] = useState(true);
|
|
165
|
-
const [
|
|
166
|
-
const [
|
|
168
|
+
const [, setOperationsSurfaceLoading] = useState(false);
|
|
169
|
+
const [, setCostSurfaceLoading] = useState(false);
|
|
167
170
|
const [periodTransitionPending, setPeriodTransitionPending] = useState(false);
|
|
168
171
|
const [loadingArea, setLoadingArea] = useState<LoadingArea | null>("operations");
|
|
169
172
|
const [failedArea, setFailedArea] = useState<LoadingArea | null>(null);
|
|
@@ -171,7 +174,10 @@ export function App() {
|
|
|
171
174
|
"choose" | "refreshing" | "reconciling" | null
|
|
172
175
|
>(null);
|
|
173
176
|
useEffect(() => {
|
|
174
|
-
void api
|
|
177
|
+
void api
|
|
178
|
+
.ready()
|
|
179
|
+
.then((ready) => setSnapshotUpdating(ready.snapshot_state === "updating"))
|
|
180
|
+
.catch(() => {});
|
|
175
181
|
}, [api]);
|
|
176
182
|
const [error, setError] = useState<string | null>(null);
|
|
177
183
|
const [reconciliationResult, setReconciliationResult] = useState<ReconciliationResult | null>(
|
|
@@ -200,7 +206,15 @@ export function App() {
|
|
|
200
206
|
traceLoadingTaskId,
|
|
201
207
|
traceTasks,
|
|
202
208
|
} = useAppTraceDocuments({ api, operations, setError, setFailedArea, setLoadingArea });
|
|
209
|
+
const traceTasksRef = useRef(traceTasks);
|
|
210
|
+
const traceTaskCursorRef = useRef({ offset: 0, stageIndex: 0 });
|
|
211
|
+
const traceTasksLoadingRef = useRef(false);
|
|
212
|
+
const [traceTasksHasMore, setTraceTasksHasMore] = useState(false);
|
|
213
|
+
const [traceTasksLoading, setTraceTasksLoading] = useState(false);
|
|
203
214
|
const refreshVersion = useRef(0);
|
|
215
|
+
useEffect(() => {
|
|
216
|
+
traceTasksRef.current = traceTasks;
|
|
217
|
+
}, [traceTasks]);
|
|
204
218
|
const periodTransitionVersionRef = useRef(0);
|
|
205
219
|
const detailLoadInFlight = useRef(false);
|
|
206
220
|
const costLoadingCount = useRef(0);
|
|
@@ -214,6 +228,7 @@ export function App() {
|
|
|
214
228
|
const operationsPageRequestVersionRef = useRef(0);
|
|
215
229
|
const boardLoadedRef = useRef<Partial<Record<WorkBoardStage, number>>>({});
|
|
216
230
|
const boardInFlightRef = useRef(new Set<WorkBoardStage>());
|
|
231
|
+
const boardAbortControllersRef = useRef(new Map<WorkBoardStage, AbortController>());
|
|
217
232
|
const overviewStatusInFlightRef = useRef(new Set<string>());
|
|
218
233
|
const boardInitialPageRef = useRef(new Set<WorkBoardStage>());
|
|
219
234
|
const boardFiltersRef = useRef<OperationsPageFilters>({
|
|
@@ -223,27 +238,31 @@ export function App() {
|
|
|
223
238
|
origin: "",
|
|
224
239
|
kind: "",
|
|
225
240
|
});
|
|
226
|
-
const workListFiltersRef = useRef<OperationsPageFilters>({
|
|
227
|
-
query: "",
|
|
228
|
-
status: "",
|
|
229
|
-
risk: "",
|
|
230
|
-
});
|
|
231
241
|
const boardFilterKeyRef = useRef("||||");
|
|
232
242
|
const boardRequestVersionRef = useRef(0);
|
|
233
243
|
const quickOverviewMetricsRef =
|
|
234
244
|
useRef<OperationsProjection["summary"]["overview_metrics"]>(undefined);
|
|
245
|
+
const {
|
|
246
|
+
workListPage,
|
|
247
|
+
workListFiltersRef,
|
|
248
|
+
loadWorkListFilters,
|
|
249
|
+
loadWorkListPage,
|
|
250
|
+
resetWorkListPage,
|
|
251
|
+
} = useAppWorkListPage({ api, operationsPeriod, operationsPeriodRef });
|
|
235
252
|
// A new local SQLite generation is immutable and verified by the launcher.
|
|
236
253
|
// Its server begins warming the compact first fold as soon as readiness is
|
|
237
254
|
// observed, so the first paint must join that bounded cache instead of
|
|
238
255
|
// forcing a second full aggregate calculation.
|
|
239
256
|
const initialAggregateFreshRef = useRef(false);
|
|
240
257
|
const refresh = useCallback(
|
|
241
|
-
async (visible = true, reconcileOpenWork = false) => {
|
|
258
|
+
async (visible = true, reconcileOpenWork = false, refreshProjection = false) => {
|
|
242
259
|
operationsDetailCancelRef.current?.();
|
|
243
260
|
operationsDetailCancelRef.current = null;
|
|
244
261
|
operationsDetailAbortRef.current?.abort();
|
|
245
262
|
operationsDetailAbortRef.current = null;
|
|
246
263
|
boardRequestVersionRef.current += 1;
|
|
264
|
+
for (const controller of boardAbortControllersRef.current.values()) controller.abort();
|
|
265
|
+
boardAbortControllersRef.current.clear();
|
|
247
266
|
boardInFlightRef.current.clear();
|
|
248
267
|
boardInitialPageRef.current.clear();
|
|
249
268
|
boardLoadedRef.current = {};
|
|
@@ -271,10 +290,20 @@ export function App() {
|
|
|
271
290
|
setError(null);
|
|
272
291
|
setFailedArea(null);
|
|
273
292
|
try {
|
|
274
|
-
if (reconcileOpenWork) {
|
|
275
|
-
|
|
293
|
+
if (reconcileOpenWork || refreshProjection) {
|
|
294
|
+
let snapshot: Awaited<ReturnType<typeof api.refreshProjection>>;
|
|
295
|
+
let reconciliation:
|
|
296
|
+
| Awaited<ReturnType<typeof api.reconcileOpenWork>>["reconciliation"]
|
|
297
|
+
| null = null;
|
|
298
|
+
if (reconcileOpenWork) {
|
|
299
|
+
const reconciledSnapshot = await api.reconcileOpenWork(currency, period);
|
|
300
|
+
reconciliation = reconciledSnapshot.reconciliation;
|
|
301
|
+
snapshot = reconciledSnapshot;
|
|
302
|
+
} else {
|
|
303
|
+
snapshot = await api.refreshProjection(currency, period);
|
|
304
|
+
}
|
|
276
305
|
if (!isCurrentRequest()) return;
|
|
277
|
-
setReconciliationResult(
|
|
306
|
+
if (reconciliation !== null) setReconciliationResult(reconciliation);
|
|
278
307
|
setOperations(snapshot.operations);
|
|
279
308
|
quickOverviewMetricsRef.current = snapshot.operations.summary.overview_metrics;
|
|
280
309
|
operationsDetailLoadedRef.current = true;
|
|
@@ -297,7 +326,9 @@ export function App() {
|
|
|
297
326
|
// An English first paint must have the factual USD summary
|
|
298
327
|
// before Operations formats currency. BRL retains the fast
|
|
299
328
|
// Operations-only path until the user opens Cost Monitor.
|
|
300
|
-
currency === "USD"
|
|
329
|
+
currency === "USD"
|
|
330
|
+
? api.costMonitor(currency, period, "summary")
|
|
331
|
+
: Promise.resolve(null),
|
|
301
332
|
]);
|
|
302
333
|
if (!isCurrentRequest()) return;
|
|
303
334
|
initialAggregateFreshRef.current = false;
|
|
@@ -409,13 +440,24 @@ export function App() {
|
|
|
409
440
|
const current = operations;
|
|
410
441
|
if (current === null || boardInFlightRef.current.has(stage)) return;
|
|
411
442
|
boardInFlightRef.current.add(stage);
|
|
443
|
+
boardAbortControllersRef.current.get(stage)?.abort();
|
|
444
|
+
const controller = new AbortController();
|
|
445
|
+
boardAbortControllersRef.current.set(stage, controller);
|
|
412
446
|
const requestVersion = boardRequestVersionRef.current;
|
|
413
447
|
const period = requestPeriodForOperations(operationsPeriod);
|
|
414
448
|
setBoardStates((previous) => ({ ...previous, [stage]: { loading: true, error: null } }));
|
|
415
449
|
const loaded = boardLoadedRef.current[stage] ?? 0;
|
|
416
450
|
try {
|
|
417
|
-
const page = await api.operationsBoard(
|
|
451
|
+
const page = await api.operationsBoard(
|
|
452
|
+
period,
|
|
453
|
+
stage,
|
|
454
|
+
loaded,
|
|
455
|
+
boardFiltersRef.current,
|
|
456
|
+
controller.signal,
|
|
457
|
+
10,
|
|
458
|
+
);
|
|
418
459
|
if (
|
|
460
|
+
controller.signal.aborted ||
|
|
419
461
|
requestVersion !== boardRequestVersionRef.current ||
|
|
420
462
|
period.from !== requestPeriodForOperations(operationsPeriodRef.current).from ||
|
|
421
463
|
period.to !== requestPeriodForOperations(operationsPeriodRef.current).to
|
|
@@ -435,7 +477,12 @@ export function App() {
|
|
|
435
477
|
const next = loaded + page.prds.length + page.specs.length + page.tasks.length;
|
|
436
478
|
boardLoadedRef.current = { ...boardLoadedRef.current, [stage]: next };
|
|
437
479
|
} catch (cause) {
|
|
438
|
-
if (
|
|
480
|
+
if (
|
|
481
|
+
controller.signal.aborted ||
|
|
482
|
+
requestVersion !== boardRequestVersionRef.current ||
|
|
483
|
+
isAbortError(cause)
|
|
484
|
+
)
|
|
485
|
+
return;
|
|
439
486
|
setBoardStates((previous) => ({
|
|
440
487
|
...previous,
|
|
441
488
|
[stage]: {
|
|
@@ -446,6 +493,8 @@ export function App() {
|
|
|
446
493
|
} finally {
|
|
447
494
|
if (requestVersion === boardRequestVersionRef.current) {
|
|
448
495
|
boardInFlightRef.current.delete(stage);
|
|
496
|
+
if (boardAbortControllersRef.current.get(stage) === controller)
|
|
497
|
+
boardAbortControllersRef.current.delete(stage);
|
|
449
498
|
setBoardStates((previous) =>
|
|
450
499
|
previous[stage]?.error === null
|
|
451
500
|
? { ...previous, [stage]: { loading: false, error: null } }
|
|
@@ -466,6 +515,8 @@ export function App() {
|
|
|
466
515
|
boardFilterKeyRef.current = filterKey;
|
|
467
516
|
boardFiltersRef.current = normalizedFilters;
|
|
468
517
|
boardRequestVersionRef.current += 1;
|
|
518
|
+
for (const controller of boardAbortControllersRef.current.values()) controller.abort();
|
|
519
|
+
boardAbortControllersRef.current.clear();
|
|
469
520
|
boardInFlightRef.current.clear();
|
|
470
521
|
boardInitialPageRef.current.clear();
|
|
471
522
|
boardLoadedRef.current = {};
|
|
@@ -490,64 +541,6 @@ export function App() {
|
|
|
490
541
|
},
|
|
491
542
|
);
|
|
492
543
|
}, []);
|
|
493
|
-
const loadFilteredWorkList = useCallback(
|
|
494
|
-
async (filters: OperationsPageFilters) => {
|
|
495
|
-
const requestVersion = ++boardRequestVersionRef.current;
|
|
496
|
-
const period = requestPeriodForOperations(operationsPeriod);
|
|
497
|
-
const normalizedFilters = normalizeWorkListFilters(filters, workListFiltersRef.current);
|
|
498
|
-
workListFiltersRef.current = normalizedFilters;
|
|
499
|
-
const requestedKind = selectedWorkListKinds(normalizedFilters.kind);
|
|
500
|
-
const loadKindStage = async (stage: WorkBoardStage, kind: "prd" | "spec" | "task") => {
|
|
501
|
-
return collectWorkListPages(async (offset) => {
|
|
502
|
-
const page = await api.operationsBoard(
|
|
503
|
-
period,
|
|
504
|
-
stage,
|
|
505
|
-
offset,
|
|
506
|
-
{ ...normalizedFilters, kind },
|
|
507
|
-
undefined,
|
|
508
|
-
50,
|
|
509
|
-
);
|
|
510
|
-
return {
|
|
511
|
-
total: page.total,
|
|
512
|
-
received: page.prds.length + page.specs.length + page.tasks.length,
|
|
513
|
-
value: page,
|
|
514
|
-
};
|
|
515
|
-
});
|
|
516
|
-
};
|
|
517
|
-
try {
|
|
518
|
-
const pages = (
|
|
519
|
-
await Promise.all(
|
|
520
|
-
initialWorkBoardStages.flatMap((stage) =>
|
|
521
|
-
requestedKind.map((kind) => loadKindStage(stage, kind)),
|
|
522
|
-
),
|
|
523
|
-
)
|
|
524
|
-
).flat();
|
|
525
|
-
if (
|
|
526
|
-
requestVersion !== boardRequestVersionRef.current ||
|
|
527
|
-
period.from !== requestPeriodForOperations(operationsPeriodRef.current).from ||
|
|
528
|
-
period.to !== requestPeriodForOperations(operationsPeriodRef.current).to
|
|
529
|
-
)
|
|
530
|
-
return;
|
|
531
|
-
const unique = <T extends { id: string }>(rows: readonly T[]) =>
|
|
532
|
-
[...new Map(rows.map((row) => [row.id, row] as const)).values()];
|
|
533
|
-
setOperations((current) =>
|
|
534
|
-
current === null
|
|
535
|
-
? current
|
|
536
|
-
: {
|
|
537
|
-
...current,
|
|
538
|
-
prds: unique(pages.flatMap((page) => page.prds)),
|
|
539
|
-
specs: unique(pages.flatMap((page) => page.specs)),
|
|
540
|
-
tasks: unique(pages.flatMap((page) => page.tasks)),
|
|
541
|
-
},
|
|
542
|
-
);
|
|
543
|
-
} catch (cause) {
|
|
544
|
-
if (requestVersion !== boardRequestVersionRef.current || isAbortError(cause)) return;
|
|
545
|
-
setError(cause instanceof Error ? cause.message : String(cause));
|
|
546
|
-
setFailedArea("operations");
|
|
547
|
-
}
|
|
548
|
-
},
|
|
549
|
-
[api, operationsPeriod],
|
|
550
|
-
);
|
|
551
544
|
const loadOverviewStatusPage = useCallback(
|
|
552
545
|
async (stage: WorkBoardStage, kind: OverviewStatusKind, offset: number) => {
|
|
553
546
|
const key = overviewStatusPageKey(stage, kind);
|
|
@@ -565,7 +558,9 @@ export function App() {
|
|
|
565
558
|
},
|
|
566
559
|
}));
|
|
567
560
|
try {
|
|
568
|
-
const page = await api.operationsBoard(period, stage, offset, {
|
|
561
|
+
const page = await api.operationsBoard(period, stage, offset, {
|
|
562
|
+
kind: kind === "task" ? "all-tasks" : kind,
|
|
563
|
+
});
|
|
569
564
|
if (
|
|
570
565
|
requestVersion !== boardRequestVersionRef.current ||
|
|
571
566
|
period.from !== requestPeriodForOperations(operationsPeriodRef.current).from ||
|
|
@@ -621,7 +616,8 @@ export function App() {
|
|
|
621
616
|
requestVersion !== boardRequestVersionRef.current ||
|
|
622
617
|
period.from !== requestPeriodForOperations(operationsPeriodRef.current).from ||
|
|
623
618
|
period.to !== requestPeriodForOperations(operationsPeriodRef.current).to
|
|
624
|
-
)
|
|
619
|
+
)
|
|
620
|
+
return;
|
|
625
621
|
const items = kind === "task" ? page.tasks : kind === "spec" ? page.specs : page.prds;
|
|
626
622
|
setOverviewClassificationPages((previous) => ({
|
|
627
623
|
...previous,
|
|
@@ -637,8 +633,10 @@ export function App() {
|
|
|
637
633
|
setOverviewClassificationPages((previous) => ({
|
|
638
634
|
...previous,
|
|
639
635
|
[key]: {
|
|
640
|
-
items: previous[key]?.items ?? [],
|
|
641
|
-
|
|
636
|
+
items: previous[key]?.items ?? [],
|
|
637
|
+
total: previous[key]?.total ?? 0,
|
|
638
|
+
loading: false,
|
|
639
|
+
error: cause instanceof Error ? cause.message : String(cause),
|
|
642
640
|
},
|
|
643
641
|
}));
|
|
644
642
|
} finally {
|
|
@@ -683,16 +681,21 @@ export function App() {
|
|
|
683
681
|
},
|
|
684
682
|
[api, operationsPeriod],
|
|
685
683
|
);
|
|
684
|
+
const detailExportSource = useOperationsDetailExport({ api, operationsPeriod });
|
|
686
685
|
useEffect(() => {
|
|
687
686
|
if (dashboardView !== "operations" || operations === null) return;
|
|
688
687
|
let cancelled = false;
|
|
689
|
-
const hydrateBoard = () => {
|
|
688
|
+
const hydrateBoard = async () => {
|
|
690
689
|
if (cancelled) return;
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
690
|
+
// A page per column preserves a fast first board without monopolising
|
|
691
|
+
// SQLite's single local worker with nine simultaneous aggregates.
|
|
692
|
+
const pending = initialWorkBoardStages.filter(
|
|
693
|
+
(stage) => !boardInitialPageRef.current.has(stage) && !boardInFlightRef.current.has(stage),
|
|
694
|
+
);
|
|
695
|
+
for (let offset = 0; offset < pending.length && !cancelled; offset += 3) {
|
|
696
|
+
const batch = pending.slice(offset, offset + 3);
|
|
697
|
+
for (const stage of batch) boardInitialPageRef.current.add(stage);
|
|
698
|
+
await Promise.all(batch.map((stage) => loadMoreBoard(stage)));
|
|
696
699
|
}
|
|
697
700
|
};
|
|
698
701
|
// The quick projection is the complete first-fold contract. Defer the
|
|
@@ -700,8 +703,8 @@ export function App() {
|
|
|
700
703
|
// the useful overview when SQLite must materialise the board view.
|
|
701
704
|
const idle =
|
|
702
705
|
typeof window.requestIdleCallback === "function"
|
|
703
|
-
? { kind: "idle" as const, id: window.requestIdleCallback(hydrateBoard) }
|
|
704
|
-
: { kind: "timeout" as const, id: window.setTimeout(hydrateBoard, 0) };
|
|
706
|
+
? { kind: "idle" as const, id: window.requestIdleCallback(() => void hydrateBoard()) }
|
|
707
|
+
: { kind: "timeout" as const, id: window.setTimeout(() => void hydrateBoard(), 0) };
|
|
705
708
|
return () => {
|
|
706
709
|
cancelled = true;
|
|
707
710
|
if (idle.kind === "idle") window.cancelIdleCallback(idle.id);
|
|
@@ -710,9 +713,11 @@ export function App() {
|
|
|
710
713
|
}, [dashboardView, loadMoreBoard, operations]);
|
|
711
714
|
|
|
712
715
|
const refreshFromDialog = async (reconcileOpenWork: boolean) => {
|
|
713
|
-
if (reconcileOpenWork)
|
|
716
|
+
if (reconcileOpenWork) {
|
|
717
|
+
setReconciliationResult(null);
|
|
718
|
+
}
|
|
714
719
|
setRefreshDialog(reconcileOpenWork ? "reconciling" : "refreshing");
|
|
715
|
-
await refresh(false, reconcileOpenWork);
|
|
720
|
+
await refresh(false, reconcileOpenWork, !reconcileOpenWork);
|
|
716
721
|
setRefreshDialog(null);
|
|
717
722
|
};
|
|
718
723
|
useAppEffects({
|
|
@@ -776,6 +781,53 @@ export function App() {
|
|
|
776
781
|
void loadCostSummary();
|
|
777
782
|
}, [costs?.currency, currency, loadCostSummary]);
|
|
778
783
|
|
|
784
|
+
const loadMoreTraceTasks = useCallback(
|
|
785
|
+
async (loadAll = false, reset = false): Promise<OperationsProjection["tasks"]> => {
|
|
786
|
+
if (traceTasksLoadingRef.current) return traceTasksRef.current;
|
|
787
|
+
if (reset) {
|
|
788
|
+
traceTaskCursorRef.current = { offset: 0, stageIndex: 0 };
|
|
789
|
+
traceTasksRef.current = [];
|
|
790
|
+
setTraceTasks([]);
|
|
791
|
+
setTraceTasksHasMore(true);
|
|
792
|
+
}
|
|
793
|
+
if (traceTaskCursorRef.current.stageIndex >= traceTaskSearchStages.length)
|
|
794
|
+
return traceTasksRef.current;
|
|
795
|
+
|
|
796
|
+
traceTasksLoadingRef.current = true;
|
|
797
|
+
setTraceTasksLoading(true);
|
|
798
|
+
try {
|
|
799
|
+
do {
|
|
800
|
+
const cursor = traceTaskCursorRef.current;
|
|
801
|
+
const stage = traceTaskSearchStages[cursor.stageIndex];
|
|
802
|
+
if (stage === undefined) break;
|
|
803
|
+
const page = await api.operationsBoard(
|
|
804
|
+
{ from: null, to: null },
|
|
805
|
+
stage,
|
|
806
|
+
cursor.offset,
|
|
807
|
+
{ kind: "all-tasks" },
|
|
808
|
+
undefined,
|
|
809
|
+
traceabilityTaskPageSize,
|
|
810
|
+
);
|
|
811
|
+
const updated = appendTraceabilityTaskPage({
|
|
812
|
+
cursor,
|
|
813
|
+
page,
|
|
814
|
+
tasks: traceTasksRef.current,
|
|
815
|
+
});
|
|
816
|
+
traceTasksRef.current = updated.tasks;
|
|
817
|
+
setTraceTasks(traceTasksRef.current);
|
|
818
|
+
traceTaskCursorRef.current = updated.cursor;
|
|
819
|
+
if (page.tasks.length > 0 && !loadAll) break;
|
|
820
|
+
} while (traceTaskCursorRef.current.stageIndex < traceTaskSearchStages.length);
|
|
821
|
+
setTraceTasksHasMore(traceTaskCursorRef.current.stageIndex < traceTaskSearchStages.length);
|
|
822
|
+
return traceTasksRef.current;
|
|
823
|
+
} finally {
|
|
824
|
+
traceTasksLoadingRef.current = false;
|
|
825
|
+
setTraceTasksLoading(false);
|
|
826
|
+
}
|
|
827
|
+
},
|
|
828
|
+
[api, setTraceTasks],
|
|
829
|
+
);
|
|
830
|
+
|
|
779
831
|
const selectDashboardView = async (nextView: DashboardView) => {
|
|
780
832
|
setDashboardView(nextView);
|
|
781
833
|
window.scrollTo({ left: 0, top: 0 });
|
|
@@ -785,18 +837,13 @@ export function App() {
|
|
|
785
837
|
costSummaryAbortRef.current?.abort();
|
|
786
838
|
}
|
|
787
839
|
if (nextView === "traceability") {
|
|
788
|
-
let candidates = traceTasks
|
|
840
|
+
let candidates = traceTasks;
|
|
789
841
|
if (candidates.length === 0) {
|
|
790
842
|
const requestVersion = boardRequestVersionRef.current;
|
|
791
843
|
// Traceability is a global task selector, not a temporal work-board view.
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
if (page.tasks.length === 0) continue;
|
|
796
|
-
candidates = page.tasks;
|
|
797
|
-
setTraceTasks(page.tasks);
|
|
798
|
-
break;
|
|
799
|
-
}
|
|
844
|
+
candidates = await loadMoreTraceTasks(false, true);
|
|
845
|
+
if (requestVersion !== boardRequestVersionRef.current) return;
|
|
846
|
+
setTraceTasks(candidates);
|
|
800
847
|
}
|
|
801
848
|
const ordered = candidates.toSorted(
|
|
802
849
|
(a, b) =>
|
|
@@ -824,9 +871,9 @@ export function App() {
|
|
|
824
871
|
() =>
|
|
825
872
|
new Map(
|
|
826
873
|
(displayedCosts ?? costs)?.runs.map(
|
|
827
|
-
(run) =>
|
|
828
|
-
|
|
829
|
-
|
|
874
|
+
(run) =>
|
|
875
|
+
[run.run_id, currency === "USD" ? run.estimated_usd : run.estimated_brl] as const,
|
|
876
|
+
) ?? [],
|
|
830
877
|
),
|
|
831
878
|
[costs, currency, displayedCosts],
|
|
832
879
|
);
|
|
@@ -868,13 +915,7 @@ export function App() {
|
|
|
868
915
|
// prevents every tab from briefly presenting zero/empty placeholders while
|
|
869
916
|
// its coherent replacement snapshot or page is still in flight.
|
|
870
917
|
const globalLoadingPending =
|
|
871
|
-
periodTransitionPending ||
|
|
872
|
-
(currency === "USD" && costs?.currency !== currency) ||
|
|
873
|
-
(loadingArea !== null && loadingArea !== "costs") ||
|
|
874
|
-
costSurfaceLoading ||
|
|
875
|
-
operationsSurfaceLoading ||
|
|
876
|
-
entityPage.loading ||
|
|
877
|
-
Object.values(boardStates).some((state) => state.loading);
|
|
918
|
+
periodTransitionPending || (currency === "USD" && costs?.currency !== currency);
|
|
878
919
|
// The stale snapshot is useful only while the initial screen still waits
|
|
879
920
|
// for data. Once Operations has arrived, the normal dashboard is the
|
|
880
921
|
// clearest confirmation that it opened; do not leave a duplicate toast.
|
|
@@ -884,7 +925,10 @@ export function App() {
|
|
|
884
925
|
setSnapshotNoticeDelayElapsed(false);
|
|
885
926
|
return undefined;
|
|
886
927
|
}
|
|
887
|
-
const timeout = window.setTimeout(
|
|
928
|
+
const timeout = window.setTimeout(
|
|
929
|
+
() => setSnapshotNoticeDelayElapsed(true),
|
|
930
|
+
snapshotNoticeDelayMs,
|
|
931
|
+
);
|
|
888
932
|
return () => window.clearTimeout(timeout);
|
|
889
933
|
}, [initialDataPending, snapshotNoticeDismissed, snapshotUpdating]);
|
|
890
934
|
const snapshotNoticeVisible = shouldShowSnapshotNotice({
|
|
@@ -895,9 +939,16 @@ export function App() {
|
|
|
895
939
|
});
|
|
896
940
|
const snapshotNotice = snapshotNoticeVisible ? (
|
|
897
941
|
<div aria-live="polite" className="app-notice app-snapshot-status" role="status">
|
|
898
|
-
<span>
|
|
942
|
+
<span>
|
|
943
|
+
Exibindo o último snapshot local validado. Os dados canônicos estão sendo atualizados em
|
|
944
|
+
segundo plano e estarão atuais na próxima abertura.
|
|
945
|
+
</span>
|
|
899
946
|
<button
|
|
900
|
-
aria-label={
|
|
947
|
+
aria-label={
|
|
948
|
+
costLocale === "pt-BR"
|
|
949
|
+
? "Fechar aviso de atualização do snapshot"
|
|
950
|
+
: "Dismiss snapshot update notice"
|
|
951
|
+
}
|
|
901
952
|
onClick={() => setSnapshotNoticeDismissed(true)}
|
|
902
953
|
type="button"
|
|
903
954
|
>
|
|
@@ -952,6 +1003,7 @@ export function App() {
|
|
|
952
1003
|
onCurrencyChange: setCurrency,
|
|
953
1004
|
onLoadingChange: setCostSurfaceLoading,
|
|
954
1005
|
onLocaleChange: changeDashboardLocale,
|
|
1006
|
+
onLoadMoreTraceTasks: loadMoreTraceTasks,
|
|
955
1007
|
onOpenTrace: (taskId) => void openTrace(taskId),
|
|
956
1008
|
onRefresh: () => setRefreshDialog("choose"),
|
|
957
1009
|
onRetry: retryLastLoad,
|
|
@@ -965,12 +1017,15 @@ export function App() {
|
|
|
965
1017
|
selectedTraceTaskId,
|
|
966
1018
|
trace,
|
|
967
1019
|
traceLoadingTaskId,
|
|
1020
|
+
traceTasksHasMore,
|
|
1021
|
+
traceTasksLoading,
|
|
968
1022
|
traceTasks,
|
|
969
1023
|
})}
|
|
970
1024
|
capabilityNavigation={capabilityNavigation}
|
|
971
1025
|
boardTotals={boardTotals}
|
|
972
1026
|
boardKindTotals={boardKindTotals}
|
|
973
1027
|
boardExportSource={boardExportSource}
|
|
1028
|
+
detailExportSource={detailExportSource}
|
|
974
1029
|
boardStates={boardStates}
|
|
975
1030
|
data={renderedOperations}
|
|
976
1031
|
datePreset={operationsPeriod.preset}
|
|
@@ -995,13 +1050,14 @@ export function App() {
|
|
|
995
1050
|
: view === "executions"
|
|
996
1051
|
? "executions"
|
|
997
1052
|
: view === "runs"
|
|
998
|
-
|
|
999
|
-
|
|
1053
|
+
? "runs"
|
|
1054
|
+
: null;
|
|
1000
1055
|
if (kind !== null) void loadOperationsEntityPage(kind);
|
|
1001
1056
|
else if (view === "changes" || view === "decisions")
|
|
1002
1057
|
void loadOperationsLifecyclePage(view);
|
|
1003
1058
|
else void loadOperationsDetails();
|
|
1004
1059
|
}}
|
|
1060
|
+
onLoadMacroMetrics={() => void loadOperationsDetails()}
|
|
1005
1061
|
onEntityPageChange={(offset) => {
|
|
1006
1062
|
if (entityPageKind === "changes" || entityPageKind === "decisions")
|
|
1007
1063
|
void loadOperationsLifecyclePage(entityPageKind, offset);
|
|
@@ -1009,7 +1065,10 @@ export function App() {
|
|
|
1009
1065
|
}}
|
|
1010
1066
|
onEntityFiltersChange={loadFilteredOperationsPage}
|
|
1011
1067
|
onBoardFiltersChange={loadFilteredBoard}
|
|
1012
|
-
onWorkListFiltersChange={
|
|
1068
|
+
onWorkListFiltersChange={loadWorkListFilters}
|
|
1069
|
+
onWorkListPageChange={(offset) =>
|
|
1070
|
+
void loadWorkListPage(workListFiltersRef.current, offset)
|
|
1071
|
+
}
|
|
1013
1072
|
onBoardTypeChange={(kind) =>
|
|
1014
1073
|
loadFilteredBoard({
|
|
1015
1074
|
...boardFiltersRef.current,
|
|
@@ -1017,12 +1076,13 @@ export function App() {
|
|
|
1017
1076
|
})
|
|
1018
1077
|
}
|
|
1019
1078
|
onWorkListTypeChange={(kind) =>
|
|
1020
|
-
void
|
|
1079
|
+
void loadWorkListPage({
|
|
1021
1080
|
...workListFiltersRef.current,
|
|
1022
1081
|
kind: kind === "all" ? "" : kind,
|
|
1023
1082
|
})
|
|
1024
1083
|
}
|
|
1025
1084
|
onLoadMoreBoard={(stage) => void loadMoreBoard(stage)}
|
|
1085
|
+
workListPage={workListPage}
|
|
1026
1086
|
statusPage={(stage, kind) => overviewStatusPages[overviewStatusPageKey(stage, kind)]}
|
|
1027
1087
|
onLoadStatusPage={(stage, kind, offset) =>
|
|
1028
1088
|
void loadOverviewStatusPage(stage, kind, offset)
|
|
@@ -1051,8 +1111,11 @@ export function App() {
|
|
|
1051
1111
|
operationsDetailAbortRef.current = null;
|
|
1052
1112
|
operationsPageAbortRef.current?.abort();
|
|
1053
1113
|
operationsPageAbortRef.current = null;
|
|
1114
|
+
resetWorkListPage();
|
|
1054
1115
|
++operationsPageRequestVersionRef.current;
|
|
1055
1116
|
boardRequestVersionRef.current += 1;
|
|
1117
|
+
for (const controller of boardAbortControllersRef.current.values()) controller.abort();
|
|
1118
|
+
boardAbortControllersRef.current.clear();
|
|
1056
1119
|
boardInFlightRef.current.clear();
|
|
1057
1120
|
boardInitialPageRef.current.clear();
|
|
1058
1121
|
boardLoadedRef.current = {};
|
|
@@ -1092,8 +1155,6 @@ export function App() {
|
|
|
1092
1155
|
closeDocument={closeDocument}
|
|
1093
1156
|
costLocale={costLocale}
|
|
1094
1157
|
documentDetail={documentDetail}
|
|
1095
|
-
error={error}
|
|
1096
|
-
failedArea={failedArea}
|
|
1097
1158
|
helpOpen={helpOpen}
|
|
1098
1159
|
loadingArea={dashboardView === "cost-monitor" && costs === null ? null : loadingArea}
|
|
1099
1160
|
operations={renderedOperations}
|
|
@@ -1105,7 +1166,6 @@ export function App() {
|
|
|
1105
1166
|
traceLoadingTaskId={traceLoadingTaskId}
|
|
1106
1167
|
onCloseHelp={() => setHelpOpen(false)}
|
|
1107
1168
|
onCloseTrace={() => setTrace(null)}
|
|
1108
|
-
onDismissError={() => setError(null)}
|
|
1109
1169
|
onDismissReconciliation={() => setReconciliationResult(null)}
|
|
1110
1170
|
onOpenDocument={(kind, id) => void openDocument(kind, id)}
|
|
1111
1171
|
onOpenTrace={(taskId) => void openTrace(taskId)}
|
|
@@ -1113,7 +1173,6 @@ export function App() {
|
|
|
1113
1173
|
onOpenTraceMacro={openTraceMacro}
|
|
1114
1174
|
onRefreshCancel={() => setRefreshDialog(null)}
|
|
1115
1175
|
onRefreshFromDialog={(reconcileOpenWork) => void refreshFromDialog(reconcileOpenWork)}
|
|
1116
|
-
onRetry={retryLastLoad}
|
|
1117
1176
|
setTraceLink={(value) => setTraceLink(value)}
|
|
1118
1177
|
/>
|
|
1119
1178
|
</PeriodTransitionShell>
|