Skip to content

fix: run review agents on the subscription of whoever changes them - #385

Merged
kalaspuff merged 3 commits into
mainfrom
fctl/669-if-the-owner-or-a-maintainer-or-project
Nov 5, 2026
Merged

kalaspuff merged 3 commits into
mainfrom
fctl/669-if-the-owner-or-a-maintainer-or-project

Conversation

@fctl-sh

@fctl-sh fctl-sh Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Schedules already do what was asked. A change to a schedule's task, timing, model, effort, branch or GitHub access by anyone but its owner (a project maintainer or owner, a workspace admin) moves it to that person's Claude subscription, and so does a resume. Pausing it moves nothing. I confirmed this in cargo xtask dev with a second member, so this pull request doesn't change schedules.

Review agents didn't work that way. A project owner or workspace admin who wasn't the operator could change their instructions, model, effort level, skipped repositories, drafts setting, summaries or bots, and the reviews kept running on the operator's subscription. Now a real change by another owner, while review agents are on, takes them over, as Run them on mine (run_as_me) does. Saving settings that haven't changed, or the same apps or repositories in another order, takes nothing over. Turning them off still moves nothing, and whoever turns them on again takes them over, as before. The audit log records whose subscription they were taken from (taken_over_from, as schedules already do). ADR 0073 records the decision, which changes part of ADR 0040, and the docs, llms.txt and the CLI help say it too.

In the settings form, an owner who isn't the operator sees that saving moves the reviews to their subscription, and the toast says so after saving. A save the server refuses for lack of a Claude connection now shows its error with a Connect Claude link. Before, the form hid errors that named a field none of its inputs show.

Verified with unit tests of the decision (fctl_domain::reviews::takes_over, same_names), web tests of the form for an owner who isn't the operator, and in cargo xtask dev, with a made-up GitHub App id, review agents run by a second member, and the workspace owner making each kind of change:

  • Saving the same settings left Bo as the operator.
  • Changing the instructions or the model made the workspace owner the operator.
  • Turning them off left Bo as the operator; turning them on again made the workspace owner the operator.
  • The operator's own change of model left them as the operator.

cargo xtask check --quick passes.

Screenshots

The bottom of the review agents' settings form, for an owner whose review agents run on someone else's subscription. Before:

before-light.png

After, in the light and dark themes:

after-light.png

after-dark.png

A save refused because the owner has no Claude connection, which the form didn't show before:

noclaude.png

Worth confirming

  • Decision: I applied the schedules rule to review agents, though the request named scheduled tasks. Every review-agent setting counts as a change: model, effort, instructions, skipped repositories, drafts, summaries and bots. Skipping a repository or a bot means fewer reviews, so it could be left out.
  • Decision: An owner without a Claude connection can no longer change review agents that run on someone else's subscription. They can still turn them off.
  • Assumption: Project-wide settings stay out of scope: the project's default model and effort, its instructions for agents, and its memory. They shape scheduled runs and reviews on their owner's subscription, but every session in the project uses them, the owner's own sessions included, so no one person owns them.

fctl session


Note

Medium risk. It changes whose Claude subscription a project's review agents run on, which people rely on, and decides this from a comparison of old and new settings on the server.

What it does. When a project owner other than the one the review agents run for changes how they review (model, effort, instructions, bots, skipped repositories, drafts or description summaries), the agents now move to that owner's Claude subscription, as turning them on or taking them over already did. Saving the settings unchanged, or changes by the operator, keep things where they are. The settings form says this before saving, the CLI help and docs say it, and a new ADR records the decision.

Behavior change. Another owner's settings save now needs a connected Claude subscription and silently ends the previous operator's use of theirs; the audit event records taken_over_from.

fctl review's first look at 7ee6b53 · 13 files, +315 −44 · Review agent settings

An owner who isn't review agents' operator could change their model,
effort level, instructions, skipped repositories, drafts, summaries and
bots while they kept running on the operator's Claude subscription. Such
a change now takes them over, as run_as_me does (ADR 0073); turning them
off still moves nothing. The settings form says so before saving and
shows a refused save's error, which it hid when the error named a field.
@fctl-sh
fctl-sh Bot requested a review from kalaspuff as a code owner November 5, 2026 15:39
@fctl-review

This comment has been minimized.

Comment thread crates/fctl-control/src/api/reviews.rs Resolved
Comment thread web/src/components/project/reviews.tsx Resolved
fctl-sh Bot added 2 commits November 5, 2026 15:43
Review agents' settings compare the apps that start reviews and the
repositories they skip as sets, as the web form does, so that another
owner who names them in another order doesn't take them over. The form's
tests cover an owner whose review agents someone else runs: the note
before saving, the toast after, and a save refused for lack of a Claude
connection.
…-or-a-maintainer-or-project

# Conflicts:
#	docs/adr/README.md
@kalaspuff
kalaspuff merged commit c658874 into main Nov 5, 2026
11 checks passed
@kalaspuff
kalaspuff deleted the fctl/669-if-the-owner-or-a-maintainer-or-project branch November 5, 2026 20:35
@fctl-review

fctl-review Bot commented Nov 5, 2026

Copy link
Copy Markdown

fctl reviewed 7ee6b53 and found 1 issue.

Reviewed by fctl · Review agent settings

"skipped_repos": skipped,
"drafts": drafts,
"description_summary": description_summary,
"taken_over_from": (takes_over && !mine)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Audit names an operator nothing ran for

Low severity. Turning review agents off keeps operator_id, so when a different owner turns them on again, taken_over_from records the old operator although nothing ran on their subscription while the agents were off. The audit log then claims a takeover that did not happen.

Suggested change
"taken_over_from": (takes_over && !mine)
"taken_over_from": (takes_over && !mine && was_on)

Found by fctl review in 7ee6b53.

kalaspuff pushed a commit that referenced this pull request Nov 5, 2026
…hem (#388)

## Summary

The diff dialog showed one file at a time and left stray yellow focus
rings behind. It now holds every changed file's diff, one after the
other, in one scroll that opens at the file clicked. Each file has a
header that stays at the top while its lines scroll, and can fold. All
diffs come in one request (`GET /sessions/{id}/diff`, which fills each
file's cache), and a file draws its lines once it comes near the view,
so sessions with many files stay quick. The list beside the diffs marks
the file in view and jumps to a file on a click.

- **Keys:** `j`/`k` go from file to file. The arrow keys (and `j`/`k`,
Home, End) move through the list, and the focus moves with them. `n`/`p`
step from change to change across files. `s` and `w` still lay the diffs
out side by side and wrap them.
- **Find:** ⌘F (Ctrl+F elsewhere) opens a find bar over the diffs. It
searches every file's lines, starting from where you are scrolled. Enter
and Shift+Enter, ⌘G/⌘⇧G and F3 step through the matches. If you have
scrolled away, the next step starts from where you are now. Alt+C, Alt+W
and Alt+R turn on match case, whole word and regular expressions, as in
VS Code, and a bad expression says what is wrong. Matches use the
transcript find's highlights, the list counts them per file and dims
files without any, and Escape closes the bar before the dialog.
- **Focus rings:** the header's buttons no longer take the focus, so
arrow keys keep scrolling the diffs. The list's rows show keyboard focus
as their own inset outline. After the dialog closes, the row it was
opened from by a click gets the focus back without the keyboard's ring.
Tab still shows the ring as before.

Verified with unit tests: the search logic, the line keys matching
`parsePatch`, and the dialog's keys, find, folding, bulk loading and
focus return. I also drove it with Playwright in Chromium and WebKit
against this repository's own #385 and #386 diffs (13 and 55 files): 55
files open in about 0.65 s with a simulated 200 ms network delay, and
"diff" (894 matches) is found in about 75 ms. `npm run check` and the
web tests pass. Docs: `docs/llms.txt` and the Changes paragraph of
getting started describe the new keys.

## Screenshots

Before: clicking a file in the list and pressing ↓ rings it in yellow;
so does the next-file button after an arrow key, and the Changes row
after the dialog closes.


![before-dialog.png](https://app.fctl.sh/api/v1/published/U08SXbe8P6zDcU1mfVKZZhIJFf4QonaAJRDhJbW9jb3/before-dialog.png)

![before-next.png](https://app.fctl.sh/api/v1/published/d6ypNcattQY5GGPYBxQhiYXHyAEhOARs6oy5EUTw3nJ/before-next.png)

![before-rail.png](https://app.fctl.sh/api/v1/published/aQtNoAXyDBAVwGnUaJHENADzmOlB2eMkdMzXvh5DUYH/before-rail.png)

After, the same steps: ↓ in the list went on to the next file with no
ring, the header's buttons have none, and the Changes row is quiet after
closing.


![after-dialog.png](https://app.fctl.sh/api/v1/published/8dRcs1D85B5KVY8gcNNNMnZ04Ngl0IuCvuga5U9mMAq/after-dialog.png)

![after-next.png](https://app.fctl.sh/api/v1/published/CAcaexfmAKAk1Dy2qlaVYoyB5H7CndU3B5HBNFGTjlf/after-next.png)

![after-rail.png](https://app.fctl.sh/api/v1/published/bs9X6t0pACYqfPMnjxvhbCIe8zxQrn4CRnvOqRZVtai/after-rail.png)

Finding "review" from `docs/api.md`: the match it is at in brand yellow,
the others lighter, and the count per file in the list.


![after-find.png](https://app.fctl.sh/api/v1/published/an4USpJdjA5iwxUl24cEsDzaN7QUDsKVuCqwkDf09qn/after-find.png)

The light theme, side by side, while finding; and a phone, where the
list covers the diffs while open.


![after-light-split.png](https://app.fctl.sh/api/v1/published/KqFFHdfh667zqJ8xhuAIIEmlm6PjYuQEoFNK73jEHzp/after-light-split.png)

![after-phone.png](https://app.fctl.sh/api/v1/published/lALpScYm9rQNIXftekWCmVOBDDiaVyabKXytJUp6tzv/after-phone.png)

## Worth confirming

- **Decision:** `/` still focuses the list's file filter rather than the
find bar, as it did before; ⌘F is the way into finding in the diffs.
- **Decision:** a second ⌘F while the find bar has the focus opens the
browser's own find, as the transcript's find does.
- **Decision:** `n`/`p` are new keys for the next and previous change (a
run of added or removed lines), across files.
- **Decision:** matching is literal and ignores case unless a toggle
says otherwise (like VS Code), unlike the transcript find, which also
ignores accents and the amount of whitespace. Code search is more useful
exact.

[fctl session](https://app.fctl.sh/s/ses_01M6PQN4596R913AXY00WEW58X)

<!-- FCTL_REVIEW_SUMMARY -->
---

> [!NOTE]
> **Low risk.** It reworks the web app's diff dialog and adds a find
bar; it changes no API, storage or server code, and only affects how the
session page shows diffs.
>
> **What it does.** Replaces the diff dialog's one-file-at-a-time view
with a single scroll through every changed file's diff, fetched together
with one `GET /sessions/{id}/diff`, plus a file list and a find bar (⌘F)
that searches across all the diffs. The latest commit makes the find bar
go to each step once and focus its field once per ⌘F, and scrolls the
opened file's row into view in the list after the dialog shows.
>
> **Large rewrite.** `diff-dialog.tsx` is rewritten and split into
`diff-files.tsx` and `diff-find.tsx`; `docs/architecture.md` still
describes the old per-file fetch.
>
> <sub>[fctl
review](https://app.fctl.sh/s/ses_01M6PT77P05RTXVJF0GZWW0KBY)'s first
look at
[`7306cfb`](7306cfb)
· 13 files, +2255 −562 · [Review agent
settings](https://app.fctl.sh/p/fctl?tab=reviews)</sub>

<!-- /FCTL_REVIEW_SUMMARY -->

---------

Co-authored-by: fctl-sh[bot] <343971779+fctl-sh[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant