Repository navigation
feat(website): add the project directory field to the cron job form - #17580
kyleseaman wants to merge 2 commits into
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Check the fourth backend refusal: Suggestions
[DESIGN-REVIEWED] 2422f20 Description read[DESCRIPTION-READ] a2e72a998b76ecc2f2aef481db137d583de45d1a06cd24d7de73a258d8c5af0c That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS The i18n tooling now hardcodes one example path as a pseudolocale exemption. Deleting the example from the copy is the smaller fix. Not justified as shipped
What this change shipsInventory (10 items) — 9 justifiedIntent: let a scheduled job point at a checkout and use the agents it ships, with the form showing which agent definition runs. This is an ADDITION.
[FIRST-PRINCIPLES-REVIEWED] 2422f20 Description read[DESCRIPTION-READ] fe63e65e629c90d61f1019e6397709e67119eefd90a801f35ac69ff3b419ed62 That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS The collision row says "Your saved one is unchanged" about an agent the picker never shows, and a directory switch keeps an invalid agent pick without saying anything until Save. Watch
Suggestions
[UX-REVIEWED] 2422f20 Description read[DESCRIPTION-READ] 84b254a3ab280a667d85804586365dfedc0fc828da05e7732d239aa8aace0e02 That sha256 names everything this verdict read: the PR description, plus the 14 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Review detailsNo findings that block the merge; two advisory issues in FINDING — website/src/components/JobForm.tsx:152 — FINDING — website/src/components/JobForm.tsx:995 — After an [OPUS-REVIEWED] 2422f20 Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
b49ce28 to
cced20c
Compare
6775a10 to
c77096e
Compare
cced20c to
522202f
Compare
d698236 to
048a119
Compare
522202f to
5d46378
Compare
048a119 to
48d2105
Compare
7c7d335 to
05d87f0
Compare
8d1f4a0 to
77692f9
Compare
Sensitive Change Review
|
05d87f0 to
9d4d991
Compare
77692f9 to
ee8d824
Compare
9d4d991 to
015a16c
Compare
ee8d824 to
19ec803
Compare
015a16c to
fb4d67a
Compare
19ec803 to
407ca28
Compare
fb4d67a to
91a21df
Compare
407ca28 to
bf2132f
Compare
91a21df to
1a9122b
Compare
bf2132f to
3a6f741
Compare
1a9122b to
8161484
Compare
Frontend half of the cron project-binding work, split from the backend so each review diff stays under the 1 MB lane cap: the Project directory field and merged agent picker in JobForm, the collision marker, the reset notices, locales, and their tests. Backend half: the parent PR in this stack.
…sion winner
A directory change no longer rewrites the agent pick. The form's catalogs
cannot tell whether a name resolves under a folder, so clearing on what they
omit discarded valid bindings and Save then stored the default agent. Save's
own resolver check already refuses an unresolvable agent with a 400 naming the
agent and folder, and the form shows it. Removes the reset notice and its two
catalog keys.
The collision row now says which definition runs ("This job runs the <name>
from this project's .kiro/agents/, not your global one.") and its chip is
warn-toned so it does not read as a source label.
Join the schedule directory picker to a modal Radix Popover so pointer,
focus and dismissal stay inside the dialog layer and keep its draft.
Standalone picker callers keep their existing layer behavior.
Co-authored-by: mbajaj92 <mbajaj.92@gmail.com>
3a6f741 to
627a6b0
Compare
|
Thanks @kyleseaman and @mbajaj92. Closing together with #17554, which this PR is stacked on; see the note there. The need stays tracked in #8952, and a small PR on current main that lets the Schedule page pick a project's agents would be very welcome. The branch is left untouched, so you can reopen this PR at any time, or open a fresh one on current main, if you want to pick it back up. |
Problem / Motivation
Goal: A scheduled job runs as the agent you picked -- or skips and says why -- and can use the agents a checkout ships.
A scheduled job names an agent. If that name stopped resolving, the job did not
fail — it ran under the default agent instead, and said nothing. The Schedule
page kept showing the name you picked, so a job could run as the wrong agent for
weeks and look green the whole time.
There was also no way to point a job at a checkout. A repo that ships its own
.kiro/agents/could not lend those agents to a job, so the agent that knows arepo was unreachable from the schedule.
Why it matters
Silent substitution is the worse half. A job that runs the wrong agent produces
plausible output, so nobody looks. The failure is invisible exactly when it
matters most — an unattended job, running while you are not there.
Not a goal
(a project's agent beats a same-named configured alias) does reach a chat slot
that is bound to a directory; see Backwards compatibility.
on
kiro-cli, whose project-first lookup the change matches.ships; it does not create, edit or install one.
What changed (motivation → approach → change)
The backend half (#17554) adds a job's Project directory and resolves its agent against that checkout's
.kiro/agents/. This PR is the form and page that expose it: the field onJobForm, a picker that merges the directory's agents with the configured ones (marking a genuine name collision and naming which definition runs), and the Schedule page's Last Error panel keeping a message job's named skip reason readable. A directory change never rewrites the agent pick: Save's resolver check refuses an agent the folder cannot resolve, and the form shows that refusal.website/src/componentsProjectPickergains amodalprop (a modal Radix Popover) so it works inside the schedule dialog -- a shared component, other callers unchangedwebsite/src/pages/SchedulePage.tsxshrink-0) and uses proportional text for jobs without ascript, so a message job's skip reason reads as prosewebsite/src/apiwebsite/src/hookswebsite/src/typesscopewebsite/src/i18nBackwards compatibility
Compatible: the field is optional and absent by default; an unbound job renders and saves exactly as before.
Removes nothing: no existing control or copy key is removed.
Tests
Frontend, in
website/src/test/: the project row is the one offered, the markerappears only on a genuine collision (not on every project row, and not on a
configured agent the directory never declared), its explanation renders as a
visible line naming the definition that runs, the selection is KEPT across a
directory switch, an emptied field and a failed or pending catalog -- Save sends
it and shows the backend's
unknown_agentrefusal under the Agent picker -- and aroster fetch failure stays beside the field instead of becoming a form-wide error. The keep-the-pick
tests fail against the earlier form-side reset.
Manual verification
Walked the whole surface on an isolated gateway against two fixture checkouts —
one declaring a colliding agent plus a project-only one, one declaring a
different agent — covering the field, the merged picker, the collision marker,
the A→B directory switch, all three save rejections, and both fire-time skips (from #9201, on the same code).
Screenshots / video
Captured from the real
JobFormand the realSchedulePagewith only HTTPresponses stubbed, so no frame can show a state the shipped code would not
produce. Each frame was taken by a self-asserting harness that fails rather than writing
an image when the scene is wrong: both that the frame carries the shipped
sentence and that it carries none of the wording an earlier revision used — which
is what let frame 11 go stale once. Frames 4, 9 and 10 come from a harness that
also asserts the Save request carried the kept pick.
Those two harnesses are held back from this diff, not deleted. Every fork AI
review lane fetches
git diff BASE...HEADand fails closed above 1,000,000 byteswith
authentic diff exceeds 1 MB; failing closed (split the PR). With themincluded this diff measured 1,033,169 bytes, so all six lanes exited at the fetch
step without reading a line, and the three that fail closed reported
review incompletewhile the other three resolved permissively and looked likeverdicts. Dropping the six harness files — which nothing references, no gate
invokes, and
vite.config.tsalready excludes — brings it to 996,988. They comeback in a follow-up with a
verify:entry, the form that makes them a standingregression test rather than one-off evidence.
1. The field. Labelled Project directory, the same term the folder-settings
field uses. The helper line says what it does in plain words -- Folder this job
works in. Agents saved in this folder also appear in the Agent list below. -- and
keeps
.kiro/agents/out of the always-visible text. The button reads Choosefolder… so it no longer shares a name with the picker's own Browse tab.
2. Choose directory…, on the Browse tab. The picker component is the one folder
settings already uses, so the two surfaces behave identically. It opens beside
the button rather than over it.
3. A bound directory's agents, merged into the picker, with a collision.
repo-smokecomes from the bound folder and says so withfolder agent;kirocrewis configured and carries no such marker (the pre-existing source badgereads
kirocrewon every row, which is what the real roster returns).release-checklistexists both in the folder and as a saved agent, so the folder'srow is the one offered: its accent-toned chip reads
folder's version, and theline beneath names the winner and says nothing saved changes -- This job runs the
folder's release-checklist. Your saved one is unchanged. The weaker
folder agentchip is suppressed on that row, since
folder's versionalready entails it.4. The roster fetch failed. The notice stays beside the field, offers Retry,
and says the saved agents are still offered, so a folder that cannot be read
degrades the picker instead of blocking the form. The detail clause is dropped
when the error carries no prose message, rather than rendering bare punctuation.
5. Save refuses a relative path, beside the field rather than form-wide.
6. Save refuses a protected system path. The verdict is the shared
resolve_project_pathone, so the form and the fire path agree on what isreachable.
7. Save refuses a directory that does not exist, so a binding cannot be
stored in a state that would only fail later, unattended.
8. A directory switch keeps the pick. The job used
repo-smokefromrelease-tools; pointing it atdocs-site, which does not define that agent,leaves the pick as it is. The form cannot tell from its catalogs whether a name
resolves under a folder, so it does not guess.
9. Save decides. The backend's resolver refuses the name for that folder
with a 400 naming the agent and the folder. The form shows it under the Agent
picker, with Pick an agent from this folder., rather than under Save; picking
another agent clears it. The job is never stored with the default agent in place
of the pick.
10. A fire refused because the directory shadows a Crew Member. The skip
reason renders in the Schedule page's Last Error panel, which keeps its height
and uses proportional text for a message job. The sentence names the shadowed member and both remedies,
because these skips spend no auto-pause strike and so this text is the only
signal there is.
11. The ordinary unresolved-agent skip, naming the
.kiro/agents/conventionto add the file to rather than only the folder it is missing from -- so the
message carries a remedy and not just a diagnosis. The directory is named
possessively rather than by absolute path:
last_erroris readable by anyauthenticated dashboard token, not only the owner, so the folder itself stays in
the operator's log line.
Related Issues
Part of #8952 (closed by the backend half, #17554)
Stacked on #17554
Supersedes the UI half of #9201 (author @mbajaj92)
Checklist
feat|fix|docs|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.