Skip to content

Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.

feat(presence): edit your collaboration name/color from Settings

enes5fc4722df7cf
diff --git a/src/renderer/components/settings/SettingsIcons.tsx b/src/renderer/components/settings/SettingsIcons.tsx
index cccddf662..cf7b21448 100644
--- a/src/renderer/components/settings/SettingsIcons.tsx
+++ b/src/renderer/components/settings/SettingsIcons.tsx
@@ -80,6 +80,13 @@ const PATHS: Record<SettingsSectionId, React.JSX.Element> = {
<path d="M7.4 7.4 13 13M10.8 10.8l1.4-1.4M9.4 9.4l1.2-1.2" />
</>
),
+ presence: (
+ <>
+ <rect x="2.5" y="3" width="11" height="10" rx="2" />
+ <circle cx="6" cy="6.6" r="1.5" />
+ <path d="M3.8 11c.2-1.3 1.2-2 2.2-2s2 .7 2.2 2M9.6 6.5h2.4M9.6 9h2" />
+ </>
+ ),
remote: (
<>
<circle cx="8" cy="8" r="5.5" />
diff --git a/src/renderer/components/settings/SettingsPage.tsx b/src/renderer/components/settings/SettingsPage.tsx
index 85c10b538..e99fdca20 100644
--- a/src/renderer/components/settings/SettingsPage.tsx
+++ b/src/renderer/components/settings/SettingsPage.tsx
@@ -18,6 +18,7 @@ import { NotificationsSection } from './sections/NotificationsSection'
import { CommitSection } from './sections/CommitSection'
import { TmuxSection } from './sections/TmuxSection'
import { LicenseSection } from './sections/LicenseSection'
+import { PresenceIdentitySection } from './sections/PresenceIdentitySection'
import { RemoteSection } from './sections/RemoteSection'
import { TeamAccessSection } from './sections/TeamAccessSection'
import { SshSection } from './sections/SshSection'
@@ -79,6 +80,7 @@ export function SettingsPage({
<CommitSection isActive={active === 'commit'} />
<TmuxSection isActive={active === 'tmux'} />
<LicenseSection isActive={active === 'license'} />
+ <PresenceIdentitySection isActive={active === 'presence'} />
<RemoteSection isActive={active === 'remote'} onClose={onClose} />
<TeamAccessSection isActive={active === 'team-access'} onClose={onClose} />
<SshSection isActive={active === 'ssh'} />
diff --git a/src/renderer/components/settings/nav.test.ts b/src/renderer/components/settings/nav.test.ts
index 6847344f8..0cc493f8a 100644
--- a/src/renderer/components/settings/nav.test.ts
+++ b/src/renderer/components/settings/nav.test.ts
@@ -2,10 +2,10 @@ import { describe, it, expect } from 'vitest'
import { SETTINGS_GROUPS, allSectionIds, FIRST_SECTION_ID } from './nav'
describe('SETTINGS_GROUPS', () => {
- it('lists exactly 19 sections with no duplicates', () => {
+ it('lists exactly 20 sections with no duplicates', () => {
const ids = allSectionIds()
- expect(ids).toHaveLength(19)
- expect(new Set(ids).size).toBe(19)
+ expect(ids).toHaveLength(20)
+ expect(new Set(ids).size).toBe(20)
})
it('starts at a section that exists in the groups', () => {
expect(allSectionIds()).toContain(FIRST_SECTION_ID)
diff --git a/src/renderer/components/settings/nav.ts b/src/renderer/components/settings/nav.ts
index 1460609b6..f4bab1fcb 100644
--- a/src/renderer/components/settings/nav.ts
+++ b/src/renderer/components/settings/nav.ts
@@ -13,6 +13,7 @@ export type SettingsSectionId =
| 'commit'
| 'tmux'
| 'license'
+ | 'presence'
| 'remote'
| 'team-access'
| 'ssh'
@@ -62,6 +63,7 @@ export const SETTINGS_GROUPS: SettingsGroup[] = [
id: 'connectivity',
title: 'Remote & team',
sections: [
+ { id: 'presence', title: 'Your name' },
{ id: 'phone', title: 'Phone' },
{ id: 'remote', title: 'Remote access' },
{ id: 'team-access', title: 'Team seats' },
diff --git a/src/renderer/components/settings/sections/PresenceIdentitySection.tsx b/src/renderer/components/settings/sections/PresenceIdentitySection.tsx
new file mode 100644
index 000000000..edde4ad1a
--- /dev/null
+++ b/src/renderer/components/settings/sections/PresenceIdentitySection.tsx
@@ -0,0 +1,114 @@
+import { useState } from 'react'
+import { NAME_MAX_LEN, PRESENCE_COLORS } from '@shared/presence'
+import { loadIdentity } from '../../../state/presence'
+import { setMeAll } from '../../../session/session'
+import { SettingsSection } from '../SettingsSection'
+import { SearchableRow } from '../SearchableRow'
+import { FieldRow } from '../FieldRow'
+import { Button } from '@renderer/ui/Button'
+import { Input } from '@renderer/ui/Input'
+
+const ROWS = {
+ identity: {
+ title: 'Your name',
+ keywords: ['name', 'presence', 'identity', 'display', 'collaborate', 'color', 'facepile', 'nickname']
+ }
+}
+const ENTRIES = Object.values(ROWS)
+
+/**
+ * Edit the live-collaboration identity ({name, color}) others see in the facepile / cursor labels /
+ * board-log — the same value the first-connect PresenceNamePrompt sets. Seeds from the saved
+ * identity (`loadIdentity`) and writes through `setMeAll`, which re-helloes EVERY live session, so a
+ * rename reaches connected peers immediately (no reload). Renderer-only: the identity lives in
+ * localStorage (`nodeterm.presence.me`), never in settings.json, and is shared across sessions.
+ */
+export function PresenceIdentitySection({ isActive }: { isActive: boolean }): React.JSX.Element {
+ const saved = loadIdentity()
+ const [name, setName] = useState(saved?.name ?? '')
+ const [color, setColor] = useState(saved?.color ?? PRESENCE_COLORS[0])
+ const [justSaved, setJustSaved] = useState(false)
+
+ const trimmed = name.trim()
+ const dirty = trimmed !== (saved?.name ?? '') || color !== (saved?.color ?? PRESENCE_COLORS[0])
+
+ const save = (): void => {
+ if (!trimmed) return
+ // Re-hello every live session (obligation 2): renaming must update every connected core, or a
+ // remote peer keeps drawing the old name until reload.
+ setMeAll({ name: trimmed, color })
+ setJustSaved(true)
+ }
+
+ return (
+ <SettingsSection
+ id="presence"
+ title="Your name"
+ description="The name and color other people see when they connect to this Mac — in the facepile, cursor labels, and board comments."
+ isActive={isActive}
+ searchEntries={ENTRIES}
+ >
+ <SearchableRow {...ROWS.identity}>
+ <div className="space-y-4">
+ <FieldRow
+ label="Display name"
+ control={
+ <Input
+ className="w-72"
+ value={name}
+ maxLength={NAME_MAX_LEN}
+ placeholder="Your name"
+ onChange={(e) => {
+ setName(e.target.value)
+ setJustSaved(false)
+ }}
+ onKeyDown={(e) => {
+ if (e.key === 'Enter') save()
+ }}
+ />
+ }
+ />
+ <FieldRow
+ label="Color"
+ control={
+ <div className="flex flex-wrap gap-2">
+ {PRESENCE_COLORS.map((c) => (
+ <button
+ key={c}
+ type="button"
+ title={c}
+ aria-label={`Color ${c}`}
+ onClick={() => {
+ setColor(c)
+ setJustSaved(false)
+ }}
+ style={{
+ width: 22,
+ height: 22,
+ borderRadius: '50%',
+ background: c,
+ cursor: 'pointer',
+ border: '2px solid transparent',
+ outline: c === color ? '2px solid var(--text)' : 'none',
+ outlineOffset: 2
+ }}
+ />
+ ))}
+ </div>
+ }
+ />
+ <div className="flex items-center gap-3">
+ <Button variant="primary" disabled={!trimmed || !dirty} onClick={save}>
+ Save
+ </Button>
+ {justSaved && !dirty ? <span className="text-sm text-muted">Saved</span> : null}
+ </div>
+ <p className="text-sm text-muted">
+ If you never pick a name you appear to others as “Someone”. This is separate from your
+ login or license — it only labels you during live collaboration.
+ </p>
+ </div>
+ </SearchableRow>
+ </SettingsSection>
+ )
+}