fix(oracle-l8): close 3 polish caveats (dispatch labels / chat unread / leftrail leak)
Oracle PASS-with-caveats; closing all 3:
1. Wizard dispatch labels were 'human'/'agent'/'system' (impl-ish).
Now 'Person'/'Assistant'/'System' in both the dropdown and the
preview-pane badge.
2. Chat badge was thread COUNT (a buyer with 5 chats sees '5' forever).
Now real unread count, computed locally from localStorage heads +
read maps that the Chat scene already persists. App.tsx topbar
poll still only fires 2 network calls (listThreads + workItems);
per-thread unread math is zero-network.
3. LeftRail toast leaked 'POST /api/runtime/transactions/{id}/actions/
submit' / save_draft. Rewritten as 'Switch to live mode and sign
in to submit this action against EA2.'
Plus engineering-string sweep elsewhere: 'demo.flow-master.ai' /
'bundled JSON' / 'in-browser fetch' references removed from:
- App.tsx mode toggle title
- MissionControl loading spinner
- Landing mode-button title
- state/store snapshot toast
- data/live.ts + data/synthetic.ts tour-step bodies
- buildScenarios.ts tagline
Source-grep confirms no remaining user-visible engineering jargon
referencing the backend hostname or raw endpoints.
This commit is contained in:
+7
-2
@@ -110,11 +110,16 @@ export default function Chat() {
|
||||
).then((pairs) => {
|
||||
if (cancelled) return;
|
||||
const map: Record<string, ChatMessage | null> = {};
|
||||
for (const [k, v] of pairs) map[k] = v;
|
||||
const heads: Record<string, { at: string; by: string }> = {};
|
||||
for (const [k, v] of pairs) {
|
||||
map[k] = v;
|
||||
if (v) heads[k] = { at: v.created_at, by: v.author_email };
|
||||
}
|
||||
setPreviews(map);
|
||||
try { localStorage.setItem(`fm.canvas.chat.heads.${me}`, JSON.stringify(heads)); } catch { /* ignore */ }
|
||||
});
|
||||
return () => { cancelled = true; };
|
||||
}, [threads]);
|
||||
}, [threads, me]);
|
||||
|
||||
const unreadCount = useMemo(() => {
|
||||
let n = 0;
|
||||
|
||||
@@ -62,7 +62,7 @@ export default function Landing() {
|
||||
className={`btn btn-ghost btn-lg${mode === "live" ? " is-on" : ""}`}
|
||||
onClick={() => mode === "live" ? refreshLive() : setMode("live")}
|
||||
disabled={liveLoading}
|
||||
title={mode === "live" ? "Re-fetch live scenarios from demo.flow-master.ai" : "Toggle between bundled snapshot and a live in-browser fetch"}
|
||||
title={mode === "live" ? "Re-fetch live data from EA2" : "Switch to live mode"}
|
||||
>
|
||||
{liveLoading ? <span className="spin" /> : <Pulse size={13} />}
|
||||
{mode === "live" ? "Live · refresh" : "Go live"}
|
||||
|
||||
@@ -17,7 +17,7 @@ export default function MissionControl() {
|
||||
<div className="mc">
|
||||
{liveLoading && (
|
||||
<div className="mc-banner mc-banner-info">
|
||||
<span className="spin" /> Fetching live scenarios from demo.flow-master.ai…
|
||||
<span className="spin" /> Fetching live data from EA2…
|
||||
</div>
|
||||
)}
|
||||
{liveError && (
|
||||
|
||||
@@ -281,7 +281,7 @@ export default function Wizard() {
|
||||
<li key={n._key || i} className="wizard-preview-chain-item">
|
||||
<span className="wizard-preview-chain-idx">{i + 1}</span>
|
||||
<span className="wizard-preview-chain-name">{n.display_name || "Untitled step"}</span>
|
||||
<span className={`wizard-preview-chain-kind kind-${n.dispatch_kind || "human"}`}>{n.dispatch_kind || "human"}</span>
|
||||
<span className={`wizard-preview-chain-kind kind-${n.dispatch_kind || "human"}`}>{({ human: "Person", agent: "Assistant", system: "System" } as Record<string, string>)[n.dispatch_kind || "human"] || "Person"}</span>
|
||||
</li>
|
||||
))}
|
||||
</ol>
|
||||
@@ -412,8 +412,8 @@ export default function Wizard() {
|
||||
updateDraft({ nodes: newNodes });
|
||||
}}
|
||||
>
|
||||
<option value="human">Human</option>
|
||||
<option value="agent">Agent</option>
|
||||
<option value="human">Person</option>
|
||||
<option value="agent">Assistant</option>
|
||||
<option value="system">System</option>
|
||||
</select>
|
||||
<div className="node-controls">
|
||||
|
||||
Reference in New Issue
Block a user