refactor: extract restate services into crates with type-safe pipeline status#3919
refactor: extract restate services into crates with type-safe pipeline status#3919
Conversation
- Remove separate onboarding route, integrate into main layout - Add onboarding body component for in-app onboarding flow - Add calendar and folder-location onboarding steps - Consolidate onboarding config, login, permissions components - Remove useOnboardingState hook, welcome.tsx - Update routes and store initialization Co-authored-by: Cursor <cursoragent@cursor.com>
…e status
- Extract rate limiter from apps/restate into crates/restate-rate-limit
- Extract STT workflow from apps/restate into crates/restate-stt
- Create crates/restate-stt-types with PipelineStatus enum and SttStatusResponse,
replacing hardcoded status strings with a shared enum
- Add basic /stt/status/{pipeline_id} route in transcribe-proxy for polling
Restate workflow status
- Wire PipelineStatus through OpenAPI -> api-client type generation pipeline
so apps/web and apps/desktop get typed PipelineStatus and SttStatusResponse
Co-authored-by: Cursor <cursoragent@cursor.com>
✅ Deploy Preview for hyprnote-storybook canceled.
|
✅ Deploy Preview for hyprnote ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| const STEPS_MACOS: OnboardingStep[] = [ | ||
| "permissions", | ||
| "login", | ||
| "calendar", | ||
| "final", | ||
| ]; |
There was a problem hiding this comment.
🔴 "folder-location" onboarding step rendered but never reachable because it's missing from all platform step arrays
The TabContentOnboarding component renders a "Storage" OnboardingSection for the "folder-location" step with getStepStatus("folder-location", currentStep), but "folder-location" is absent from both STEPS_MACOS and STEPS_OTHER in the config.
Root Cause
In apps/desktop/src/components/onboarding/config.tsx:12-18, the step arrays are:
STEPS_MACOS = ["permissions", "login", "calendar", "final"]
STEPS_OTHER = ["login", "final"]
Neither includes "folder-location", even though it's defined in the OnboardingStep type union at line 9.
When getStepStatus("folder-location", currentStep) is called (apps/desktop/src/components/main/body/onboarding/index.tsx:171), steps.indexOf("folder-location") returns -1, so the function returns null. The OnboardingSection component (apps/desktop/src/components/onboarding/shared.tsx:24) returns null when status is null.
Impact: The entire Storage/folder-location section — including FolderLocationSection with its folder picker UI — is completely invisible on every platform. The step was clearly intended to be part of the onboarding flow (it has onContinue={goNext} wired up), but users will never see it.
| const STEPS_MACOS: OnboardingStep[] = [ | |
| "permissions", | |
| "login", | |
| "calendar", | |
| "final", | |
| ]; | |
| const STEPS_MACOS: OnboardingStep[] = [ | |
| "permissions", | |
| "login", | |
| "calendar", | |
| "folder-location", | |
| "final", | |
| ]; |
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
apps/restateinto standalone crates (crates/restate-rate-limit,crates/restate-stt)crates/restate-stt-typeswith a sharedPipelineStatusenum andSttStatusResponsestruct, replacing all hardcoded status strings with type-safe variantsGET /stt/status/{pipeline_id}route intranscribe-proxythat proxies to the Restate workflow'sgetStatushandler@hypr/api-clientgeneration pipeline soapps/webandapps/desktopcan importPipelineStatusandSttStatusResponseinstead of hardcoding string unionsTest plan
cargo check -p restate-stt-types -p restate-stt -p transcribe-proxy -p apipassesdprint fmtcleanapps/api/openapi.gen.json) includesPipelineStatusenum andSttStatusResponseschemapackages/api-client/src/generated/types.gen.ts) containPipelineStatusandSttStatusResponseMade with Cursor