From f25bf1558eb1ca7616b774623236f3c309896c1b Mon Sep 17 00:00:00 2001 From: dev Date: Wed, 27 May 2026 19:20:00 +0200 Subject: [PATCH] demo(words): enrich status bar with char count + selection + dynamic link/commit (F4.5b) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before: 'Optional editor · 64 words · none' After: 'Optional · 64 words · 453 chars · none' (no link, no commit) 'Required · 64 words · 453 chars · range · https://...' (selection + link) 'Optional · 64 words · 453 chars · none · save' (after commit) - Drops the redundant 'editor' suffix; the surface is already an editor. - Adds char count from plainText.length — useful for size limits. - Adds the existing selectionState (none/collapsed/range) inline. - Splits link/commit into separate optional segments instead of collapsing them into one slot. Demo-only change in +page.svelte. The eidos Words.Status wrapper still passes children through unchanged — enriching the eidos default status snippet itself would require Words provider to expose wordCount/charCount, which is a larger refactor. Co-Authored-By: Claude Opus 4.7 (1M context) --- web/routes/uix/components/words/+page.svelte | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/web/routes/uix/components/words/+page.svelte b/web/routes/uix/components/words/+page.svelte index 60ffa9e19..c120e95f3 100644 --- a/web/routes/uix/components/words/+page.svelte +++ b/web/routes/uix/components/words/+page.svelte @@ -1063,9 +1063,19 @@ {#if showStatus} - {invalid - ? 'Invalid content' - : `${required ? 'Required editor' : 'Optional editor'} · ${wordCount} words · ${selectedLink ? selectedLink.href : lastCommit}`} + {#if invalid} + Invalid content + {:else} + {required ? 'Required' : 'Optional'} + · {wordCount} words + · {plainText.length} chars + · {selectionState} + {#if selectedLink} + · → {selectedLink.href} + {:else if lastCommit !== 'none'} + · {lastCommit} + {/if} + {/if} {/if} {/snippet}