Repository navigation
feat(agent-config): agent config state and the editing workspace [10/21] - #331
Merged
gusfcarvalho merged 4 commits intoOct 6, 2026
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Agent switching can reuse cached revisions and preview results from the previously selected agent.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Adds agent-configuration state management and an editing workspace for the future Configuration tab.
Changes:
- Adds configuration, instance, permission, and selection state.
- Adds draft, preview, validation, access-control, save, and discard orchestration.
- Adds state tests and reusable component-test helpers.
| File | Description |
|---|---|
useConfigWorkspace.ts |
Provides the shared editing workspace. |
useAgentConfig.ts |
Manages configuration and instance state. |
useAgentConfig.spec.ts |
Tests permissions, races, fallbacks, and unsupported APIs. |
helpers.ts |
Adds configuration component-test utilities. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+47
to
+48
| const revisionCache = new Map<number, AgentConfigRevision>(); | ||
| const detailCache = new Map<string, AgentInstanceDetail>(); |
| !clientBlocked.value && | ||
| !detailsLoading.value, | ||
| ); | ||
| const preview = usePreview(agentIdRef, draft.overlay, api, canPreview); |
gusfcarvalho
force-pushed
the
agent-config/10-workspace
branch
from
October 5, 2026 16:32
b1c6fb7 to
8d214a0
Compare
This was referenced Oct 6, 2026
Merged
ccf-lisa
Bot
force-pushed
the
agent-config/10-workspace
branch
from
October 6, 2026 09:40
8d214a0 to
3288c54
Compare
ccf-lisa
Bot
force-pushed
the
agent-config/10-workspace
branch
from
October 6, 2026 11:38
3288c54 to
3503c35
Compare
This was referenced Oct 6, 2026
This was referenced Oct 6, 2026
This was referenced Oct 6, 2026
ccf-lisa
Bot
force-pushed
the
agent-config/10-workspace
branch
from
October 6, 2026 13:32
3503c35 to
c24c826
Compare
ccf-lisa
Bot
force-pushed
the
agent-config/10-workspace
branch
from
October 6, 2026 14:20
c24c826 to
38a5b56
Compare
Layer 10 of 21 in the stacked split of #318. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The draft decides null-vs-omit and "back to the file value" against every known base. Editing was enabled before the background detail load finished, and a failed detail load was skipped silently, so an edit could drop an overlay entry another host's file still needs. - canEditPointer is false while a reporting instance's detail is missing; basesBlockedReason says why (loading, or which hosts failed) - failedBaseIds names the instances the last loadDetails could not load; loadDetails is the retry - a single-instance agent's only file is the selected instance's, so it never waits on the background load (and makes no extra request) - the workspaceHost test harness loads every detail, as the tab does Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lock edits on a partial fleet - useAgentConfig loads instances with listAllInstances; it exposes instancesPartial and instanceTotal (meta.counts.total), and the sync summary takes the API's fleet-wide counts - past the page cap, base-dependent edits are blocked through the existing gate (basesBlockedReason names the cap): field access and the draft would otherwise be computed over part of the fleet - a single-instance agent still makes one list request and never waits Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
helpers.ts pagedListInstances(items) answers listInstances as the paginated API does (25 a page, page fields, counts over every item); fakeApi uses it for the fixture fleet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ccf-lisa
Bot
force-pushed
the
agent-config/10-workspace
branch
from
October 6, 2026 14:38
38a5b56 to
4a214ea
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.

Part 10 of 21 of the stacked split of #318 (agent remote configuration). Every layer adds the final version of its files from #318, and only imports from layers below it, so each layer passes
make reviewableon its own. Nothing is reachable in the app until layer 20 wires the Configuration tab in.What
useAgentConfig(effective config, instances, permissions) anduseConfigWorkspace, the editing workspace that ties draft, preview, validation and save together. Adds the component test helpers used by the UI layers above.Tests
useAgentConfig.spec.ts; the workspace is exercised by the component and integration specs in later layers.Size exception
This PR is over the 1k-line limit (about 1,220 lines, package-lock excluded) and carries the
size-exceptionlabel. Review of the stack added two fixes that belong to the workspace this layer introduces, each with its regression spec: edits wait for every instance's file (failed loads tracked for a retry), and the paginated instance list (api#476/#483) is loaded through the page helper, with fleet-wide counts and edits blocked when the list is cut at the page cap. Moving the specs up would test this layer's behaviour from a layer that doesn't own it.🤖 Generated with Claude Code