pi-ext bugabingas pi extensions
owned by bugabinga
README Source History Refs Compare Notes Search Keep ui composer sticky
70d4db5d16b8383a3056c39e8b01525368aca149
Oliver Krylow <o.krylow@isp-insoft.de > · 7 Jul 2026
unsigned
Browse files Compare with HEAD
Changed files (6) extensions/ui/README.md Modified 47 47 Full checkpoints live in [docs/manual-playbook.md](docs/manual-playbook.md).
49 + ##
Mockup parity audit 51 + The accepted mockup was treated as visual direction, not a finished parity checklist.
52 + That was wrong for user expectations.
53 + Implemented now: stream-first shell, Nugu theme, sticky bottom composer, token auth, RPC stream, command input, dialogs, trusted widgets, code/diff rendering, telemetry digest, and no sidebars.
54 + Still incomplete versus the representative mockup/spec: richer top strip with Pi mark and `/ui off`, meaningful bottom status strip for model/thinking/context, stronger `YOU` labels, selected-item inspector, clearer tool lifecycle cards, and polished mobile status/actions.
55 + Track these as UI polish/parity work, not transport/runtime work.
51 59 - `401` means the token is missing or stale; reopen `/ui` or rescan QR.
extensions/ui/__e2e__/fake-rpc.spec.ts Modified 17 17 page.
on (
"pageerror" , (error)
=> pageErrors.
push (error.message));
18 18 const events
= new EventStore ();
19 19 events.
append ({ type:
"message" , role:
"assistant" , text:
"ready" });
20 + for (
let index
= 0 ; index
< 80 ; index
+= 1 ) {
24 + text:
`history line ${index}` ,
21 28 type:
"widget_mount" ,
22 29 widgetId:
"widget-e2e" ,
59 66 if (pageErrors.
length )
throw new Error (pageErrors.
join (
"\n" ));
60 67 await expect (page.
locator (
"#ui-stream" )).
toContainText (
"ready" );
68 + await expect (page.
locator (
"#ui-stream" )).
toContainText (
"history line 79" );
61 69 await expect (page.
locator (
"#ui-stream" )).
toContainText (
"Widget fallback" );
70 + await expect (page.
locator (
"#ui-composer" )).
toBeInViewport ();
72 + await page.
evaluate (
73 + ()
=> document .
documentElement .scrollHeight
<= window .
innerHeight ,
63 77 await page.
locator (
"#ui-input" ).
fill (
"hello e2e" );
64 78 await page.
locator (
"#ui-send" ).
click ();
extensions/ui/__tests__/theme.test.ts Modified 1 1 import { describe, expect, it }
from "vitest" ;
2 + import { renderAppCss }
from "../web/app.css" ;
2 3 import { renderThemeCss }
from "../web/theme.css" ;
4 5 describe (
"ui Nugu theme" , ()
=> {
13 14 it (
"keeps stream-first layout without sidebar" , ()
=> {
14 15 const css
= renderThemeCss ();
15 - expect (css).
toContain (
"grid-template-rows: auto 1fr auto auto" );
16 + expect (css).
toContain (
"grid-template-rows: auto minmax(0, 1fr) auto" );
16 17 expect (css).not.
toContain (
"sidebar" );
20 + it (
"keeps the composer visible while only the stream scrolls" , ()
=> {
21 + const css
= renderAppCss ();
22 + expect (css).
toContain (
23 + "body { margin: 0; min-height: 100vh; height: 100vh; overflow: hidden;" ,
25 + expect (css).
toContain (
26 + "#ui-shell { min-height: 100vh; height: 100vh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto;" ,
28 + expect (css).
toContain (
"#ui-stream { min-height: 0;" );
29 + expect (css).
toContain (
"#ui-bottom { position: sticky; bottom: 0;" );
30 + expect (css).
toContain (
"#ui-input { width: 100%; max-height: 30vh;" );
extensions/ui/web/app.css.ts Modified 6 6 font
- family : ui
- monospace, SFMono
- Regular, Menlo, Consolas, monospace;
8 - #ui
- stream { min
- width :
0 ;
padding : 12px;
overflow : auto; }
8 + #ui
- stream { min
- height :
0 ; min
- width :
0 ;
padding : 12px;
overflow : auto; overscroll
- behavior : contain; scroll
- padding
- bottom : 180px; }
9 9 .ui
- event {
border : 2px solid color
- mix (
in srgb,
var (
-- nugu
- line)
50 % , transparent);
background :
var (--nugu-panel);
padding : 8px;
margin :
0 0 8px; white
- space : pre
- wrap; content
- visibility : auto; contain
- intrinsic
- size : 80px; }
10 10 .ui
- event - user { border
- width : 4px; border
- color :
var (--nugu-user); }
11 11 .ui
- visual
- block
- row {
overflow : auto;
contain : layout paint; }
16 16 .ui
- code, .ui
- diff pre {
overflow : auto; max
- height : 60vh;
padding : 8px;
border : 2px solid
var (--nugu-line);
background :
var (--nugu-bg); }
17 17 .ui
- diff summary {
cursor : pointer; font
- weight :
800 ; }
18 18 .ui
- expand
- output {
display : block; margin
- top : 8px;
font : inherit;
border : 2px solid
var (--nugu-line);
background :
var (--nugu-bg);
color :
var (--nugu-fg); }
19 - #ui
- digest { border
- top : 3px solid
var (--nugu-line);
padding : 6px 8px; font
- size : 12px; }
19 + #ui
- bottom {
position : sticky;
bottom :
0 ; z
- index :
10 ; border
- top : 4px solid
var (--nugu-accent);
background :
var (--nugu-panel); box
- shadow :
0 - 8px
0 color
- mix (
in srgb,
var (
-- nugu
- bg)
85 % , transparent); }
20 + #ui
- digest {
padding : 6px 8px; font
- size : 12px; }
20 21 #ui
- composer {
display : grid; grid
- template
- columns : 1fr auto;
gap : 8px; border
- top : 3px solid
var (--nugu-line);
padding : 8px; }
21 22 #ui
- input
- wrap {
position : relative; min
- width :
0 ; }
22 - #ui
- input {
width :
100 % ; min
- height : 42px;
resize : vertical;
font : inherit;
background :
var (--nugu-bg);
color :
var (--nugu-fg);
border : 2px solid
var (--nugu-line);
padding : 8px; }
23 + #ui
- input {
width :
100 % ; max
- height : 30vh; min
- height : 42px;
resize : vertical;
font : inherit;
background :
var (--nugu-bg);
color :
var (--nugu-fg);
border : 2px solid
var (--nugu-line);
padding : 8px; }
23 24 #ui
- command
- menu {
position : absolute;
left :
0 ;
right :
0 ;
bottom :
100 % ;
border : 2px solid
var (--nugu-line);
background :
var (--nugu-bg); max
- height : 40vh;
overflow : auto; }
24 25 .ui
- command
- item {
display : block;
width :
100 % ;
padding : 6px 8px;
border :
0 ; border
- bottom : 1px solid color
- mix (
in srgb,
var (
-- nugu
- line)
35 % , transparent);
background :
var (--nugu-bg);
color :
var (--nugu-fg);
font : inherit; text
- align : left; }
25 26 .ui
- command
- item.is
- selected {
background :
var (--nugu-fg);
color :
var (--nugu-bg); }
extensions/ui/web/app.html.ts Modified 12 12 < div id
= "ui-shell" > 13 13 < header id
= "ui-status" > starting
</ header
> 14 14 < main id
= "ui-stream" aria
- live
= "polite" > </
main >
15 16 < details id
= "ui-digest" > digest empty
</ details
> 16 17 < form id
= "ui-composer" > 17 18 < div id
= "ui-input-wrap" > 21 22 < button id
= "ui-send" type
= "submit" > SEND
</ button
> extensions/ui/web/theme.css.ts Modified 27 27 * { box-sizing: border
- box; }
28 - body {
margin :
0 ; min
- height : 100vh;
background :
var (--nugu-bg);
color :
var (--nugu-fg); }
29 - #ui
- shell { min
- height : 100vh;
display : grid; grid
- template
- rows : auto 1fr auto auto; }
28 + body {
margin :
0 ; min
- height : 100vh;
height : 100vh;
overflow : hidden;
background :
var (--nugu-bg);
color :
var (--nugu-fg); }
29 + #ui
- shell { min
- height : 100vh;
height : 100vh;
display : grid; grid
- template
- rows : auto
minmax (
0 , 1fr) auto; }
30 30 #ui
- status { border
- bottom : 3px solid
var (--nugu-line);
padding : 4px 8px; font
- size : 11px; letter
- spacing : .08em; text
- transform : uppercase; }