feat: improve Dashboard workflows and project activation - #271
Conversation
# Conflicts: # CHANGELOG.md
There was a problem hiding this comment.
Sorry @benym, your pull request is larger than the review limit of 150000 diff characters
|
👋 Thanks for opening your first PR to Comet, @benym. Before review, please make sure the PR title follows Conventional Commits, for example 🧪 The most useful local checks are: pnpm build
pnpm lint
pnpm format:check
pnpm test🧰 If your change touches ✨ We appreciate the contribution and will take a look as soon as we can. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis release adds dashboard pagination and detail loading, global workflow configuration with project activation, project-scoped Hook reconciliation, Classic plan-readiness recovery, Native receipt-scope recovery, neutral external-target handling, regenerated runtime assets, and version ChangesDashboard exploration
Global activation and configuration
Hook lifecycle and recovery
Bundled assets and release metadata
Estimated code review effort: 5 (Critical) | ~120 minutes Sequence Diagram(s)sequenceDiagram
participant Dashboard as Dashboard UI
participant Server as Dashboard server
participant Collector as Dashboard collectors
participant Storage as Project change storage
Dashboard->>Server: Request overview
Server->>Collector: Collect overview
Collector->>Storage: Read summary and change metadata
Storage-->>Collector: Counts and lightweight entries
Collector-->>Server: Overview with initial page
Server-->>Dashboard: Overview response
Dashboard->>Server: Request next change page
Server->>Collector: Collect page with cursor
Collector->>Storage: Read bounded change entries
Storage-->>Collector: Page and continuation cursor
Collector-->>Server: Paginated change response
Server-->>Dashboard: Append page
Dashboard->>Server: Request selected change detail
Server->>Collector: Collect change detail
Collector->>Storage: Read artifacts and previews
Storage-->>Collector: Full change detail
Collector-->>Server: Change detail
Server-->>Dashboard: Render detail
Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (3 warnings)
✅ Passed checks (2 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThe PR expands Dashboard pagination and detail loading, adds activation from global workflow defaults, isolates project Hooks, and strengthens Classic recovery behavior.
Confidence Score: 4/5The PR does not yet appear safe to merge because targetless writes can still bypass workflow guards and stale Native detail remains visible during cursor recovery. Recognized write requests without an extractable target still return an allowed decision before Native or Classic guard evaluation, and Native stale-cursor recovery clears the page without invalidating the previously selected detail. Files Needing Attention: domains/comet-entry/hook-router.ts, domains/comet-entry/hook-adapter.ts, domains/dashboard/web/src/main.jsx, domains/dashboard/web/src/native-workflow-panel.jsx
|
| Filename | Overview |
|---|---|
| domains/comet-entry/hook-router.ts | Adds project-scoped Hook routing behavior, but the previously reported targetless-write guard bypass remains. |
| domains/comet-entry/hook-adapter.ts | Normalizes Hook payloads and target attribution; unsupported or absent target fields still produce unknown write intent. |
| domains/dashboard/web/src/main.jsx | Adds paginated Dashboard loading and reachable stale-cursor recovery, while the previously reported stale Native detail remains visible during recovery. |
| domains/dashboard/web/src/dashboard-web-state.js | Correctly preserves structured server error messages so Native stale-cursor recovery can recognize HTTP 400 responses. |
| domains/dashboard/web/src/native-workflow-panel.jsx | Implements Native list pagination and selection effects; retained detail can render while recovery temporarily clears the available selection. |
| domains/comet-entry/project-activation.ts | Implements explicit activation of unconfigured projects from global workflow defaults. |
| domains/skill/hook-lifecycle.ts | Reconciles project-scoped Hook installations while removing legacy managed handlers and preserving user configuration. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Global workflow defaults] --> B[Explicit project activation]
B --> C[Project configuration]
C --> D[Project-scoped Hook router]
D --> E{Attributed write target?}
E -->|Native| F[Native guard]
E -->|Classic| G[Classic guard]
E -->|Unknown or absent| H[Neutral allow]
C --> I[Dashboard collectors]
I --> J[Paginated overview]
J --> K[On-demand detail]
Reviews (16): Last reviewed commit: "docs: publish beta15 website link" | Re-trigger Greptile
Reviewer's GuideThis PR introduces paginated, layout-aware Dashboard change explorers for both Classic and Native workflows, implements safe project activation from global defaults for the /comet entry, tightens and self-heals Classic build recovery and hook guards, and refines platform hook integration to keep user hooks and external write targets neutral while updating global/native workflow configuration and documentation. Sequence diagram for paginated Dashboard change loadingsequenceDiagram
actor User
participant DashboardApp
participant DashboardServer
participant Collector as ClassicCollector
User->>DashboardApp: Open Dashboard (project selected)
DashboardApp->>DashboardServer: GET /api/dashboard/projects/{id}/overview?q=
DashboardServer->>Collector: collectDashboardOverview(projectPath,{query})
Collector-->>DashboardServer: DashboardOverview (summary + initialChanges page)
DashboardServer-->>DashboardApp: overview JSON
DashboardApp->>DashboardServer: GET /api/dashboard/projects/{id}/changes?status=active&limit=5
DashboardServer->>Collector: collectDashboardChangePage(projectPath,{status,limit,cursor,query})
Collector-->>DashboardServer: DashboardChangePage (items,total,nextCursor)
DashboardServer-->>DashboardApp: change page JSON
User->>DashboardApp: Select change row
DashboardApp->>DashboardServer: GET /api/dashboard/projects/{id}/change?changeId={id}
DashboardServer->>Collector: collectDashboardChangeDetail(projectPath,changeId)
Collector-->>DashboardServer: ChangeDashboardItem
DashboardServer-->>DashboardApp: change detail JSON
DashboardApp-->>User: Render list + detail + side panel
Sequence diagram for Comet workflow resolution and project activationsequenceDiagram
actor Developer
participant CometCLI
participant WorkflowCommand as workflowResolveCommand
participant Activation as resolveOrActivateCometEntry
participant GlobalConfig as readWorkflowGlobalConfig
participant ProjectConfig as readWorkflowProjectConfigSnapshot
Developer->>CometCLI: comet workflow resolve . --activate --json
CometCLI->>WorkflowCommand: workflowResolveCommand(targetPath,{activate:true})
WorkflowCommand->>Activation: resolveOrActivateCometEntry(projectRoot)
Activation->>GlobalConfig: readWorkflowGlobalConfig(homeDir)
GlobalConfig-->>Activation: WorkflowGlobalConfig (default_workflow,workflows,...)
Activation->>ProjectConfig: readWorkflowProjectConfigSnapshot(projectRoot)
ProjectConfig-->>Activation: existing WorkflowProjectConfig or null
Activation-->>WorkflowCommand: CometEntryResolution (source: global-config|project-config|legacy-project)
WorkflowCommand-->>CometCLI: JSON resolution (schema: comet.workflow-resolution.v1)
CometCLI-->>Developer: Selected entry skill (/comet-native or /comet-classic)
Sequence diagram for scoped hook routing and guarded write decisionssequenceDiagram
actor IDEHook as IDE Hook
participant HookRouter as inspectCometHook
participant Scope as scopeCometHookTargets
participant ClassicGuard as inspectClassicHookGuard
participant NativeGuard as inspectNativeHookGuard
IDEHook->>HookRouter: CometHookRequest (intent: write, targets[])
HookRouter->>Scope: scopeCometHookTargets(projectRoot,targets)
Scope-->>HookRouter: {projectTargets,externalTargets}
alt projectTargets is empty
HookRouter-->>IDEHook: allowed (reason: outside guarded project)
else projectTargets present
HookRouter->>ClassicGuard: inspectClassicHookGuard(projectRoot,changeName,{...projectTargets})
ClassicGuard-->>HookRouter: CometHookDecision (allowed/blocked)
HookRouter-->>IDEHook: final decision for Classic
end
IDEHook->>NativeGuard: (separate Native inspection when owner.workflow === 'native')
NativeGuard-->>IDEHook: CometHookDecision for Native
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Summary
Validation
pnpm format:checkpnpm lintpnpm buildpnpm check:generatedFixes #254
Summary by Sourcery
Paginate Dashboard change explorers and Native projections, improve Comet project activation and hook isolation, and harden Classic build recovery and workflow configuration while updating skills, CLI commands, and global workflow config for beta.15.
New Features:
Bug Fixes:
Enhancements:
Documentation:
Tests:
Summary by CodeRabbit
New Features
workflow resolve --activate.Bug Fixes
Documentation