feat(orchestrator-ui): mark file-edit events with an EDIT badge
FileAction and EditAction both write kind="file" — the discriminator is action="file:create" vs "file:edit". The dashboard timeline used to render both identically; now an EDIT sub-chip surfaces edits without widening the kind enum (which doubles as the bus topic family). No schema or API change. Polish only.
This commit is contained in:
@@ -259,6 +259,12 @@ const Orchestrator: React.FC = () => {
|
|||||||
r.kind === 'traffic' || r.kind === 'file' || r.kind === 'email'
|
r.kind === 'traffic' || r.kind === 'file' || r.kind === 'email'
|
||||||
? r.kind : '';
|
? r.kind : '';
|
||||||
const isEmail = r.kind === 'email';
|
const isEmail = r.kind === 'email';
|
||||||
|
// FileAction and EditAction both write kind="file"; the
|
||||||
|
// discriminator lives in `action` ("file:create" vs
|
||||||
|
// "file:edit"). Surface the difference visually without
|
||||||
|
// widening the kind enum (which doubles as the bus
|
||||||
|
// topic family).
|
||||||
|
const isEdit = r.kind === 'file' && r.action?.startsWith('file:edit');
|
||||||
return (
|
return (
|
||||||
<tr
|
<tr
|
||||||
key={r.uuid}
|
key={r.uuid}
|
||||||
@@ -268,6 +274,15 @@ const Orchestrator: React.FC = () => {
|
|||||||
<td className="dim">{timeAgo(r.ts)}</td>
|
<td className="dim">{timeAgo(r.ts)}</td>
|
||||||
<td>
|
<td>
|
||||||
<span className={`kind-chip ${kindCls}`}>{r.kind}</span>
|
<span className={`kind-chip ${kindCls}`}>{r.kind}</span>
|
||||||
|
{isEdit && (
|
||||||
|
<span
|
||||||
|
className="chip dim-chip"
|
||||||
|
style={{ marginLeft: 4 }}
|
||||||
|
title="In-place edit of a previously planted file"
|
||||||
|
>
|
||||||
|
EDIT
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
</td>
|
</td>
|
||||||
<td className="mono matrix-text">
|
<td className="mono matrix-text">
|
||||||
{isEmail && r.language && (
|
{isEmail && r.language && (
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ const OrchestratorInspector: React.FC<Props> = ({ event, onClose }) => {
|
|||||||
event.kind === 'traffic' || event.kind === 'file' || event.kind === 'email'
|
event.kind === 'traffic' || event.kind === 'file' || event.kind === 'email'
|
||||||
? event.kind : '';
|
? event.kind : '';
|
||||||
const isEmail = event.kind === 'email';
|
const isEmail = event.kind === 'email';
|
||||||
|
const isEdit = event.kind === 'file' && event.action?.startsWith('file:edit');
|
||||||
const srcSrc = sourceTag(event.src_decky_uuid);
|
const srcSrc = sourceTag(event.src_decky_uuid);
|
||||||
const dstSrc = sourceTag(event.dst_decky_uuid);
|
const dstSrc = sourceTag(event.dst_decky_uuid);
|
||||||
const isLive = event.uuid.startsWith('live-');
|
const isLive = event.uuid.startsWith('live-');
|
||||||
@@ -84,6 +85,15 @@ const OrchestratorInspector: React.FC<Props> = ({ event, onClose }) => {
|
|||||||
<span className={`kind-chip ${kindCls}`} style={{ marginLeft: 8 }}>
|
<span className={`kind-chip ${kindCls}`} style={{ marginLeft: 8 }}>
|
||||||
{event.kind.toUpperCase()}
|
{event.kind.toUpperCase()}
|
||||||
</span>
|
</span>
|
||||||
|
{isEdit && (
|
||||||
|
<span
|
||||||
|
className="chip dim-chip"
|
||||||
|
style={{ marginLeft: 4 }}
|
||||||
|
title="In-place edit of a previously planted file"
|
||||||
|
>
|
||||||
|
EDIT
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
</h3>
|
</h3>
|
||||||
<button className="close-btn" onClick={onClose} aria-label="Close">
|
<button className="close-btn" onClick={onClose} aria-label="Close">
|
||||||
<X size={16} />
|
<X size={16} />
|
||||||
|
|||||||
Reference in New Issue
Block a user