fix: equipment name refresh, hostname sync from agent hello
- WorkstationCard: useEffect to sync name state when ws.name prop changes - agent-ws: update hostname column on hello message Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -562,6 +562,11 @@ function WorkstationCard({
|
||||
const [editing, setEditing] = useState(false)
|
||||
const [name, setName] = useState(ws.name)
|
||||
const [showPairModal, setShowPairModal] = useState(false)
|
||||
|
||||
// Sync local name state when ws.name prop changes (after onRefresh)
|
||||
useEffect(() => {
|
||||
if (!editing) setName(ws.name)
|
||||
}, [ws.name, editing])
|
||||
const [showAddDevice, setShowAddDevice] = useState(false)
|
||||
const [editDeviceId, setEditDeviceId] = useState<string | null>(null)
|
||||
const [updating, setUpdating] = useState(false)
|
||||
|
||||
Reference in New Issue
Block a user