handoff fixes

This commit is contained in:
debu-2 2026-10-06 03:24:57 +05:30
parent 83f0eba64d
commit 8653f319f7
9 changed files with 30 additions and 1309 deletions

View file

@ -130,23 +130,12 @@ export default function HandoffSettings() {
<div className="handoff-settings">
<div className="handoff-settings-intro">
<p>
<strong>Your Agent handles email. You step in when needed.</strong>
<strong>Configure Human Handoff rules for your Agent.</strong>
</p>
<p>
Human Handoff sends selected conversations to the Agent&apos;s Human Owner. The owner can
reply from their normal inbox, and Gentic carries that response back to the original sender
without exposing or mixing the private Agent ↔ Human conversation.
Saved settings are stored for future use. They do not send, forward, mirror, or relay
email today — all mail continues through the normal Gentic inbox and outbox.
</p>
<div className="handoff-flow-diagram" aria-hidden="true">
<span>External Sender</span>
<span className="handoff-flow-arrow">↕</span>
<span>Gentic Agent</span>
<span className="handoff-flow-arrow">↕</span>
<span>Human Owner</span>
</div>
<small>
The external conversation and Human Handoff remain separate and independently threaded.
</small>
</div>
<div className="handoff-settings-toolbar">
@ -167,8 +156,8 @@ export default function HandoffSettings() {
</div>
<h2>No handoff rules yet</h2>
<p>
Configure when your Agent should hand conversations to the Human Owner.
Handoff transport messages stay out of your normal Inbox and Sent folders.
Configure when your Agent should involve a Human Owner. Settings are saved only;
no emails are sent automatically.
</p>
<button type="button" className="handoff-btn primary" onClick={openCreate}>
<Plus size={16} strokeWidth={1.75} /> Add handoff rule

View file

@ -1,58 +1,18 @@
import { useState } from "react";
import HandoffConversation from "./HandoffConversation";
import HandoffInbox from "./HandoffInbox";
import HandoffSettings from "./HandoffSettings";
export default function HumanHandoff() {
const [tab, setTab] = useState("handoffs");
const [selectedHandoffId, setSelectedHandoffId] = useState(null);
function switchTab(nextTab) {
setTab(nextTab);
if (nextTab !== "handoffs") {
setSelectedHandoffId(null);
}
}
return (
<section className="human-handoff-page">
<header className="human-handoff-head">
<div>
<h1>Human Handoff</h1>
<p>
Private Agent ↔ Human Owner conversations, linked to external customer threads
but kept on separate RFC threading planes.
Configure when your Agent should involve a Human Owner. Settings are saved here;
email routing is not affected until handoff is enabled in a future release.
</p>
<nav className="human-handoff-tabs" aria-label="Human Handoff sections">
<button
type="button"
className={tab === "handoffs" ? "active" : ""}
onClick={() => switchTab("handoffs")}
>
Handoffs
</button>
<button
type="button"
className={tab === "settings" ? "active" : ""}
onClick={() => switchTab("settings")}
>
Settings
</button>
</nav>
</div>
</header>
{tab === "handoffs" && (
selectedHandoffId ? (
<HandoffConversation
handoffId={selectedHandoffId}
onBack={() => setSelectedHandoffId(null)}
/>
) : (
<HandoffInbox onSelect={setSelectedHandoffId} />
)
)}
{tab === "settings" && <HandoffSettings />}
<HandoffSettings />
</section>
);
}

View file

@ -244,14 +244,8 @@ export default function HumanHandoffDrawer({
onChange={setAllowReplies}
/>
<p className="handoff-helper">
When you reply to a handed-off email from your regular inbox, AGMail will recognize your response and continue the original conversation through the agent&apos;s email address.
Saved for future use. Human reply handling is not active yet — all email uses the normal Gentic inbox and outbox.
</p>
{allowReplies && (
<div className="handoff-reply-info">
<strong>How it works</strong>
<p>Email arrives → Agent handles it. If human attention is required → Human Handoff → Your inbox. You reply normally → AGMail → Original conversation.</p>
</div>
)}
{allowReplies && (
<div className="handoff-reply-as">
<strong>Replies will be sent as</strong>