Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

aa: clear DOM textarea on submit, quiet top margin, show ADMIN badge

- chat.mjs submit: send keyboard:text:replace with "" alongside the
input.text = "" / keyboard:close. Without this the native textarea
keeps the submitted text, and on next open TextInput syncs it back
into input.text so the field looked un-cleared.

- chat.mjs paint: new options.hideChrome skips the News ticker + KPBJ
radio. New options.presenceOverride replaces the "N online" counter
with a caller-supplied string (rendered in MatrixChunky8, same
position as the default counter).

- aa.mjs: passes hideChrome:true and a dynamic presenceOverride —
"@jeffrey · ADMIN" when authorized, "@jeffrey · no access" on
403/401, "@jeffrey · …" while probing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

+66 -15
+16 -1
system/public/aesthetic.computer/disks/aa.mjs
··· 138 138 } 139 139 140 140 function paint($) { 141 - chat.paint($, { otherChat: client.system, theme: THEME }); 141 + chat.paint($, { 142 + otherChat: client.system, 143 + theme: THEME, 144 + // aa has no real chat presence — kill the news ticker + KPBJ radio. 145 + hideChrome: true, 146 + // Replace "N online" with a solo admin line. 147 + presenceOverride: currentPresenceLine(), 148 + }); 149 + } 150 + 151 + function currentPresenceLine() { 152 + const raw = userHandleRef?.(); 153 + const h = raw ? (raw.startsWith("@") ? raw : `@${raw}`) : "@jeffrey"; 154 + if (isAdmin && token) return `${h} · ADMIN`; 155 + if (token === null && isAdmin === false) return `${h} · no access`; 156 + return `${h} · …`; 142 157 } 143 158 144 159 function act($) {
+50 -14
system/public/aesthetic.computer/disks/chat.mjs
··· 553 553 input.showBlink = false; 554 554 input.mute = true; 555 555 if (handleAutocomplete) handleAutocomplete.hide(); // 🔍 Clear autocomplete state 556 + // Also clear the DOM textarea — without this the native keyboard 557 + // keeps the submitted text when it re-opens, and TextInput's sync 558 + // brings it right back into `input.text`. 559 + send({ type: "keyboard:text:replace", content: { text: "" } }); 556 560 console.log("⌨️🔴 [chat.mjs] sending keyboard:close - reason: message sent"); 557 561 send({ type: "keyboard:close" }); 558 562 ··· 1812 1816 false, undefined, false, selectedTypeface 1813 1817 ); 1814 1818 1815 - // Presence display - shows "here" (actively present) and "online" (connected anywhere) 1816 - if (!client.connecting) { 1819 + // Presence display - shows "here" (actively present) and "online" 1820 + // (connected anywhere). Pieces that don't have real chat presence (e.g. 1821 + // aa.mjs, which is a solo bridge to @jeffrey's macbook) can pass 1822 + // options.presenceOverride to replace the counter with a custom line 1823 + // like "@jeffrey · ADMIN". 1824 + if (!client.connecting && options?.presenceOverride) { 1825 + const line = options.presenceOverride; 1826 + const hudLabel = hud?.currentLabel?.(); 1827 + const hudLabelBox = hudLabel?.btn?.box; 1828 + const hudLabelBottom = hudLabelBox 1829 + ? (hudLabelBox.y ?? 0) + (hudLabelBox.h ?? 0) 1830 + : 12; 1831 + const presenceX = 6; 1832 + const presenceY = hudLabelBottom + 3; 1833 + const onlineFgColor = theme?.timestamp || 160; 1834 + ink(0, 0, 0, 180).write(line, { 1835 + x: presenceX + 1, 1836 + top: presenceY + 1, 1837 + }, false, undefined, false, "MatrixChunky8"); 1838 + if (Array.isArray(onlineFgColor)) { 1839 + ink(...onlineFgColor).write(line, { 1840 + x: presenceX, 1841 + top: presenceY, 1842 + }, false, undefined, false, "MatrixChunky8"); 1843 + } else { 1844 + ink(onlineFgColor).write(line, { 1845 + x: presenceX, 1846 + top: presenceY, 1847 + }, false, undefined, false, "MatrixChunky8"); 1848 + } 1849 + } else if (!client.connecting) { 1817 1850 const chatterCount = client?.chatterCount ?? 0; 1818 1851 const onlineHandles = client?.onlineHandles || []; 1819 1852 const hereHandles = client?.hereHandles || []; ··· 2305 2338 needsPaint(); 2306 2339 } 2307 2340 2308 - // News ticker (re-enabled) 2309 - if (!client.connecting && !modalPainting && !messageCopyModal) { 2310 - paintNewsTicker({ ink, screen, text, hud }, theme); 2311 - needsPaint(); 2312 - } 2313 - 2314 - // 📻 R8dio mini-player (laer-klokken) 2315 - if (!client.connecting && !modalPainting && !messageCopyModal) { 2316 - r8dioEnabled = true; 2317 - paintR8dioPlayer({ ink, screen, help, hud }, theme); 2318 - needsPaint(); 2341 + // 📰 News ticker + 📻 R8dio are suppressed when options.hideChrome is set 2342 + // (e.g. aa.mjs wants a quieter top margin). 2343 + if (options?.hideChrome) { 2344 + r8dioEnabled = false; 2319 2345 } else { 2320 - r8dioEnabled = false; 2346 + if (!client.connecting && !modalPainting && !messageCopyModal) { 2347 + paintNewsTicker({ ink, screen, text, hud }, theme); 2348 + needsPaint(); 2349 + } 2350 + if (!client.connecting && !modalPainting && !messageCopyModal) { 2351 + r8dioEnabled = true; 2352 + paintR8dioPlayer({ ink, screen, help, hud }, theme); 2353 + needsPaint(); 2354 + } else { 2355 + r8dioEnabled = false; 2356 + } 2321 2357 } 2322 2358 2323 2359 // 🔍 Paint @handle autocomplete dropdown (last, so it renders on top of everything)