feat(web/claw): restyle the interface after Rhema Together
android / debug (push) Successful in 2m16s
android / release (push) Successful in 2m9s
ci / checks (push) Successful in 3m39s
ci / test (push) Successful in 2m5s
ci / docker (push) Successful in 1m52s
ci / web (push) Successful in 13s
ci / publish-edge-images (deploy/docker/claw.Dockerfile, rhema-claw) (push) Successful in 1m56s
ci / chart (push) Successful in 6s
ci / publish-edge-images (deploy/docker/ui.Dockerfile, rhema-claw-ui) (push) Successful in 20s
ci / publish-edge-chart (push) Successful in 4s

The web client kept its own dark shell: an icon rail, neon jade
accents, and rows that reported state with colored dots and pills.
Rhema Together had since settled on a warmer, quieter language, and
the two surfaces no longer looked like one product.

The shell is now one 232px sidebar plus a view. Chat lists sessions in
the sidebar and renders the transcript in a 760px column; settings
moves its searchable nav into the same sidebar and its pages onto an
880px column. The palette, type scale, controls, cards, and markdown
come from Together's light theme, with its dark values following the
OS. FiraCode Nerd Font Mono sets code, and the product mark, logo, and
lucide icons replace the glyph characters.

Status is a word now: running, waiting, held, connected, live,
snapshot. The rail, its dots, the duplicate consent deny action, and
the session key tag are gone. The model backend moved into the chat
topbar beside the stream state.

The mobile shell keeps the composer fixed in chat and lets settings
scroll as a document.

README and component docs follow the new layout. nuxt typecheck and
build pass; checked light and dark at 1280x800 and 390x844 against
mock API data.
This commit is contained in:
vhaudiquet committed 2026-11-30 18:23:57 +01:00
1 parent acda9cc537
commit d17d8e2973
33 files changed
+1858 -1383

No files matched your search

+74 -60
View File
@@ -1,8 +1,8 @@
<script setup lang="ts">
// The one page: the icon rail, then either the chat view (session
// inventory + live transcript) or the settings view (nav + pages). A
// tiny hash router keeps views deep-linkable without vue-router. All
// state is in-memory; only the token and the active session persist.
// The one page: a sidebar, then either the chat view (session list and
// live transcript) or the settings view (nav and pages). A tiny hash
// router keeps views deep-linkable without vue-router. All state is
// in-memory; only the token and the active session persist.
// The claw owns the conversation and the config, so this page is a
// mirror, not a store.
import { ClawError, clawHealth, isInteractive, isResidentKey, useClaw } from '~/composables/useClaw'
@@ -130,13 +130,13 @@ const olderAvailable = ref(true)
// The cards this page already tried to fetch. Keyed by the card object
// rather than the attachment id: a page read, a mirror reset, or a live
// turn folding into a record builds new cards, and a new card deserves
// its fetch — the useClaw cache answers a repeat with the blob it
// its fetch, the useClaw cache answers a repeat with the blob it
// already holds, so a retry costs no request.
let attemptedAttachments = new WeakSet<object>()
// Image cards need their bytes before they can render: fetched as the
// card appears, not on any timer. code/file fetch on download instead.
// A replayed question's images fetch the same way — the stream carries
// A replayed question's images fetch the same way, the stream carries
// their attachment ids, never the bytes; locally sent rows hold their
// own object URLs.
//
@@ -259,7 +259,7 @@ async function clearIdentityImage(kind: AgentImageKind): Promise<void> {
}
// The window title answers to the identity and the view, as the design
// shows it: "Kosmos — Settings · Model providers".
// shows it: "Kosmos, Settings · Model providers".
const viewTitle = computed(() => {
const current = route.value
if (current.view === 'chat') return 'Chat'
@@ -272,7 +272,7 @@ watch(
[identity, viewTitle],
() => {
const name = identity.value?.name?.trim()
document.title = name ? `${name} — ${viewTitle.value}` : `rhema claw — ${viewTitle.value}`
document.title = name ? `${name} · ${viewTitle.value}` : `rhema claw · ${viewTitle.value}`
},
{ immediate: true },
)
@@ -339,7 +339,7 @@ async function refreshSessions(): Promise<void> {
apiError.value = null
// A read-only thread has no stream to tell it a dispatch ran; the
// inventory's revision does. Reload the snapshot when it moved, and
// only then — a reload drops the pages the reader walked back to.
// only then, a reload drops the pages the reader walked back to.
if (activeKey.value !== '' && !isResidentKey(activeKey.value) && !threadLoading) {
const revision = sessions.value.find((s) => s.key === activeKey.value)?.revision ?? null
if (revision !== threadRevision) void loadThread()
@@ -379,7 +379,7 @@ function closeDeleteSession(): void {
}
/** The session to show once `gone` is deleted: the first interactive one
* the inventory still has, else the first of any kind, else none — an
* the inventory still has, else the first of any kind, else none, an
* empty key opens no stream (see `resubscribe`). */
function nextActiveKey(gone: string): string {
const remaining = sessions.value.filter((session) => session.key !== gone)
@@ -502,9 +502,9 @@ async function addAccount(account: NewAccount): Promise<void> {
pushNotice(
saved.watchable_forge
? saved.watched
? `account ${saved.label} saved — following ${saved.service} notifications`
? `account ${saved.label} saved, following ${saved.service} notifications`
: `account ${saved.label} saved (already watched)`
: `account ${saved.label} saved — ${saved.service} is not a watchable forge`,
: `account ${saved.label} saved. ${saved.service} is not a watchable forge`,
)
await refreshAccounts()
} catch (err) {
@@ -520,7 +520,7 @@ async function removeAccount(account: ClawAccount): Promise<void> {
const forgot = await claw.removeAccount(account.id)
pushNotice(
forgot.forgot
? `account ${account.label} forgotten${forgot.watches_removed ? ` — ${forgot.watches_removed} watch(es) removed` : ''}`
? `account ${account.label} forgotten${forgot.watches_removed ? `, ${forgot.watches_removed} watch(es) removed` : ''}`
: `account ${account.label} was already gone`,
)
await refreshAccounts()
@@ -680,8 +680,8 @@ async function saveSandbox(choice: SandboxSelection): Promise<void> {
async function send(message: { text: string; pastes: string[]; images: StagedImage[] }): Promise<void> {
// The optimistic row renders the staged previews and the composed
// chip record — the same plain text and spans the fold records on
// the other side — so the stream's user_message echo, which
// chip record, the same plain text and spans the fold records on
// the other side, so the stream's user_message echo, which
// carries the stored ids beside that record, dedupes against it.
const composed = composeChips(message.text, message.pastes)
const rowId = transcript.addSent(
@@ -761,7 +761,7 @@ function saveToken(): void {
authRequired.value = false
apiError.value = null
// The stream's retry loop reads the token fresh each attempt, so it
// recovers on its own; everything the 401 froze reloads now — the
// recovers on its own; everything the 401 froze reloads now, the
// polls confirm the token works, and the identity and accounts pages
// were left empty by the failed fetches that raised the banner.
void checkHealth()
@@ -823,7 +823,7 @@ function resubscribe(): void {
streamStatus.value = status
// A retry resumes from the last seq this mirror holds, so the
// claw sends the gap and nothing else: the mirror stays as it
// is. Only the attachment set is cleared — a fetch that failed
// is. Only the attachment set is cleared, a fetch that failed
// during the outage should retry against the recovered stream.
if (status === 'reconnecting') {
attemptedAttachments = new WeakSet<object>()
@@ -837,7 +837,7 @@ function resubscribe(): void {
/** Loads the newest page of a read-only thread: a snapshot of the
* engine's own history, rendered by the same mirror the stream feeds.
* Pagination is the walk back, unchanged — a page lands, the scroller
* Pagination is the walk back, unchanged, a page lands, the scroller
* asks for the next one. */
async function loadThread(): Promise<void> {
const key = activeKey.value
@@ -916,13 +916,33 @@ onUnmounted(() => {
</script>
<template>
<div class="shell">
<AppRail
:view="route.view"
<div class="shell" :class="{ 'shell-settings': route.view === 'settings' }">
<SessionsSidebar
v-if="route.view === 'chat'"
:sessions="sessions"
:active-key="activeKey"
:loading="sessionsLoading"
:claw-up="clawUp"
:identity="identity"
:avatar-url="identityAvatarUrl"
@navigate="go($event === 'chat' ? { view: 'chat' } : { view: 'settings', section: 'providers' })"
@home="go({ view: 'chat' })"
@navigate-settings="go({ view: 'settings', section: 'providers' })"
@select="activeKey = $event"
@refresh="refreshSessions"
@create="createSession"
@delete="askDeleteSession"
@pause="pauseSession"
@resume="resumeSession"
@abort="abortSession"
/>
<SettingsNav
v-else
:sections="SETTINGS_SECTIONS"
:active="route.section"
:claw-up="clawUp"
@home="go({ view: 'chat' })"
@navigate-chat="go({ view: 'chat' })"
@select="go({ view: 'settings', section: $event })"
/>
<div class="body">
@@ -937,7 +957,7 @@ onUnmounted(() => {
autocomplete="off"
@keydown.enter="saveToken"
/>
<button @click="saveToken">save</button>
<button @click="saveToken">Save</button>
</template>
</ClawBanner>
<ClawBanner v-if="clawUp === false" variant="error">
@@ -959,22 +979,8 @@ onUnmounted(() => {
</div>
<main class="view">
<template v-if="route.view === 'chat'">
<SessionsSidebar
:sessions="sessions"
:active-key="activeKey"
:loading="sessionsLoading"
:identity="identity"
:avatar-url="identityAvatarUrl"
@select="activeKey = $event"
@refresh="refreshSessions"
@create="createSession"
@delete="askDeleteSession"
@pause="pauseSession"
@resume="resumeSession"
@abort="abortSession"
/>
<ChatPanel
<ChatPanel
v-if="route.view === 'chat'"
:items="transcriptItems"
:live="liveTurn"
:active-key="activeKey"
@@ -996,15 +1002,8 @@ onUnmounted(() => {
@consent-deny="denyConsent"
@download-attachment="downloadAttachment"
/>
</template>
<template v-else>
<SettingsNav
:sections="SETTINGS_SECTIONS"
:active="route.section"
:claw-up="clawUp"
@select="go({ view: 'settings', section: $event })"
/>
<SettingsAgentGeneralPage
v-show="route.section === 'agent/general'"
:identity="identity"
@@ -1082,11 +1081,11 @@ onUnmounted(() => {
created under the same name starts empty.
</p>
<template #actions>
<button class="ghost" :disabled="deleting" @click="closeDeleteSession">
cancel
<button class="btn-quiet" :disabled="deleting" @click="closeDeleteSession">
Cancel
</button>
<button :disabled="deleting" @click="confirmDeleteSession">
{{ deleting ? 'deleting…' : 'delete' }}
<button class="btn-danger" :disabled="deleting" @click="confirmDeleteSession">
{{ deleting ? 'Deleting…' : 'Delete' }}
</button>
</template>
</AppModal>
@@ -1109,13 +1108,14 @@ onUnmounted(() => {
.banners {
display: flex;
flex-direction: column;
gap: 6px;
padding: 8px 16px 0;
gap: var(--sp-2);
padding: var(--sp-2) var(--sp-4) 0;
}
.view {
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;
}
@@ -1123,19 +1123,33 @@ onUnmounted(() => {
min-height: 0;
}
@media (max-width: 980px) {
@media (max-width: 860px) {
.shell {
flex-direction: column;
height: 100vh;
min-height: 0;
}
.body {
flex: 1;
min-height: 0;
}
.view {
flex: 1;
min-height: 0;
}
/* Settings is a document on a phone: the nav and the page scroll
together instead of squeezing the page into the space left. */
.shell-settings {
height: auto;
min-height: 100vh;
}
.view {
flex-direction: column;
}
.view > * {
height: 60vh;
border-top: 1px solid var(--border);
.shell-settings .body,
.shell-settings .view {
flex: none;
}
}
</style>