Skip to content

feat(agents): show last used by/at on card and settings#3302

Open
rafavalls wants to merge 1 commit intomainfrom
rafavalls/agent-last-used-info
Open

feat(agents): show last used by/at on card and settings#3302
rafavalls wants to merge 1 commit intomainfrom
rafavalls/agent-last-used-info

Conversation

@rafavalls
Copy link
Copy Markdown
Collaborator

@rafavalls rafavalls commented May 6, 2026

What is this contribution about?

Surfaces "last used" information for agents in two places: the agent card footer (grid/list view) and the agent settings page. Data is derived from the most recent thread created for each agent — no schema migration required.

  • Card footer: shows "Last used X ago" when threads exist, falls back to "Updated X ago"
  • Settings page: single metadata line below the identity header — [avatar] Name · Created May 6 · Last used X ago — with a second avatar shown inline only when the last user differs from the creator
  • VirtualMCPEntity: two new optional fields last_used_at / last_used_by populated via a DISTINCT ON query against the threads table
  • User component: new nameClassName prop to allow callers to override the hardcoded font-medium on the name text

Screenshots/Demonstration

Agent card footer and settings metadata line updated — see PR description above.

How to Test

  1. Open the agents grid — cards with existing threads show "Last used X ago" in the footer
  2. Click into any agent settings — the metadata line below the header shows creator + created date + last used time
  3. For agents with no threads, the card shows "Updated X ago" and settings shows "Never used"

Migration Notes

No database migrations required. last_used_at and last_used_by are computed at read time from the existing threads table.

Review Checklist

  • PR title is clear and descriptive
  • Changes are tested and working
  • Documentation is updated (if needed)
  • No breaking changes

Summary by cubic

Show the “last used” time and user for each agent in the card footer and on the settings page, based on the latest thread. Adds last_used_at and last_used_by to the entity and SDK; no migration needed.

  • New Features
    • Card footer shows “Last used X ago”; falls back to “Updated X ago”.
    • Settings metadata shows creator, created date, and “Last used X ago” (or “Never used”).
    • Backend computes last usage via a DISTINCT ON query on threads and returns last_used_at/last_used_by in both single and list fetches.

Written for commit 87863ef. Summary will update on new commits.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

🧪 Benchmark

Should we run the Virtual MCP strategy benchmark for this PR?

React with 👍 to run the benchmark.

Reaction Action
👍 Run quick benchmark (10 & 128 tools)

Benchmark will run on the next push after you react.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

Release Options

Suggested: Minor (2.311.0) — based on feat: prefix

React with an emoji to override the release type:

Reaction Type Next Version
👍 Prerelease 2.310.1-alpha.1
🎉 Patch 2.310.1
❤️ Minor 2.311.0
🚀 Major 3.0.0

Current version: 2.310.0

Note: If multiple reactions exist, the smallest bump wins. If no reactions, the suggested bump is used (default: patch).

@rafavalls rafavalls force-pushed the rafavalls/agent-last-used-info branch from a0f147e to 87863ef Compare May 7, 2026 17:43
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