emrg: fix GUI task form empty dropdowns on quick add (rant 2026-08-14T15:41:52) - #789
Merged
Merged
Conversation
This was referenced Aug 14, 2026
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.
Host reported (rant 2026-08-14T15:41:52): in task management, clicking "+ Add Task" then "Save Task" appears to do nothing.
Root cause (reproduced in headless Chrome against the real v0.2.36 renderer):
Race between
openTaskFormandloadTaskMeta. The sidebar ⏱ nav handler callsopenTasksPanel()fire-and-forget;openTaskFormsynchronously reads thetaskTypes/taskProjectsglobals while thetaskTemplateList/listProjectsIPC is still in flight → both dropdowns render 0 options →type/projectare empty on save → main.js validation throws "invalid task type" → the error only lands in the chat area, so the UI looks unresponsive.Fix (
emrg/gui/renderer/js/dialogs.js):openTaskFormis nowasyncand awaitsloadTaskMeta()when the metadata globals are still empty (idempotent fast path: if the panel already loaded metadata, the form fills synchronously with no flicker; if not, it waits for the IPC before populating the dropdowns)..catch(() => {})for safety.Test (
emrg/gui/test/renderer.smoke.test.js):taskTemplateList/listProjectsmocks: open the panel, immediately click "+ Add Task", assert both dropdowns end up populated and a quick save submits ataskCreatepayload with non-emptytype/project.Verification: GUI 245 → 246 all green (new test passes; existing P3 task-form tests unchanged), node --check clean, pytest 805 unchanged (doc-count guard synced in Agent.md).