YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
fix(settings): admin team API token field was read-only for first-time users
Louis Beaumont20b96bb22f4e
diff --git a/apps/screenpipe-app-tauri/components/settings/privacy-section.tsx b/apps/screenpipe-app-tauri/components/settings/privacy-section.tsxindex 436aefac1..5d24b6451 100644--- a/apps/screenpipe-app-tauri/components/settings/privacy-section.tsx+++ b/apps/screenpipe-app-tauri/components/settings/privacy-section.tsx@@ -1759,12 +1759,14 @@ function AdminTeamTokenCard() {<div className="mt-2.5 flex items-center space-x-2.5 pl-6.5"><Inputtype="text"- readOnly={!revealToken && pendingToken === null}+ // First-time users have no `liveToken` yet — they must always be able+ // to type a fresh token in. Only lock the input when we're displaying+ // an EXISTING token in masked form; clicking the eye unlocks edit mode.+ readOnly={Boolean(liveToken) && !revealToken && pendingToken === null}placeholder="sk_ent_…"data-testid="privacy-admin-token-input"value={displayValue}onChange={(e) => {- if (!revealToken && pendingToken === null) return;setPendingToken(e.target.value);}}onKeyDown={(e) => {@@ -1784,7 +1786,9 @@ function AdminTeamTokenCard() {setRevealToken((v) => !v);if (pendingToken === null && liveToken) setPendingToken(liveToken);}}- disabled={!liveToken && pendingToken === null}+ // Eye only makes sense when there's a saved token to unmask. Fresh+ // users typing a new token don't need it.+ disabled={!liveToken}data-testid="privacy-admin-token-reveal">{revealToken ? <EyeOff className="h-3.5 w-3.5" /> : <Eye className="h-3.5 w-3.5" />}