fix(web/claw): trim the identity editor and show the logo on About
android / debug (push) Successful in 2m22s
android / release (push) Successful in 2m7s
ci / checks (push) Successful in 3m48s
ci / test (push) Successful in 2m9s
ci / chart (push) Successful in 7s
ci / docker (push) Successful in 1m51s
ci / web (push) Successful in 18s
ci / publish-edge-images (deploy/docker/claw.Dockerfile, rhema-claw) (push) Successful in 2m5s
ci / publish-edge-images (deploy/docker/ui.Dockerfile, rhema-claw-ui) (push) Successful in 15s
ci / publish-edge-chart (push) Successful in 5s

The General page exposed Mark, Initials, and Tagline even though the
new shell renders none of them, and a callout explained an identity
split that no longer needed saying. The About identity block still
drew a green tile with an R.

General now edits name, email, and sign-off only. Its save payload
omits the retired fields, so values already stored stay untouched.
AgentAvatar keeps just the avatar image and the name's initial; the
sidebar tooltip now carries the display name. About renders the
uploaded logo, or the Rhema mark when none is set.

README follows. nuxt typecheck and build pass; General and About
checked in light and dark.
This commit is contained in:
vhaudiquet committed 2026-11-30 19:18:25 +01:00
1 parent d17d8e2973
commit debc21a89f
7 files changed
+47 -108

No files matched your search

+6 -2
View File
@@ -218,7 +218,7 @@ async function refreshIdentity(): Promise<void> {
}
}
async function saveIdentity(texts: IdentityTexts): Promise<void> {
async function saveIdentity(texts: Partial<IdentityTexts>): Promise<void> {
savingIdentity.value = true
try {
identity.value = await claw.setAgent(texts)
@@ -1065,7 +1065,11 @@ onUnmounted(() => {
:saving="savingSandbox"
@save="saveSandbox"
/>
<SettingsAboutPage v-show="route.section === 'about'" :claw-up="clawUp" />
<SettingsAboutPage
v-show="route.section === 'about'"
:claw-up="clawUp"
:logo-url="identityLogoUrl"
/>
</template>
</main>
</div>
+5 -16
View File
@@ -1,34 +1,23 @@
<script setup lang="ts">
// The agent's face at one size. Two voices: `initials` (the chat rows
// and the sidebar's account row: the avatar image when there is one,
// the initials when not) and `mark` (the logo slot: the avatar image
// when there is one, the mark or emoji, ῥ by default). The precedence
// lives here and nowhere else.
// The agent's face at one size: the uploaded avatar when there is one,
// the name's initial when not. The precedence lives here and nowhere
// else.
const props = withDefaults(
defineProps<{
variant?: 'initials' | 'mark'
/** The uploaded avatar's object URL, when the claw has one. */
avatarUrl?: string | null
/** The glyph or emoji; the mark voice defaults to ῥ. */
mark?: string | null
/** The initials voice's fallback, first letter of the name or R. */
/** The fallback, first letter of the name or R. */
initials?: string | null
size?: number
}>(),
{
variant: 'initials',
avatarUrl: null,
mark: null,
initials: null,
size: 32,
},
)
const glyph = computed(() =>
props.variant === 'mark'
? props.mark?.trim() || 'ῥ'
: props.initials?.trim() || 'R',
)
const glyph = computed(() => props.initials?.trim() || 'R')
</script>
<template>
+1 -1
View File
@@ -40,7 +40,7 @@ const props = defineProps<{
olderAvailable?: boolean
/** Bumped whenever a page was folded in above the mirror. */
prependCount?: number
identity?: { name: string | null; mark: string | null; initials: string | null } | null
identity?: { name: string | null } | null
avatarUrl?: string | null
}>()
+3 -3
View File
@@ -29,7 +29,7 @@ const props = defineProps<{
activeKey: string
loading: boolean
clawUp: boolean | null
identity?: { name: string | null; tagline: string | null; mark: string | null; initials: string | null } | null
identity?: { name: string | null } | null
avatarUrl?: string | null
}>()
@@ -305,11 +305,11 @@ watch(
<div class="sidebar-account">
<AgentAvatar
:avatar-url="avatarUrl"
:initials="identity?.initials ?? identity?.name?.slice(0, 1)"
:initials="identity?.name?.slice(0, 1)"
:size="26"
/>
<div class="account-text">
<span class="account-name" :title="identity?.tagline ?? undefined">
<span class="account-name" :title="identity?.name ?? undefined">
{{ identity?.name?.trim() || 'rhema' }}
</span>
<span class="account-state" :class="healthTone">{{ healthLabel }}</span>
@@ -5,6 +5,8 @@
defineProps<{
/** null while /healthz has not answered yet. */
clawUp: boolean | null
/** The uploaded identity logo, when the claw has one. */
logoUrl: string | null
}>()
// The routes this client actually calls; the full surface lives in
@@ -41,7 +43,7 @@ const routes = [
<div class="scroll">
<div class="identity">
<div class="avatar" aria-hidden="true">R</div>
<img class="avatar" :src="logoUrl ?? '/rhema-logo.png'" alt="" />
<div>
<h2>Rhema</h2>
<p>ῥῆμα, "the spoken word": words that do things.</p>
@@ -124,15 +126,9 @@ const routes = [
}
.avatar {
display: grid;
place-items: center;
width: 56px;
height: 56px;
border-radius: var(--r-card);
background: var(--accent);
color: var(--on-accent);
font-size: 28px;
font-weight: 700;
object-fit: contain;
flex: none;
}
@@ -1,9 +1,9 @@
<script setup lang="ts">
// The Agent · General page: the mock's identity editor. The text
// fields save as a whole (empty clears, absent is untouched claw-side);
// the images apply the moment a file is chosen — uploading is not the
// kind of edit that needs a staging area. Presentational: data flows
// in as props, intent flows up as events.
// The Agent · General page: the identity editor. The text fields save
// as a whole (empty clears, absent is untouched claw-side); the images
// apply the moment a file is chosen, uploading is not the kind of edit
// that needs a staging area. Presentational: data flows in as props,
// intent flows up as events.
import type { AgentIdentity, AgentImageKind, IdentityTexts } from '~/composables/useClaw'
const props = defineProps<{
@@ -15,19 +15,18 @@ const props = defineProps<{
saving: boolean
}>()
type EditableTexts = Pick<IdentityTexts, 'name' | 'email' | 'signoff'>
const emit = defineEmits<{
save: [texts: IdentityTexts]
save: [texts: EditableTexts]
uploadImage: [kind: AgentImageKind, file: File]
clearImage: [kind: AgentImageKind]
}>()
// The draft: '' means "clear this field", matching the wire.
const draft = ref<IdentityTexts>({
const draft = ref<EditableTexts>({
name: '',
email: '',
mark: '',
initials: '',
tagline: '',
signoff: '',
})
@@ -37,9 +36,6 @@ const dirty = computed(() => {
return (
draft.value.name !== (identity.name ?? '') ||
draft.value.email !== (identity.email ?? '') ||
draft.value.mark !== (identity.mark ?? '') ||
draft.value.initials !== (identity.initials ?? '') ||
draft.value.tagline !== (identity.tagline ?? '') ||
draft.value.signoff !== (identity.signoff ?? '')
)
})
@@ -50,9 +46,6 @@ function discard(): void {
draft.value = {
name: identity.name ?? '',
email: identity.email ?? '',
mark: identity.mark ?? '',
initials: identity.initials ?? '',
tagline: identity.tagline ?? '',
signoff: identity.signoff ?? '',
}
}
@@ -70,9 +63,6 @@ watch(
draft.value = {
name: identity.name ?? '',
email: identity.email ?? '',
mark: identity.mark ?? '',
initials: identity.initials ?? '',
tagline: identity.tagline ?? '',
signoff: identity.signoff ?? '',
}
},
@@ -99,12 +89,9 @@ function onImageChosen(kind: AgentImageKind, event: Event): void {
input.value = ''
}
const CAPS: Record<keyof IdentityTexts, number> = {
const CAPS: Record<keyof EditableTexts, number> = {
name: 64,
email: 120,
mark: 8,
initials: 4,
tagline: 120,
signoff: 120,
}
</script>
@@ -127,23 +114,14 @@ const CAPS: Record<keyof IdentityTexts, number> = {
<div class="identity">
<AgentAvatar
:avatar-url="avatarUrl"
:mark="draft.mark"
:initials="draft.initials || draft.name.slice(0, 1)"
:initials="draft.name.slice(0, 1)"
:size="56"
variant="initials"
/>
<div class="identity-text">
<h2>{{ draft.name || 'rhema' }}</h2>
<p>{{ draft.tagline || 'the spoken word' }}</p>
</div>
</div>
<AppCallout variant="info" title="This is the agent's identity, not the engine's">
Everything in the interface uses the name, mark, and images here:
the sidebar, the chat, the window title, the notifications. The
engine's own name appears only where it is a component.
</AppCallout>
<SettingCard v-if="identity" title="Agent identity">
<SettingRow
title="Display name"
@@ -171,42 +149,6 @@ const CAPS: Record<keyof IdentityTexts, number> = {
:disabled="saving"
/>
</SettingRow>
<SettingRow
title="Mark"
description="The glyph or emoji in the sidebar and the empty states. Defaults to ῥ."
>
<input
v-model="draft.mark"
type="text"
:maxlength="CAPS.mark"
placeholder="ῥ"
autocomplete="off"
:disabled="saving"
/>
</SettingRow>
<SettingRow
title="Initials"
description="Used when there is no mark and no avatar."
>
<input
v-model="draft.initials"
type="text"
:maxlength="CAPS.initials"
:placeholder="draft.name.slice(0, 1) || 'R'"
autocomplete="off"
:disabled="saving"
/>
</SettingRow>
<SettingRow title="Tagline" description="One line under the name on the agent pane.">
<input
v-model="draft.tagline"
type="text"
:maxlength="CAPS.tagline"
placeholder="the spoken word"
autocomplete="off"
:disabled="saving"
/>
</SettingRow>
<SettingRow
title="Sign-off"
description="Appended to messages the agent sends outside the interface."
@@ -232,7 +174,7 @@ const CAPS: Record<keyof IdentityTexts, number> = {
description="The square face in the chat and the sidebar."
>
<div class="image-control">
<AgentAvatar :avatar-url="avatarUrl" :mark="identity.mark" :initials="identity.initials ?? identity.name?.slice(0, 1)" :size="40" variant="initials" />
<AgentAvatar :avatar-url="avatarUrl" :initials="identity.name?.slice(0, 1)" :size="40" />
<button :disabled="mutating" @click="pickImage('avatar')">Upload…</button>
<button v-if="identity.avatar" class="ghost" :disabled="mutating" @click="emit('clearImage', 'avatar')">
Clear
@@ -247,10 +189,10 @@ const CAPS: Record<keyof IdentityTexts, number> = {
</SettingRow>
<SettingRow
title="Logo"
description="The mark the empty states and headers render."
description="Shown on the About page. Falls back to the Rhema mark."
>
<div class="image-control">
<AgentAvatar :avatar-url="logoUrl" :mark="identity.mark" :size="40" variant="mark" />
<img class="logo-preview" :src="logoUrl ?? '/rhema-logo.png'" alt="" />
<button :disabled="mutating" @click="pickImage('logo')">Upload…</button>
<button v-if="identity.logo" class="ghost" :disabled="mutating" @click="emit('clearImage', 'logo')">
Clear
@@ -315,4 +257,11 @@ const CAPS: Record<keyof IdentityTexts, number> = {
.image-control input[type='file'] {
display: none;
}
.logo-preview {
width: 40px;
height: 40px;
object-fit: contain;
flex: none;
}
</style>