Skip to content

fix(onboarding): handle zero-item steps in tracker#2785

Merged
Marfuen merged 5 commits intomainfrom
mariano/cubic-fixes
May 7, 2026
Merged

fix(onboarding): handle zero-item steps in tracker#2785
Marfuen merged 5 commits intomainfrom
mariano/cubic-fixes

Conversation

@Marfuen
Copy link
Copy Markdown
Contributor

@Marfuen Marfuen commented May 7, 2026

Summary

  • Fix tracker marking steps as incomplete when there are zero items (e.g., no vendors or risks). total > 0 && completed >= totaltotal === 0 || completed >= total

The other two Cubic findings on PR #2778 are false positives:

  • !!onboardingTriggerJobId: Already fixed at the API level — frameworks-scores.helper.ts returns null when triggerJobCompleted is true
  • await updateOrganizationPolicies: Intentional — policies are now 2-3s (programmatic template processing), serializing is negligible

Test plan

  • Onboard an org with no vendors/risks and verify tracker doesn't get stuck

🤖 Generated with Claude Code


Summary by cubic

Fix onboarding tracker to treat zero-item steps as complete, preventing stuck states for orgs without vendors, risks, or policies.

  • Bug Fixes
    • Updated completion checks to "total === 0 || completed >= total" for policies, vendor mitigations, and risk mitigations.

Written for commit c7173e7. Summary will update on new commits.

Marfuen and others added 5 commits May 7, 2026 14:03
P1: Add metadata.set('policies', true) after policy fan-out so the
    tracker boolean flag is set.
P1: Log batchTriggerAndWait failures in vendor/risk mitigation fan-outs
    instead of silently ignoring them.
P2: Strip {{#if}}/{{/if}} markers from mixed-content nodes so template
    syntax doesn't leak into rendered policies.
P2: Fix stale onboardingTriggerJobId locking publish button in
    ToDoOverview.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The global regex flag in stripMarkerText would remove ALL matching
{{#if}}/{{/if}} markers in a subtree, corrupting boundaries of nested
conditional blocks. Removed the g flag so only the first occurrence
(the one that triggered the match) is stripped.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Covers placeholder replacement, inline/multi-node/nested conditionals,
mixed content nodes, edge cases, buildVariables, buildFlags, processTemplate.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When an org has no vendors or risks, `total > 0 && completed >= total`
evaluates to false, causing those steps to appear stuck forever.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment May 7, 2026 1:26pm
comp-framework-editor Ready Ready Preview, Comment May 7, 2026 1:26pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
portal Skipped Skipped May 7, 2026 1:26pm

Request Review

@vercel vercel Bot temporarily deployed to Preview – portal May 7, 2026 13:21 Inactive
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

@Marfuen Marfuen merged commit a196339 into main May 7, 2026
8 of 10 checks passed
@Marfuen Marfuen deleted the mariano/cubic-fixes branch May 7, 2026 13:22
claudfuen pushed a commit that referenced this pull request May 7, 2026
# [3.45.0](v3.44.2...v3.45.0) (2026-05-07)

### Bug Fixes

* address cubic review findings on onboarding PR ([#2783](#2783)) ([bd43e8a](bd43e8a))
* **onboarding:** handle zero-item steps in tracker ([#2785](#2785)) ([a196339](a196339))
* revert page-level hooks to useRealtimeRun to fix missing auth context ([#2780](#2780)) ([5a406f9](5a406f9))

### Features

* **frameworks:** remove is-framework-versioning-enabled feature flag ([#2781](#2781)) ([016f379](016f379))

### Performance Improvements

* **build:** skip TS in next build, reduce sentry upload, add CI typecheck ([#2782](#2782)) ([26e1667](26e1667))
* **onboarding:** optimize onboarding pipeline from ~5min to ~2min ([b14db0b](b14db0b))
@claudfuen
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.45.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants