Skip to content

fix(profile): consolidate agent profile runtime metadata#1451

Merged
tellaho merged 11 commits into
mainfrom
tho/profile-panel-ia
Jul 2, 2026
Merged

fix(profile): consolidate agent profile runtime metadata#1451
tellaho merged 11 commits into
mainfrom
tho/profile-panel-ia

Conversation

@tellaho

@tellaho tellaho commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Category: improvement
User Impact: Agent profiles present runtime configuration in a cleaner, easier-to-scan Runtime tab.
Problem: Runtime metadata in the agent profile panel had drifted into a redundant, mixed-detail presentation that repeated model/instructions information and did not follow the panel’s existing information architecture. That made it harder to distinguish core runtime facts from configuration provenance.
Solution: Consolidate profile runtime details into the existing icon-row card pattern while preserving the pre-branch provenance copy (Set in Buzz, Inherited from persona, From config file, From ACP session, etc.). Sparse declared-owner cases stay honest instead of rendering empty placeholders.

File changes

desktop/src/features/agents/ui/AgentConfigPanel.tsx
Aligns the runtime config surface with the profile panel card pattern, including copy affordances and read-only lock treatment, while keeping the existing provenance wording.

desktop/src/features/profile/ui/UserProfilePanel.tsx
Updates the profile panel composition so agent-owned runtime details are exposed through the consolidated Runtime tab.

desktop/src/features/profile/ui/UserProfilePanelAgentDetails.tsx
Simplifies the agent-details presentation and removes redundant runtime/instructions dumping from the profile surface.

desktop/src/features/profile/ui/UserProfilePanelFields.tsx
Reuses the shared label/value row treatment for runtime fields and copyable profile metadata.

desktop/src/features/profile/ui/UserProfilePanelSections.tsx
Adjusts the section layout so runtime metadata fits the same visual rhythm as the rest of the profile panel.

desktop/src/features/profile/ui/UserProfilePanelTabs.tsx
Updates tab availability for managed and declared-owned agents so Runtime appears only where it has meaningful content.

desktop/src/testing/e2eBridge.ts
Extends profile/config test fixtures for the runtime metadata states covered by the profile panel.

desktop/tests/e2e/config-bridge-screenshots.spec.ts
Updates screenshot bridge coverage for the consolidated profile panel render path and restored provenance wording.

desktop/tests/e2e/profile.spec.ts
Adds regression coverage for declared-owner runtime visibility and sparse/no-relay-record behavior.

desktop/tests/helpers/bridge.ts
Adds helper support needed by the profile runtime test fixtures.

Reproduction Steps

  1. Open an agent profile for a managed agent and switch to the Runtime tab.
  2. Confirm runtime metadata uses the same icon-row card pattern as the rest of the profile panel.
  3. Confirm provenance text uses the pre-branch wording (Set in Buzz, Inherited from persona, From config file, From ACP session, From environment variable (...)).
  4. Open a declared-owner agent with relay runtime data and confirm the Runtime tab shows populated runtime/config rows.
  5. Open a declared-owner agent without a relay-agent record and confirm the Runtime tab shows only the verified declared-owner signal instead of empty placeholders.
  6. Confirm non-owner viewers do not see owner-only runtime controls or write affordances.

Screenshots/Demos

Runtime examples from the latest review pass after moving the read-only PenOff icon inline with provenance hints.

Provider / model / env-var / config mix Folded config with inline read-only hint Profile side panel — Configuration section
image image image

Final gate validation:

  • biome check . — clean
  • pnpm typecheck — clean
  • playwright config-bridge-screenshots --project=smoke — 6/6 passed

npub1223z34hd7vtwc6qj4s7flsxkj644nlre2nthu7lrrmkumhu3xddsrx9r6w and others added 4 commits July 1, 2026 21:57
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Revert the runtime provenance lower-line copy to the wording on main:
'Set in Buzz', 'Inherited from persona', 'From environment variable (...)',
'From config file (...)', and 'From ACP session' — and stop suppressing
the buzzExplicit provenance line. Restores the matching e2e assertions
and mock-fixture comment. IA consolidation, Runtime tab split, and copy
affordances are unchanged.

Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
@tellaho tellaho force-pushed the tho/profile-panel-ia branch from a36743e to 2f6d48f Compare July 2, 2026 05:14
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
@tellaho tellaho changed the title consolidate agent profile runtime details Consolidate agent profile runtime metadata Jul 2, 2026
@tellaho tellaho changed the title Consolidate agent profile runtime metadata fix(profile): consolidate agent profile runtime metadata Jul 2, 2026
Two specs were still asserting pre-consolidation fixtures:

- profile.spec expected the removed 'user-profile-model' testid; assert
  Model via the config panel's normalized row instead, since the branch
  deleted the duplicate Model row on purpose.
- channels.spec's view-activity test relied on nadia being a default
  relay-agent seed, which the branch removed to make room for the
  no-relay-record declared-owner fixture; seed her relay registry entry
  explicitly in the test.

Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
@tellaho tellaho marked this pull request as ready for review July 2, 2026 08:01
@tellaho tellaho requested a review from wpfleger96 July 2, 2026 08:01

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

Reviewed this with an eye to alignment with the config-bridge work we merged in #887. The provenance layer is untouched (provenanceSentence is byte-identical to main — Set in Buzz, Inherited from persona, From config file (…), From ACP session, From environment variable (…), Live override (this session only) all preserved), and the runtime-override display rule (secondary value struck through unless origin === "runtimeOverride") survived the refactor, so I think this lines up well with the merged work. The declared-owner paths also look right — read visibility only, with the new tests explicitly asserting no Start/Stop/Deploy affordances.

One heads-up: #1448 also touches AgentConfigPanel.tsx (adds a globalDefault origin plus a new provenanceSentence case). The merge is clean in either order since this PR leaves provenanceSentence alone, but whichever lands second will need a mechanical rebase.

Inline comments below — one cleanup request plus a few nits.

Comment thread desktop/src/features/profile/ui/UserProfilePanelFields.tsx
Comment thread desktop/src/features/agents/ui/AgentConfigPanel.tsx Outdated
Comment thread desktop/src/features/agents/ui/AgentConfigPanel.tsx Outdated
Comment thread desktop/src/features/agents/ui/AgentConfigPanel.tsx Outdated
Comment thread desktop/tests/e2e/profile.spec.ts Outdated
npub1223z34hd7vtwc6qj4s7flsxkj644nlre2nthu7lrrmkumhu3xddsrx9r6w and others added 5 commits July 2, 2026 09:48
buildOwnerFields still pushed a Model field (user-profile-model testid)
that bucketProfileFields silently dropped — 'Model' is not in any bucket
set, so those lines could never render. Model now comes exclusively from
the consolidated config panel with real provenance.

Addresses Will's review on #1451.

Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
copyToClipboard was duplicated across AgentConfigPanel,
UserProfilePanelFields, CopyButton, MessageActionBar, and
CustomChannelSection — some copies let writeText rejections escape as
unhandled promise rejections with no user feedback. Replace all five
with shared/lib/clipboard's copyTextToClipboard, which surfaces
failures as an error toast.

Addresses Will's review on #1451.

Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Explain what shouldOfferCopy's fallback is matching (paths and
URI-ish strings) and require colon-containing values to be space-free,
so prose like 'Extension: developer' no longer grows a surprising copy
affordance.

Addresses Will's review on #1451.

Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
The reader only emitted systemPrompt when the record/env carried one,
so a config-file-only prompt showed nowhere — the profile Instructions
block keys off record/persona prompts and flat mode filtered
systemPrompt entirely. Fall back to the config-file prompt (ConfigFile
origin, read-only) when no record/env prompt shadows it, and keep
configFile-origin systemPrompt visible in the profile's flat config
panel; record/persona prompts still dedupe against Instructions.

Also splits reader.rs unit tests into a #[path]-included sibling file
(established repo pattern) to stay under the 1000-line budget.

Addresses Will's review on #1451.

Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
panel.getByText('Model') with toHaveCount(0) asserts the same thing
without the odd .first() indirection.

Addresses Will's review on #1451.

Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
@tellaho tellaho merged commit c48006f into main Jul 2, 2026
25 checks passed
@tellaho tellaho deleted the tho/profile-panel-ia branch July 2, 2026 17:13
wpfleger96 added a commit that referenced this pull request Jul 2, 2026
…into HEAD

* origin/paul/nip-am-agent-turn-metrics:
  fix(profile): consolidate agent profile runtime metadata (#1451)
  fix(desktop): simplify workspace rail badges (#1462)
  perf(desktop): instant channel switching — non-blocking first paint, persisted snapshots (#1452)
  perf(relay): bounded-concurrency multi-filter query execution (S2) (#1457)
  fix(desktop): classify timeline prepends so history loads don't bump unread (#1416)
  fix(desktop): quiet gate for workspace switches instead of boot splash (#1449)
  fix(read-path): reach complete threads, dense-second timelines, and all people in the GUI (#1418)
  E1+E3: reduce relay ingest/fan-out DB round trips; ack p99 −7–16%, fd p99 −6–28%, p999 tails −29–53% vs PR #1453 tip (#1454)
  perf(relay): defer post-commit dispatch and avoid verify clone (#1453)
  fix(relay): include git hook tools in runtime image (#1326)
  feat(chart): per-pod emptyDir git scratch when persistence disabled (multi-replica HA) (#1450)
  fix(relay): remove media bearer-token auth (#1444)
  fix(desktop): stop search shortcut from hijacking the sidebar (#1447)

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
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