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
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:
1 parent
d17d8e2973
commit
debc21a89f
7 files changed
+47
-108
No files matched your search
+7
-6
@@ -179,12 +179,13 @@ holds the session list in chat and the searchable settings nav in
|
|||||||
settings. Both start with the product mark and end with a link to the
|
settings. Both start with the product mark and end with a link to the
|
||||||
other view plus the claw's health. The chat view is the live
|
other view plus the claw's health. The chat view is the live
|
||||||
transcript; the settings view is pages on an 880px column. The agent's
|
transcript; the settings view is pages on an 880px column. The agent's
|
||||||
identity (name, mark, avatar) loads once and renders in the chat rows
|
identity (name, email, sign-off, avatar, logo) loads once. The chat
|
||||||
and the sidebar account row through `AgentAvatar`, which owns the
|
rows and the sidebar account row render it through `AgentAvatar`,
|
||||||
precedence: avatar image, then mark or initials. Settings pages stage
|
which owns the precedence: avatar image, then the name's initial. The
|
||||||
edits into a local draft and
|
About page shows the logo, falling back to the Rhema mark. Settings
|
||||||
apply them with an explicit Save (`PUT /v1/providers/active` answers
|
pages stage edits into a local draft and apply them with an explicit
|
||||||
the new pair only; the client carries the provider list forward).
|
Save (`PUT /v1/providers/active` answers the new pair only; the client
|
||||||
|
carries the provider list forward).
|
||||||
The providers page also manages the roster itself: the add form renders
|
The providers page also manages the roster itself: the add form renders
|
||||||
from the `addable` kinds the claw serves; each kind's `fields` carry
|
from the `addable` kinds the claw serves; each kind's `fields` carry
|
||||||
`{name, required}`, `required` marking what the daemon refuses the login
|
`{name, required}`, `required` marking what the daemon refuses the login
|
||||||
|
|||||||
@@ -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
|
savingIdentity.value = true
|
||||||
try {
|
try {
|
||||||
identity.value = await claw.setAgent(texts)
|
identity.value = await claw.setAgent(texts)
|
||||||
@@ -1065,7 +1065,11 @@ onUnmounted(() => {
|
|||||||
:saving="savingSandbox"
|
:saving="savingSandbox"
|
||||||
@save="saveSandbox"
|
@save="saveSandbox"
|
||||||
/>
|
/>
|
||||||
<SettingsAboutPage v-show="route.section === 'about'" :claw-up="clawUp" />
|
<SettingsAboutPage
|
||||||
|
v-show="route.section === 'about'"
|
||||||
|
:claw-up="clawUp"
|
||||||
|
:logo-url="identityLogoUrl"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,34 +1,23 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
// The agent's face at one size. Two voices: `initials` (the chat rows
|
// The agent's face at one size: the uploaded avatar when there is one,
|
||||||
// and the sidebar's account row: the avatar image when there is one,
|
// the name's initial when not. The precedence lives here and nowhere
|
||||||
// the initials when not) and `mark` (the logo slot: the avatar image
|
// else.
|
||||||
// when there is one, the mark or emoji, ῥ by default). The precedence
|
|
||||||
// lives here and nowhere else.
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
variant?: 'initials' | 'mark'
|
|
||||||
/** The uploaded avatar's object URL, when the claw has one. */
|
/** The uploaded avatar's object URL, when the claw has one. */
|
||||||
avatarUrl?: string | null
|
avatarUrl?: string | null
|
||||||
/** The glyph or emoji; the mark voice defaults to ῥ. */
|
/** The fallback, first letter of the name or R. */
|
||||||
mark?: string | null
|
|
||||||
/** The initials voice's fallback, first letter of the name or R. */
|
|
||||||
initials?: string | null
|
initials?: string | null
|
||||||
size?: number
|
size?: number
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
variant: 'initials',
|
|
||||||
avatarUrl: null,
|
avatarUrl: null,
|
||||||
mark: null,
|
|
||||||
initials: null,
|
initials: null,
|
||||||
size: 32,
|
size: 32,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
const glyph = computed(() =>
|
const glyph = computed(() => props.initials?.trim() || 'R')
|
||||||
props.variant === 'mark'
|
|
||||||
? props.mark?.trim() || 'ῥ'
|
|
||||||
: props.initials?.trim() || 'R',
|
|
||||||
)
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ const props = defineProps<{
|
|||||||
olderAvailable?: boolean
|
olderAvailable?: boolean
|
||||||
/** Bumped whenever a page was folded in above the mirror. */
|
/** Bumped whenever a page was folded in above the mirror. */
|
||||||
prependCount?: number
|
prependCount?: number
|
||||||
identity?: { name: string | null; mark: string | null; initials: string | null } | null
|
identity?: { name: string | null } | null
|
||||||
avatarUrl?: string | null
|
avatarUrl?: string | null
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ const props = defineProps<{
|
|||||||
activeKey: string
|
activeKey: string
|
||||||
loading: boolean
|
loading: boolean
|
||||||
clawUp: boolean | null
|
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
|
avatarUrl?: string | null
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
@@ -305,11 +305,11 @@ watch(
|
|||||||
<div class="sidebar-account">
|
<div class="sidebar-account">
|
||||||
<AgentAvatar
|
<AgentAvatar
|
||||||
:avatar-url="avatarUrl"
|
:avatar-url="avatarUrl"
|
||||||
:initials="identity?.initials ?? identity?.name?.slice(0, 1)"
|
:initials="identity?.name?.slice(0, 1)"
|
||||||
:size="26"
|
:size="26"
|
||||||
/>
|
/>
|
||||||
<div class="account-text">
|
<div class="account-text">
|
||||||
<span class="account-name" :title="identity?.tagline ?? undefined">
|
<span class="account-name" :title="identity?.name ?? undefined">
|
||||||
{{ identity?.name?.trim() || 'rhema' }}
|
{{ identity?.name?.trim() || 'rhema' }}
|
||||||
</span>
|
</span>
|
||||||
<span class="account-state" :class="healthTone">{{ healthLabel }}</span>
|
<span class="account-state" :class="healthTone">{{ healthLabel }}</span>
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
defineProps<{
|
defineProps<{
|
||||||
/** null while /healthz has not answered yet. */
|
/** null while /healthz has not answered yet. */
|
||||||
clawUp: boolean | null
|
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
|
// The routes this client actually calls; the full surface lives in
|
||||||
@@ -41,7 +43,7 @@ const routes = [
|
|||||||
|
|
||||||
<div class="scroll">
|
<div class="scroll">
|
||||||
<div class="identity">
|
<div class="identity">
|
||||||
<div class="avatar" aria-hidden="true">R</div>
|
<img class="avatar" :src="logoUrl ?? '/rhema-logo.png'" alt="" />
|
||||||
<div>
|
<div>
|
||||||
<h2>Rhema</h2>
|
<h2>Rhema</h2>
|
||||||
<p>ῥῆμα, "the spoken word": words that do things.</p>
|
<p>ῥῆμα, "the spoken word": words that do things.</p>
|
||||||
@@ -124,15 +126,9 @@ const routes = [
|
|||||||
}
|
}
|
||||||
|
|
||||||
.avatar {
|
.avatar {
|
||||||
display: grid;
|
|
||||||
place-items: center;
|
|
||||||
width: 56px;
|
width: 56px;
|
||||||
height: 56px;
|
height: 56px;
|
||||||
border-radius: var(--r-card);
|
object-fit: contain;
|
||||||
background: var(--accent);
|
|
||||||
color: var(--on-accent);
|
|
||||||
font-size: 28px;
|
|
||||||
font-weight: 700;
|
|
||||||
flex: none;
|
flex: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
// The Agent · General page: the mock's identity editor. The text
|
// The Agent · General page: the identity editor. The text fields save
|
||||||
// fields save as a whole (empty clears, absent is untouched claw-side);
|
// as a whole (empty clears, absent is untouched claw-side); the images
|
||||||
// the images apply the moment a file is chosen — uploading is not the
|
// apply the moment a file is chosen, uploading is not the kind of edit
|
||||||
// kind of edit that needs a staging area. Presentational: data flows
|
// that needs a staging area. Presentational: data flows in as props,
|
||||||
// in as props, intent flows up as events.
|
// intent flows up as events.
|
||||||
import type { AgentIdentity, AgentImageKind, IdentityTexts } from '~/composables/useClaw'
|
import type { AgentIdentity, AgentImageKind, IdentityTexts } from '~/composables/useClaw'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
@@ -15,19 +15,18 @@ const props = defineProps<{
|
|||||||
saving: boolean
|
saving: boolean
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
|
type EditableTexts = Pick<IdentityTexts, 'name' | 'email' | 'signoff'>
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
save: [texts: IdentityTexts]
|
save: [texts: EditableTexts]
|
||||||
uploadImage: [kind: AgentImageKind, file: File]
|
uploadImage: [kind: AgentImageKind, file: File]
|
||||||
clearImage: [kind: AgentImageKind]
|
clearImage: [kind: AgentImageKind]
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
// The draft: '' means "clear this field", matching the wire.
|
// The draft: '' means "clear this field", matching the wire.
|
||||||
const draft = ref<IdentityTexts>({
|
const draft = ref<EditableTexts>({
|
||||||
name: '',
|
name: '',
|
||||||
email: '',
|
email: '',
|
||||||
mark: '',
|
|
||||||
initials: '',
|
|
||||||
tagline: '',
|
|
||||||
signoff: '',
|
signoff: '',
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -37,9 +36,6 @@ const dirty = computed(() => {
|
|||||||
return (
|
return (
|
||||||
draft.value.name !== (identity.name ?? '') ||
|
draft.value.name !== (identity.name ?? '') ||
|
||||||
draft.value.email !== (identity.email ?? '') ||
|
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 ?? '')
|
draft.value.signoff !== (identity.signoff ?? '')
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
@@ -50,9 +46,6 @@ function discard(): void {
|
|||||||
draft.value = {
|
draft.value = {
|
||||||
name: identity.name ?? '',
|
name: identity.name ?? '',
|
||||||
email: identity.email ?? '',
|
email: identity.email ?? '',
|
||||||
mark: identity.mark ?? '',
|
|
||||||
initials: identity.initials ?? '',
|
|
||||||
tagline: identity.tagline ?? '',
|
|
||||||
signoff: identity.signoff ?? '',
|
signoff: identity.signoff ?? '',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -70,9 +63,6 @@ watch(
|
|||||||
draft.value = {
|
draft.value = {
|
||||||
name: identity.name ?? '',
|
name: identity.name ?? '',
|
||||||
email: identity.email ?? '',
|
email: identity.email ?? '',
|
||||||
mark: identity.mark ?? '',
|
|
||||||
initials: identity.initials ?? '',
|
|
||||||
tagline: identity.tagline ?? '',
|
|
||||||
signoff: identity.signoff ?? '',
|
signoff: identity.signoff ?? '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -99,12 +89,9 @@ function onImageChosen(kind: AgentImageKind, event: Event): void {
|
|||||||
input.value = ''
|
input.value = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
const CAPS: Record<keyof IdentityTexts, number> = {
|
const CAPS: Record<keyof EditableTexts, number> = {
|
||||||
name: 64,
|
name: 64,
|
||||||
email: 120,
|
email: 120,
|
||||||
mark: 8,
|
|
||||||
initials: 4,
|
|
||||||
tagline: 120,
|
|
||||||
signoff: 120,
|
signoff: 120,
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -127,23 +114,14 @@ const CAPS: Record<keyof IdentityTexts, number> = {
|
|||||||
<div class="identity">
|
<div class="identity">
|
||||||
<AgentAvatar
|
<AgentAvatar
|
||||||
:avatar-url="avatarUrl"
|
:avatar-url="avatarUrl"
|
||||||
:mark="draft.mark"
|
:initials="draft.name.slice(0, 1)"
|
||||||
:initials="draft.initials || draft.name.slice(0, 1)"
|
|
||||||
:size="56"
|
:size="56"
|
||||||
variant="initials"
|
|
||||||
/>
|
/>
|
||||||
<div class="identity-text">
|
<div class="identity-text">
|
||||||
<h2>{{ draft.name || 'rhema' }}</h2>
|
<h2>{{ draft.name || 'rhema' }}</h2>
|
||||||
<p>{{ draft.tagline || 'the spoken word' }}</p>
|
|
||||||
</div>
|
</div>
|
||||||
</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">
|
<SettingCard v-if="identity" title="Agent identity">
|
||||||
<SettingRow
|
<SettingRow
|
||||||
title="Display name"
|
title="Display name"
|
||||||
@@ -171,42 +149,6 @@ const CAPS: Record<keyof IdentityTexts, number> = {
|
|||||||
:disabled="saving"
|
:disabled="saving"
|
||||||
/>
|
/>
|
||||||
</SettingRow>
|
</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
|
<SettingRow
|
||||||
title="Sign-off"
|
title="Sign-off"
|
||||||
description="Appended to messages the agent sends outside the interface."
|
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."
|
description="The square face in the chat and the sidebar."
|
||||||
>
|
>
|
||||||
<div class="image-control">
|
<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 :disabled="mutating" @click="pickImage('avatar')">Upload…</button>
|
||||||
<button v-if="identity.avatar" class="ghost" :disabled="mutating" @click="emit('clearImage', 'avatar')">
|
<button v-if="identity.avatar" class="ghost" :disabled="mutating" @click="emit('clearImage', 'avatar')">
|
||||||
Clear
|
Clear
|
||||||
@@ -247,10 +189,10 @@ const CAPS: Record<keyof IdentityTexts, number> = {
|
|||||||
</SettingRow>
|
</SettingRow>
|
||||||
<SettingRow
|
<SettingRow
|
||||||
title="Logo"
|
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">
|
<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 :disabled="mutating" @click="pickImage('logo')">Upload…</button>
|
||||||
<button v-if="identity.logo" class="ghost" :disabled="mutating" @click="emit('clearImage', 'logo')">
|
<button v-if="identity.logo" class="ghost" :disabled="mutating" @click="emit('clearImage', 'logo')">
|
||||||
Clear
|
Clear
|
||||||
@@ -315,4 +257,11 @@ const CAPS: Record<keyof IdentityTexts, number> = {
|
|||||||
.image-control input[type='file'] {
|
.image-control input[type='file'] {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.logo-preview {
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
object-fit: contain;
|
||||||
|
flex: none;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in new issue
Block a user