fix(client): drop the occupancy figure from the member cards' activity line
This commit is contained in:
1 parent
13783634d5
commit
84d55fe15b
3 files changed
+8
-10
No files matched your search
@@ -11,7 +11,7 @@
|
||||
import { useMemo, useState, type CSSProperties, type ReactElement } from 'react'
|
||||
import { IconUserOutlineRegular, IconUsersOutlineRegular, StateDot } from '@deepseek-ai/dsh-client-ui-primitives'
|
||||
import type { AgentForest, AgentNode } from '../agentTree'
|
||||
import { familyHue, fmtDurationCompact, pressureColorOf } from '../agentTree'
|
||||
import { familyHue, fmtDurationCompact } from '../agentTree'
|
||||
import { familyOthersOf, tasksOfOwner, type FleetTeam } from '../fleetTeam'
|
||||
import type { FleetDetail, FleetMemberInfo } from '../../shared/types'
|
||||
import type { ViewKit } from '../viewkit'
|
||||
@@ -46,7 +46,7 @@ export function memberStyle(hue: string): CSSProperties {
|
||||
}
|
||||
|
||||
/** The run's activity figures a surface carries: consumption, duration, then steps — with the
|
||||
* occupancy figure beside them. */
|
||||
* occupancy figure beside them for the task rows that show it. */
|
||||
export function runMetaOf(node: AgentNode, t: ViewKit['t'], fmt: ViewKit['fmt']): { bits: string[]; pct: number | null } {
|
||||
const bits: string[] = []
|
||||
if (node.head !== null && node.head.tokens > 0) bits.push(fmt(node.head.tokens))
|
||||
@@ -57,12 +57,11 @@ export function runMetaOf(node: AgentNode, t: ViewKit['t'], fmt: ViewKit['fmt'])
|
||||
|
||||
/** The run's activity line above a card's foot — the graph cards' own meta readout. */
|
||||
function memberMeta(node: AgentNode, t: ViewKit['t'], fmt: ViewKit['fmt']): ReactElement | null {
|
||||
const { bits, pct } = runMetaOf(node, t, fmt)
|
||||
if (bits.length === 0 && pct === null) return null
|
||||
const { bits } = runMetaOf(node, t, fmt)
|
||||
if (bits.length === 0) return null
|
||||
return (
|
||||
<div className="lc-member-meta">
|
||||
<span className="lc-member-meta-text">{bits.join(' · ')}</span>
|
||||
{pct !== null ? <span className="lc-member-meta-pct" style={{ color: pressureColorOf(pct) }}>{pct}%</span> : null}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -63,10 +63,9 @@
|
||||
.lc-member-desc { font-size: 11.5px; line-height: 1.4; color: var(--dsw-alias-label-secondary); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
|
||||
.lc-member-reply { font-size: 11px; line-height: 1.4; color: var(--dsw-alias-label-tertiary, var(--dsw-alias-label-secondary)); font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.lc-member-reply::before { content: none; }
|
||||
/* The run's activity line (the graph cards' meta readout): figures left, occupancy right. */
|
||||
.lc-member-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; font-size: 10.5px; line-height: 1.3; color: var(--dsw-alias-label-secondary); font-variant-numeric: tabular-nums; }
|
||||
/* The run's activity line (the graph cards' meta readout). */
|
||||
.lc-member-meta { display: flex; align-items: baseline; gap: 6px; font-size: 10.5px; line-height: 1.3; color: var(--dsw-alias-label-secondary); font-variant-numeric: tabular-nums; }
|
||||
.lc-member-meta-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.lc-member-meta-pct { flex: none; font-weight: 600; }
|
||||
.lc-member-foot { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 2px; }
|
||||
.lc-member-tasks { border: 1px solid var(--dsw-alias-border-l1); background: var(--dsw-alias-bg-layer-1); color: var(--dsw-alias-brand-primary, var(--color-blue-500)); font: inherit; font-size: 10.5px; padding: 1px 8px; border-radius: 999px; cursor: pointer; }
|
||||
.lc-member-tasks:hover { border-color: var(--dsw-alias-brand-primary, var(--color-blue-500)); }
|
||||
|
||||
@@ -275,9 +275,9 @@ describe('MemberBoard — the other-agents cards', () => {
|
||||
assert.ok(text(m.container).includes(DICT_EN['fleet.board.others']))
|
||||
assert.deepEqual(otherNames(m.container), ['scout', 'archivist', 'lounger'])
|
||||
const cards = otherCards(m.container)
|
||||
// The run meta rides the card: consumption, duration, steps — and the occupancy figure.
|
||||
// The run meta rides the card: consumption, duration, steps — no occupancy figure.
|
||||
assert.ok(text(cards[0]).includes('800 · 42s · 5 steps'))
|
||||
assert.ok(text(cards[0]).includes('80%'))
|
||||
assert.ok(!text(cards[0]).includes('%'))
|
||||
assert.ok(text(cards[0]).includes('deepseek-flash'))
|
||||
assert.ok(text(cards[0]).includes('running'))
|
||||
assert.ok(text(cards[1]).includes('archive sealed'), 'the landed latest reply fills the card')
|
||||
|
||||
Reference in new issue
Block a user