feat: show abbreviated message hash in chat bubble header

Displays first 7 chars of SHA-256 hash after sender name and time.
Full hash visible on hover via title attribute.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jason Tudisco 2026-03-16 19:17:20 -06:00
parent 66bbc44f75
commit b963c96915

View File

@ -23,6 +23,7 @@
<div class={'message-header ' + (props.isOwn ? 'own' : '')}>
<span class="sender-name">{props.message?.sender_name}</span>
<span class="message-time">{formatTime(props.message?.created_at)}</span>
<span if={props.message?.hash} class="message-hash" title={props.message.hash}>{props.message.hash.slice(0, 7)}</span>
</div>
<div if={hasToolResults()} class="tool-results-section">
<div each={tr in getToolResults()} class="tool-result-item">
@ -152,6 +153,20 @@
color: var(--text-muted);
}
.message-hash {
font-family: var(--font-mono, 'SF Mono', 'Fira Code', monospace);
font-size: 10px;
color: var(--text-muted);
opacity: 0.5;
cursor: default;
user-select: all;
transition: opacity var(--transition-fast);
}
.message-hash:hover {
opacity: 1;
}
.message-content {
padding: var(--space-sm) var(--space-md);
border-radius: var(--radius-lg);