Skip to content

fix(desktop): keep New Cronjob owner labels render-safe (salvage #93572) - #95071

Closed
dokterdok wants to merge 2 commits into
NousResearch:mainfrom
dokterdok:salvage/93572-routine-owner-label
Closed

fix(desktop): keep New Cronjob owner labels render-safe (salvage #93572)#95071
dokterdok wants to merge 2 commits into
NousResearch:mainfrom
dokterdok:salvage/93572-routine-owner-label

Conversation

@dokterdok

@dokterdok dokterdok commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

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:

  • normalize string and roster-object owners once in a dialog-local helper;
  • use the same normalized owner for display and metadata lookup;
  • reuse one reactive label for the dialog description and delivery option;
  • leave the global roster 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

  • Bug fix
  • Tests

Changes Made

  • apps/desktop/src/plugins/hermes-bots/plugin.js: scope owner normalization to CreateRoutineDialog and 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

  1. Open a Bot Chat and its Cronjobs pane.
  2. Select New Cronjob.
  3. Confirm the bot label appears in the description and delivery destination.
  4. Enter a name and instruction, create the cronjob, and confirm the row appears without an error boundary.

Validation

Check Result
Focused owner-label tests 4/4 pass
Full Bot plugin suite 560/560 pass
Desktop TypeScript checks pass
Production Desktop build pass
Live macOS dev:mock dialog + create flow pass
git diff --check pass

The 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 main under this local environment. This Desktop-only diff does not modify those paths.

Checklist

Code

Documentation & Housekeeping

  • Documentation changes are not applicable.
  • Config changes are not applicable.
  • Architecture/workflow changes are not applicable.
  • Cross-platform impact is limited to renderer JavaScript with no platform branch.
  • Tool descriptions and schemas are unchanged.

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.

New Cronjob dialog with the bot chat destination

@alt-glitch alt-glitch added type/bug Something isn't working comp/desktop Electron desktop app (apps/desktop/*) P3 Low — cosmetic, nice to have duplicate This issue or pull request already exists labels Aug 25, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Duplicate of #95018, the earlier open maintainer salvage of #93572. Both fix the same roster-owner object handling in CreateRoutineDialog's bot-chat label; #95018 is the narrower canonical patch.

@teknium1

Copy link
Copy Markdown
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 botRosterMeta shape. Thanks for jumping on it @dokterdok — right diagnosis, just beaten to the punch by the in-flight salvage.

@teknium1 teknium1 closed this Aug 25, 2026
@dokterdok
dokterdok deleted the salvage/93572-routine-owner-label branch August 26, 2026 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/desktop Electron desktop app (apps/desktop/*) duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants