Skip to content

fix(web): compact agent template provenance - #2327

Open
Gandy2025 wants to merge 2 commits into
mainfrom
fix/compact-template-provenance
Open

fix(web): compact agent template provenance#2327
Gandy2025 wants to merge 2 commits into
mainfrom
fix/compact-template-provenance

Conversation

@Gandy2025

Copy link
Copy Markdown
Contributor

Summary

  • replace the heavy Profile responsibilities section with compact Created from identity metadata
  • link each available template source to its Template Library detail page
  • keep source removal available in an overflow menu while preserving conflict and refresh behavior

Validation

  • pnpm --filter @first-tree/web typecheck
  • pnpm check && pnpm typecheck
  • focused Agent Detail tests: 65 passed
  • full Web suite: 2,417 passed; one unrelated chat-scroll timing assertion failed and passed on isolated rerun

Scope

This PR only changes template provenance presentation in the Web Agent Detail Profile. The Feishu channel information architecture is being handled separately.

@yuezengwu yuezengwu 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.

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 baixiaohang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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
⚠️ 1. Removal success still calls a local 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.

@Gandy2025

Copy link
Copy Markdown
Contributor Author

Addressed the non-blocking saved-state finding in bf27eb807.

The provenance component no longer creates or marks a local useJustSaved state that it cannot render. The existing resource-cache update, invalidation, conflict recovery, and visible row removal behavior remain unchanged.

Validated with the 65 focused Agent Detail tests and pnpm --filter @first-tree/web typecheck (including design-token guardrails).

@baixiaohang baixiaohang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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 from presentation and existing removal workflow, while removing the unused useJustSaved callback 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 yuezengwu 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.

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.

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