Skip to content

feat(portal): add AgentDetailPanel with core fields, inheritance badges, and dirty tracking#494

Closed
sytone wants to merge 3 commits into
mainfrom
feat/agent-detail-panel
Closed

feat(portal): add AgentDetailPanel with core fields, inheritance badges, and dirty tracking#494
sytone wants to merge 3 commits into
mainfrom
feat/agent-detail-panel

Conversation

@sytone
Copy link
Copy Markdown
Owner

@sytone sytone commented May 22, 2026

Part of #407 (Phase 2 of 3)

Changes

AgentDetailPanel.razor (new component)

Full-width per-agent configuration panel with:

Sections:

  • Identity: Agent ID (read-only label), Display Name, Description, Emoji
  • Model & Provider: Provider dropdown/input, Model dropdown/input (filtered by provider), loading state
  • System Prompt: Multi-row textarea
  • Memory: Enabled toggle with World default badge when inherited
  • Heartbeat: Enabled toggle + interval minutes with World default badges
  • Danger Zone: Delete button with confirmation overlay

Behaviours:

  • Loads GET /api/agents/{agentId} to populate all fields
  • Loads GET /api/config/agents/{agentId}/effective to compute inheritance badges
  • Dirty tracking via field-by-field Equals — Save button only enabled when form differs from original state
  • Field validation: Display Name, Provider, Model required
  • Save via PUT /api/agents/{agentId}, updates _originalForm on success
  • Delete via DELETE /api/agents/{agentId} with OnDeleted callback to parent
  • Status messages auto-dismiss after 4s

Agents.razor (updated)

  • Added @page "/agents/{AgentId}" route
  • AgentId route parameter — when set, renders AgentDetailPanel instead of the table view
  • HandleAgentDeleted callback navigates to /agents and reloads the list

Tests (8 tests)

  • Shows_loading_spinner_initially
  • Displays_agent_core_fields_after_load
  • Shows_world_default_badge_for_inherited_field
  • Save_button_disabled_when_form_is_clean
  • Save_button_enabled_after_changing_display_name
  • Delete_button_shows_confirmation_dialog
  • Shows_error_when_agent_not_found
  • Validation_prevents_save_with_empty_display_name

Note: Phase 3 (extension config blocks via IAgentExtensionConfigSchema) remains open as #407 Phase 3.

BotNexus Test added 2 commits May 22, 2026 04:25
@sytone
Copy link
Copy Markdown
Owner Author

sytone commented May 22, 2026

CI: All checks passing (build-and-test, CodeQL, security scans)
Merge conflicts: Clean / MERGEABLE
Commit title: Conventional commit format correct
Coverage: 8 bUnit tests covering load, dirty tracking, save, delete, validation, inheritance badges
Spec completeness: Matches Part of #407 Phase 2 - identity, model/provider, system prompt, memory, heartbeat, danger zone all implemented with effective config inheritance badges and dirty tracking

LGTM - ready to merge.

…tDetailPanel

Extends AgentDetailPanel (PR #494) with missing sections from #290:
- Tools & Sub-Agents: tag-based add/remove lists for ToolIds and SubAgentIds
- File Access: add/remove path lists for AllowedReadPaths, AllowedWritePaths, DeniedPaths
- AgentFormModel: added 5 new list fields with deep Clone() and SequenceEqual Equals()
- LoadAgentAsync: populates new fields from descriptor DTO
- SaveAsync: includes toolIds, subAgentIds, fileAccess in PUT payload
- FileAccessDto added to local DTOs for deserialization
- 4 new bUnit tests: tool ids rendered, empty tool ids, sub-agent ids, file access paths
- 12/12 AgentDetailPanelTests pass

Part of #290
@sytone
Copy link
Copy Markdown
Owner Author

sytone commented May 22, 2026

Updated this run: Added Tools & Sub-Agents and File Access sections (commit acfca269), extending #290 coverage.

  • ToolIds + SubAgentIds tag-based add/remove lists
  • AllowedReadPaths, AllowedWritePaths, DeniedPaths path lists
  • Deep Clone() and SequenceEqual-based Equals() for dirty tracking
  • SaveAsync payload extended
  • 4 new bUnit tests; 12/12 pass

CI will re-run. Still LGTM for #407 Phase 2. Partial progress on #290.

@sytone
Copy link
Copy Markdown
Owner Author

sytone commented May 22, 2026

CI: ✅ All checks passing
Merge: CLEAN — no conflicts
Commit title: feat(portal): add AgentDetailPanel with core fields, inheritance badges, and dirty tracking ✅ Conventional commit
Coverage: 8+ bunit tests; includes Tools, Sub-Agents, File Access sections
Spec completeness: Closes #407 Phase 2 + partial #290 — full agent config panel with dirty tracking, save, delete, effective config inheritance badges

LGTM — ready to merge.

Copy link
Copy Markdown
Owner Author

@sytone sytone left a comment

Choose a reason for hiding this comment

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

Farnsworth Review — PR #494

CI: ✅ All checks passing
Merge conflicts: ✅ Clean (MERGEABLE)
Conventional commit title:feat(portal): add AgentDetailPanel with core fields, inheritance badges, and dirty tracking

Test coverage:

  • ✅ Core identity fields render
  • ✅ Inheritance badge displays for world-default fields
  • ✅ Dirty tracking triggers Save button
  • ✅ Tools, SubAgentIds, file access path sections
  • Full suite passes clean

Spec completeness vs #407 Phase 2 + #290: Comprehensive agent detail panel. Deep Clone() + SequenceEqual for dirty tracking is correct. Soul/Access Controls/Runtime sections deferred pending deeper scope clarification (appropriate).

LGTM. Ready to merge.

@sytone
Copy link
Copy Markdown
Owner Author

sytone commented May 22, 2026

Closing as part of a planned hard-reset of the in-flight branch set so the new domain-model refactor can land on a clean trunk.

Audit verdict: keep

Rationale: Portal/UI; reads AgentDescriptor - minor adjustments at most when ICitizen is added.

The new plan (in session state) reshapes core types: Citizen (User+Agent union), Vogen-generated value objects, ThreadId removed in favour of composite ChannelAddress, mark-not-delete compaction, centralised SessionContextProjector, single-path routing. Many in-flight branches touch contracts that are about to change — rebasing later would be more work than rebuilding on the new shape.

If this work is still wanted, refile as a new issue/PR against the post-refactor contracts.

@sytone sytone closed this May 22, 2026
@sytone sytone deleted the feat/agent-detail-panel branch May 22, 2026 18:47
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.

1 participant