Repository navigation
fix: upload event plans in headless runs - #891
Conversation
🧙 Wizard CIRun the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands: Test all apps:
Test all apps in a directory:
Test an individual app:
Show more apps
Results will be posted here when complete. |
|
@fercgomes Before I review, I think you should stream the [STATUS] updates we parse instead and display at the bottom of the wizard screen. That's what the wizard is actively working on. You don't need to stream the even plan at all, it is set once and not changed as of right now. If we make it such that it changes (not at all planned), we can add this in later. For now you can upload once when it's loaded. |
|
Addressed the event-plan part of this feedback: the wizard now captures the first non-empty valid plan, stores it, and stops watching, so later file writes are not streamed. I did not add |
|
Great, I'll review the relevant parts in this PR, thanks! |
gewenyu99
left a comment
There was a problem hiding this comment.
Noice. Some comments for you to consider but non blocking (other than QA report lol
|
|
||
| try { | ||
| attachWatch(); | ||
| read(true); |
There was a problem hiding this comment.
this read(true) calls onUpdate synchronously before we return the handle. so if a caller stop()s from inside onUpdate (EventPlanWatcher does) it just no-ops + leaks the watcher. only safe today bc ignoreInitialFile: true. can we guard the callback or at least leave a comment so future me doesn't step on it? 🙏
| } | ||
| if ( | ||
| options.maxFileSizeBytes !== undefined && | ||
| stat.size > options.maxFileSizeBytes |
There was a problem hiding this comment.
we silently eat oversized files here (+ bad json in the catch below) → empty event plan tab, zero explanation why. can we logToFile both branches so it's actually debuggable?
Generated-By: PostHog Code Task-Id: 479c28e8-6980-43b3-88a1-71cfdc39fbce
Generated-By: PostHog Code Task-Id: 479c28e8-6980-43b3-88a1-71cfdc39fbce
Generated-By: PostHog Code Task-Id: 479c28e8-6980-43b3-88a1-71cfdc39fbce
Generated-By: PostHog Code Task-Id: 479c28e8-6980-43b3-88a1-71cfdc39fbce
Generated-By: PostHog Code Task-Id: 479c28e8-6980-43b3-88a1-71cfdc39fbce
Generated-By: PostHog Code Task-Id: 479c28e8-6980-43b3-88a1-71cfdc39fbce
Generated-By: PostHog Code Task-Id: 479c28e8-6980-43b3-88a1-71cfdc39fbce
4a5f328 to
cc23e5b
Compare
Merge activity
|
Problem
Wizard-created custom events are not visible to cloud runs until real traffic arrives because the event plan was only mirrored by the rendered TUI.
Why: Headless runs need to stream the same planned event metadata as interactive runs so downstream setup can surface event definitions immediately.
Changes
QAREPORT.md.Test plan
pnpm buildpnpm test— 98 files, 1,328 tests passedpnpm fixCreated with PostHog Code