Add routine target editing to the routine panel (CL-7358) - #559
Draft
TheGreatAxios wants to merge 4 commits into
Draft
Add routine target editing to the routine panel (CL-7358)#559TheGreatAxios wants to merge 4 commits into
TheGreatAxios wants to merge 4 commits into
Conversation
TheGreatAxios
force-pushed
the
cl-7358-target-edit
branch
from
September 2, 2026 07:44
334492e to
03858f0
Compare
TheGreatAxios
force-pushed
the
cl-7358-target-edit
branch
from
September 2, 2026 08:24
03858f0 to
bc64335
Compare
Reuse DefinitionTargetPicker for edit mode instead of a read-only display, so create and edit never duplicate target-display logic. Picking a new target on an existing routine fires a target-only PATCH through the panel's autosave queue; a server rejection reverts the picker to the last-saved target and surfaces through the existing inline error path without touching other unsaved fields. The picker now reports staleness via onStaleChange so the panel can disable Run now when the current target is no longer available. Also exposes definitionAssetId on the browser-safe UpdateRoutineInput client type — the server (packages/routines/src/store.ts) already accepted it.
TheGreatAxios
force-pushed
the
cl-7358-target-edit
branch
from
September 2, 2026 08:31
bc64335 to
53a4eb9
Compare
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.
Summary
DefinitionTargetPicker(the same component create mode uses) instead of a read-only target display — no more duplicated target-display logic between modes.{ definitionAssetId }) through the panel's existing autosave queue; a server rejection (404/409/403 fromroutineTargetRejection) reverts the picker to the last-saved target and shows the error through the panel's existing inline error path, without discarding other unsaved input.onStaleChangeprop; the panel uses it to disable "Run now" until the routine's target is valid.definitionAssetIdon the browser-safeUpdateRoutineInputclient type inpackages/routines/src/client.ts— the server already accepted it.Linear: https://linear.app/abklabs/issue/CL-7358
Test plan
bunx tsc --noEmit -p apps/webbun test apps/web/test/routine-panel.test.tsx(run fromapps/websobunfig.toml's DOM preload applies) — 27 passbunx eslint apps/web/src/shell— cleanResolves CL-7358