Skip to content

feat(agent-config): instance status classification and test fixtures [6/21] - #327

Merged
gusfcarvalho merged 4 commits into
agent-config/05-validation-difffrom
agent-config/06-instance-status
Oct 6, 2026
Merged

gusfcarvalho merged 4 commits into
agent-config/05-validation-difffrom
agent-config/06-instance-status

Conversation

@gusfcarvalho

Copy link
Copy Markdown
Contributor

Part 6 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 reviewable on its own. Nothing is reachable in the app until layer 20 wires the Configuration tab in.

What

Classifies reporting instances (in sync / pending / drifted / stale / unsupported) and adds the shared API fixtures used by the composable and component specs above this layer.

Tests

instance-status.spec.ts.

🤖 Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings October 5, 2026 10:51
@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 2105d10e-cefb-4952-9ee5-43c62445670a
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Out-of-sync revisions are misclassified, and truncated-instance fixtures incorrectly retain their dropped base configuration.

Review effort: Balanced
Findings: 2 Medium severity

Open (2)
What changed in this PR

Adds agent-instance status classification and reusable remote-configuration fixtures.

Changes:

  • Derives UI status badges and synchronization summaries.
  • Adds classification tests.
  • Adds shared API fixtures for later layers.
File Description
src/​utils/​agent-config/​instance-status.ts Classifies instance states and summarizes synchronization.
src/​utils/​agent-config/​__tests__/​instance-status.spec.ts Tests status classification and summaries.
src/​composables/​agent-config/​__tests__/​fixtures.ts Provides shared configuration API fixtures.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

base.remote_config = clone(s.remoteConfig ?? remoteConfigSafe);
return {
...s,
base,
Comment on lines +106 to +107
if (inst.status === 'applied' && inst.syncStatus === 'out-of-sync')
return pending;
ianmiell
ianmiell previously approved these changes Oct 6, 2026

@ianmiell ianmiell left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ccf-review: APPROVE

no findings.

Stack (gh stack 343): #322 → #323 → #324 → #325 → #326 → #327 → #328 → #329 → #330 → #331 → #332 → #333 → #334 → #335 → #336 → #337 → #338 → #339 → #340 → #341 → #342

gusfcarvalho and others added 3 commits October 6, 2026 10:55
Layer 6 of 21 in the stacked split of #318.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The one-shot, truncated-report and file-warnings badge tooltips read
TOOLTIPS['agents.config.instance.*'], per docs/TOOLTIPS.md (UI-COMP-001).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The instance list becomes paginated (api#476/#483), so the loaded rows
may be part of the fleet. summarizeSync takes meta.counts for the
fleet-wide numbers (total, in sync / expected, stale, not reporting)
and marks the summary partial when fewer rows are loaded than
counts.total: report-only (rows only) is then unknown, and the problem
chips cover the loaded rows. instancesMixed.meta carries the page
fields.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ccf-lisa
ccf-lisa Bot force-pushed the agent-config/06-instance-status branch from 029ddaa to 274a926 Compare October 6, 2026 14:20
…summary

The API counts sync status for every instance, stale ones included, so
taking inSync / expected from meta.counts showed an offline agent as
"In sync: 1/1". With every row loaded (the normal case, and always a
single instance) the summary is computed from the rows as before, with
only the total from counts; the counts are used only when the list is
partial, where they are the only fleet-wide numbers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gusfcarvalho
gusfcarvalho merged commit dd8d73f into main Oct 6, 2026
4 checks passed
@gusfcarvalho
gusfcarvalho deleted the agent-config/06-instance-status branch October 6, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants