Repository navigation
Conversation
- Share notification classification across WorkerWake and renderer paths. - Prefer known structured notification types and fall back to HITL-first message heuristics. - Pass notification types into WorkerWake and guard malformed runtime field values.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
WorkerWake and the renderer currently classify Notification hooks independently, which allows mixed HITL and idle wording to fall through as idle when no authoritative notification type is available.
This change moves notification classification into a shared helper, treats known structured notification types as authoritative, and uses HITL first message heuristics only when the type is missing or unknown. It also passes
notification_typethrough to WorkerWake and safely handles non string runtime values without changing the existing NDJSON framing or provider behavior.Closes #676
Type of change
Evidence
Before
The same mixed Notification is classified as
idleonmain:After
The same Notification is classified as
needsHumanafter the fix:The focused WorkerWake regression suite also passes with all 22 tests:
How I tested it
mainbehavior with the mixed Notification and confirmed it returnsidle.needsHuman.git diff --checkNo Electron launch was required for the reproduction or focused verification.
Checklist
npm run typecheckpasses.npm run test:focusedpasses.npm run buildsucceeds.commented-out code, or unrelated formatting churn in it.
DESIGN.md/tokens.ts— no ad-hoc colors,spacing, or fonts.
ATTRIBUTION.md.