fix(desktop): keep New Cronjob owner labels render-safe (salvage #93572) - #95071
Closed
dokterdok wants to merge 2 commits into
Closed
fix(desktop): keep New Cronjob owner labels render-safe (salvage #93572)#95071dokterdok wants to merge 2 commits into
dokterdok wants to merge 2 commits into
Conversation
Collaborator
Contributor
|
Closing — this landed on main an hour before this draft went up: #95018 (merged 9033545) salvaged #93572 with the same call-site fix plus a regression test pinning the object-aware |
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 does this PR do?
Opening New Cronjob can crash the whole Cronjobs pane when the selected bot is represented by a roster-owner object. The dialog wrapped that object again as
{ name: <object> };displayName()then used string methods on the nested object during render.This salvage preserves @zhangfei1231231-sketch's original fix commit from #93572 and adds the smallest follow-up required by review:
displayName()path unchanged.Configured titles remain intact for both owner shapes, and opening the dialog no longer takes down the pane.
Related Issue
Related to #94471 and the Routines class tracked in #94726. This fixes a separate deterministic render path with the same error-boundary signature; it does not replace #94621's RPC-rejection handling.
Supersedes #93572 while preserving its original authored commit.
Type of Change
Changes Made
apps/desktop/src/plugins/hermes-bots/plugin.js: scope owner normalization toCreateRoutineDialogand reuse the computed label at both render sites.apps/desktop/src/plugins/hermes-bots/tests/routine-dialog-owner.test.mjs: cover string owners, roster-object owners, configured titles, and an unreachable remote-owner fallback.How to Test
Validation
dev:mockdialog + create flowgit diff --checkThe full Python suite was also executed. It reported 36,890 passing tests and 87 failures across 21 unrelated Python/platform files; the same failure files reproduce on pristine
mainunder this local environment. This Desktop-only diff does not modify those paths.Checklist
Code
Documentation & Housekeeping
Screenshots / Logs
The screenshot below shows both corrected owner-label surfaces. It was captured from an isolated mock home and excludes local paths and production identities.