fix(web): compact agent template provenance - #2327
Conversation
yuezengwu
left a comment
There was a problem hiding this comment.
The change cleanly replaces the dedicated Responsibilities section with compact Created from metadata, links resolvable sources to Template Library details, and preserves scoped removal, unavailable-source handling, cache updates, and version-conflict recovery. The focused DOM coverage tracks the new presentation and management path. No blocking issues found.
baixiaohang
left a comment
There was a problem hiding this comment.
Recommendation: approve
- Rationale: The compact provenance row preserves the authoritative resource and removal paths while keeping permissions, unavailable/retired sources, and version-conflict recovery intact.
Risk level: C
- Path baseline: only
packages/web/**changes. - Semantic lift: none; this changes Web presentation and the removal entry point without changing subscription, WebSocket, cache, or replace-set semantics.
PR summary
- Author / repo: Gandy2025 / agent-team-foundation/first-tree
- Problem: Adopted Template provenance is too visually heavy as a dedicated Profile section for information users mainly need as creation context.
- Approach: Move the conditional provenance into the Identity field list, link resolvable sources to their public Template detail pages, and retain manager-only removal in one overflow menu.
- Impacted modules: Agent Detail Profile/Identity presentation, Template provenance controls, and focused DOM tests.
Review findings
useJustSaved().markSaved, but this component no longer renders the corresponding justSaved state. The visible row update makes this non-blocking, but wiring the success into IdentitySection's existing Saved flash (including last-source removal) or deleting the dead local state would keep immediate-save semantics coherent. [R1 / packages/web/src/pages/agent-detail/responsibilities-section.tsx:47]
✅ 2. Available sources link through schema-validated slugs, while missing sources remain explicit, non-link provenance with distinct removal actions.
✅ 3. The existing active-manager guard, scoped replace-set mutation, cache update, initial-load retry, and version-conflict refresh paths remain intact.
Action taken
- Approved exact head
bee28b52cfc7a6ab63128eeb241c4acb61891918. - Reviewer did not run tests; relied on diff/source review, focused test coverage, author-reported validation, and CI as the independent gate.
|
Addressed the non-blocking saved-state finding in The provenance component no longer creates or marks a local Validated with the 65 focused Agent Detail tests and |
baixiaohang
left a comment
There was a problem hiding this comment.
Recommendation: approve
- Rationale: The only new commit removes the unused local Saved-state path identified in the previous review without changing removal or cache behavior.
Risk level: C
- Path baseline: only
packages/web/**changes. - Semantic lift: none; the increment is a local state cleanup with no data-layer semantic change.
PR summary
- Author / repo: Gandy2025 / agent-team-foundation/first-tree
- Problem: Template provenance should remain compact identity metadata, and the compact component should not retain a save-feedback state it cannot display.
- Approach: Keep the
Created frompresentation and existing removal workflow, while removing the unuseduseJustSavedcallback from the provenance mutation handlers. - Impacted modules: Agent Detail Template provenance component only in this increment.
Review findings
✅ 1. The previous non-blocking finding is resolved: the component no longer creates or marks an unrendered Saved state.
✅ 2. The increment leaves the replace-set payload, resource-cache update/invalidation, visible row removal, and conflict recovery unchanged.
✅ 3. The original presentation, permission, unavailable-source, and Template-detail link review conclusions remain valid.
Action taken
- Re-approved exact head
bf27eb807c41b26b7ba00d0efe31c931cfb1f141. - Reviewer did not run tests; relied on exact incremental diff review, author-reported focused validation, and CI as the independent gate.
yuezengwu
left a comment
There was a problem hiding this comment.
Re-reviewed the synchronized delta through bf27eb807c41b26b7ba00d0efe31c931cfb1f141. It removes only the unrendered local useJustSaved state and callback; resource-cache updates, invalidation, removal behavior, analytics, and version-conflict recovery remain unchanged. No blocking issues found.
Summary
Created fromidentity metadataValidation
pnpm --filter @first-tree/web typecheckpnpm check && pnpm typecheckScope
This PR only changes template provenance presentation in the Web Agent Detail Profile. The Feishu channel information architecture is being handled separately.