Skip to content

[comp] Production Deploy#2582

Merged
tofikwest merged 13 commits intoreleasefrom
main
Apr 16, 2026
Merged

[comp] Production Deploy#2582
tofikwest merged 13 commits intoreleasefrom
main

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot commented Apr 16, 2026

This is an automated pull request to release the candidate branch into production, which will trigger a deployment.
It was created by the [Production PR] action.


Summary by cubic

Separates admin/internal/auth routes from the public API docs and adds clear operation summaries. Fixes Automations timezone labels, restores the Policies AI‑tailoring UI, and renders task descriptions as markdown. Satisfies ENG-202.

  • New Features

    • Public docs only: hide /v1/admin, /v1/auth, and /v1/internal; add @ApiOperation summaries across public controllers; Swagger server derives from BASE_URL with an env-aware label.
    • Tooling/tests: src/openapi-docs.spec.ts asserts hidden paths and non-empty summaries; src/gen-openapi.spec.ts regenerates packages/docs/openapi.json (GEN_OPENAPI=1); scripts/audit-openapi-summaries.ts flags missing/auto-generated summaries.
  • Bug Fixes

    • Automations overview (CS-97): show “Every day at 9:00 AM UTC”; compute the next 09:00 UTC run as a real Date, render in the user’s locale with timezone; defer formatting to post-mount to avoid hydration mismatch; added targeted tests.
    • Policies page (ENG-108): restore AI-tailoring statuses and progress banner by wiring /v1/organization/onboarding into PolicyFilters and subscribing via usePolicyOnboardingStatus.
    • Tasks (CS-98): render task descriptions as markdown using MarkdownRenderer; keeps click-to-edit behavior.

Written for commit 75c5fb8. Summary will update on new commits.

github-actions bot and others added 3 commits April 16, 2026 21:21
The Schedule and Next Run fields on the automation overview page were
hardcoded to "Every Day 9:00 AM" and "Tomorrow 9:00 AM" with no timezone
label. The backend cron actually runs at 09:00 UTC (see
comp-private/apps/enterprise-api/src/trigger/automation/run-automations-schedule.ts),
so a customer in UTC+3 would see the automation fire at noon local even
though the UI said 9:00 AM. The "Tomorrow" literal was also wrong
whenever today's 09:00 UTC hadn't passed yet.

Label the schedule as "Every day at 9:00 AM UTC" and compute the next
09:00 UTC occurrence as a real Date, then render it in the user's
locale/timezone — matching the existing pattern in BrowserAutomationsList
and ScheduledScanPopover.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
[dev] [Marfuen] mariano/eng-202-create-separate-docs-or-api-for-admin-routes
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 16, 2026

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

Project Deployment Actions Updated (UTC)
app (staging) Ready Ready Preview, Comment Apr 16, 2026 10:28pm
comp-framework-editor Ready Ready Preview, Comment Apr 16, 2026 10:28pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
portal (staging) Skipped Skipped Apr 16, 2026 10:28pm

Request Review

Descriptions authored in the Framework Editor are markdown — bullets,
bold, headings, blockquotes — and the editor preview renders them via
ReactMarkdown. But the main app rendered the same string as plain text
with whiteSpace: 'pre-line', so users saw literal "**" and "- "
characters instead of formatted content.

PR #2327 previously added whiteSpace: 'pre-line' which fixed bare
newlines, but left markdown syntax raw. Swap the plain <Text> for the
existing MarkdownRenderer (already used in the task automation chat).
Click-to-edit behavior preserved by wrapping in a clickable div.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
cubic-dev-ai[bot]
cubic-dev-ai bot previously approved these changes Apr 16, 2026
Copy link
Copy Markdown

@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 36 files

Auto-approved: Documentation and OpenAPI spec improvements: adds operation summaries and hides internal/admin routes from public docs. Includes test-only and config-only changes.

tofikwest and others added 5 commits April 16, 2026 17:59
…108)

The legacy PoliciesTable + PolicyFilters wiring was removed when we
migrated to PoliciesTableDS in Jan 2026 (commit 8974418). Since then
the page wrapped <PolicyFilters> in PolicyTailoringProvider with an
empty statuses map, so the per-row "Tailoring/Queued/Preparing" UI that
PoliciesTableDS already renders had no data to show. Vendors and Risks
were restored at the time; Policies was left missing.

Wires it back up without touching the trigger.dev pipeline (which still
emits policiesTotal/policiesCompleted/policy_<id>_status as before):

1. policies/(overview)/hooks/use-policy-onboarding-status.ts — new hook
   mirroring the risks/vendors ones, using useRealtimeRun. Handles the
   policies/policy singular/plural conversion correctly (the shared
   hook's `itemType.slice(0,-1)` would have produced "policie_").

2. policies/(overview)/page.tsx — fetch /v1/organization/onboarding
   alongside /v1/policies (same pattern as risks/vendors) and pass the
   trigger run id into PolicyFilters. Move PolicyTailoringProvider into
   PolicyFilters since that's where the realtime data lives.

3. PolicyFilters.tsx — accept onboardingRunId, subscribe via the hook,
   wrap children in PolicyTailoringProvider with live statuses, render
   the "Tailoring your policies – Personalized N/M" banner while the
   run is active.

Orphaned apps/app/.../policies/all/components/policies-table.tsx (the
pre-migration table, now dead code) is left in place for a follow-up
cleanup PR so this diff stays scoped.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…on mismatch (CS-97 review)

cubic flagged a real hydration risk on PR #2579: the Next Run label was
computed synchronously during render with `new Date()` +
`toLocaleString(undefined, …)`. Node.js renders in the server's timezone
and locale (typically UTC) while the browser renders in the user's, so
the HTML from SSR could differ from the first client render —
especially around 09:00 UTC where `new Date()` between the two renders
could flip the computed day.

Switch from useMemo to useState + useEffect so the label is only
computed on the client, after mount. Render an em-dash placeholder
during SSR; it's replaced with the real weekday/time on mount. The
initial client HTML now matches the server HTML exactly.

Adds an SSR-safe-placeholder test using renderToString to lock in the
property that the initial render contains no formatted weekday or time.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…r test (CS-97 review)

Two follow-ups from cubic on PR #2579:

1. P2: The next-run label rendered "Fri 12:00 PM" with no timezone
   indicator, which is ambiguous right next to the "9:00 AM UTC"
   Schedule card — users can't tell if it's local or UTC, the exact
   confusion this PR was supposed to fix. Add `timeZoneName: 'short'`
   so the output reads e.g. "Thu, 5:00 AM EDT" (local) or "Thu 9:00
   AM UTC" (for a UTC viewer).

2. P3: The SSR-placeholder test asserted `expect(html).toContain('—')`
   which also matches the Success Rate card's `—` when there are no
   runs, so it would pass even if the Next Run placeholder were gone.
   Scope the assertion to the Next Run cell via a regex that matches
   the "Next Run" label's adjacent `<p>` value.

Test regex also updated to tolerate a comma after the weekday — Node
and some browser locales emit "Thu, 5:00 AM EDT" rather than a bare
"Thu 5:00 AM EDT".

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
fix(automations): show schedule in UTC and next run in user tz (CS-97)
…ing-ui

fix(policies): restore AI-tailoring UI on the Policies page (ENG-108)
@vercel vercel bot temporarily deployed to staging – portal April 16, 2026 22:20 Inactive
…cription

fix(tasks): render task description markdown in the main app (CS-98)
@tofikwest tofikwest merged commit 35c2165 into release Apr 16, 2026
14 checks passed
@claudfuen
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.23.3 🎉

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants