Store the person uuid the master issues, so renames keep our identity
The welcome now carries a personId; it lands in the instance_id setting and rides on every hello and HTTP report from then on. The master keys the person by that uuid, so changing instance_name moves our history to the new name instead of starting a stranger. Read-only in Settings on purpose — editing it by hand would detach this machine from its person. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
de9cbffd83
commit
a088381749
+10
-1
@@ -17,6 +17,7 @@ interface AppSettings {
|
||||
max_concurrent_accounts: string | null;
|
||||
master_dashboard_url: string | null;
|
||||
instance_name: string | null;
|
||||
instance_id: string | null;
|
||||
trading_hours: string | null;
|
||||
}
|
||||
|
||||
@@ -34,6 +35,7 @@ export default function SettingsPage() {
|
||||
} | null>(null);
|
||||
const [syncing, setSyncing] = useState(false);
|
||||
const [instanceName, setInstanceName] = useState<string>('');
|
||||
const [instanceId, setInstanceId] = useState<string>('');
|
||||
const [saving, setSaving] = useState(false);
|
||||
const [saved, setSaved] = useState(false);
|
||||
|
||||
@@ -75,6 +77,9 @@ export default function SettingsPage() {
|
||||
if (s.instance_name != null) {
|
||||
setInstanceName(s.instance_name);
|
||||
}
|
||||
if (s.instance_id != null) {
|
||||
setInstanceId(s.instance_id);
|
||||
}
|
||||
});
|
||||
|
||||
// Load cached contracts; if cache is empty, auto-resolve
|
||||
@@ -211,7 +216,11 @@ export default function SettingsPage() {
|
||||
<div>
|
||||
<p className="text-sm font-medium text-slate-800">Instance Name</p>
|
||||
<p className="text-xs text-slate-400 mt-0.5">
|
||||
Identifier for this autotrader on the master dashboard
|
||||
Identifier for this autotrader on the master dashboard.
|
||||
Renaming is safe — the master tracks this machine by its
|
||||
person ID{instanceId ? (
|
||||
<> (<span className="font-mono">{instanceId.slice(0, 8)}</span>)</>
|
||||
) : ' once it has connected'}, so history follows the new name.
|
||||
</p>
|
||||
</div>
|
||||
<input
|
||||
|
||||
Reference in New Issue
Block a user