Bugfix 142/toast notifications go away #146
No reviewers
Labels
No labels
bug
ci
documentation
duplicate
enhancement
feature
good first issue
help wanted
invalid
performance
priority
P0
priority
P1
priority
P2
question
refactor
size
L
size
M
size
S
size
XL
size
XS
tests
trivial
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
noe.trevino/paso!146
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "bugfix-142/toast-notifications-go-away"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Checklist
CONTRIBUTING.mdgo test ./... -race) locallygofmt -w .andgolangci-lint run ./...respectivelyREADME.mdif applicableSummary
The
tea.Cmdreturned byremoveCurrentProject()is silently dropped here.When the last project is deleted,
removeCurrentProject()callscreateDefaultProject(), which callsm.addNotification(...)and returns itstea.Cmdfor auto-dismiss. That cmd propagates back throughremoveCurrentProject()— but is discarded at this call site.The result: the "Created default project" notification will appear but will never auto-dismiss, which is exactly the bug this PR is supposed to fix.
This deprecated wrapper explicitly discards the
tea.CmdfrominitEstimateInput. If any caller still usesinitEstimateInputForFormandinitEstimateInputreturns an error (e.g., "No task selected"), the notification's auto-dismiss command is dropped — the notification won't go away.If this function is still called anywhere (I see it's marked deprecated but not removed), it reintroduces the bug this PR fixes. Either remove the function, or propagate the cmd:
If callers have already been migrated, remove this wrapper entirely rather than leaving a broken stub.
Review Summary
Two concrete bugs and one missing-test concern:
Bug 1 —
confirmDeleteProjectdrops the auto-dismiss cmd fromremoveCurrentProject(see inline comment onupdate_confirmations.go:233).When the last project is deleted,
removeCurrentProject()→createDefaultProject()creates a "Created default project" notification and returns itstea.Cmdfor auto-dismissal. That cmd is dropped at the call site, so the notification will stay on screen indefinitely — the same failure mode this PR is intended to fix.Bug 2 —
initEstimateInputForFormexplicitly discards the auto-dismiss cmd (see inline comment onmodel.go:1206).The deprecated wrapper silences the return with
_, _. Any caller still using this function will lose the auto-dismiss command on error notifications frominitEstimateInput. Either remove the wrapper (if all callers are migrated) or stop discarding the cmd.Missing test coverage: The PR checklist explicitly marks both "Ran tests" and "Added tests if necessary" as unchecked. This is a 400+-line change that deletes an entire package (
modelops) and rewires notification propagation across every update handler. No tests were added to cover the new auto-dismiss flow, and existing tests were not verified to still pass. At minimum, run the tests before merging.Score: 5/10