Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/web/lisa-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1120,10 +1120,12 @@ if (fnSearchBtn && fnFind) {

// Right panel manual collapse (F4) — wide-screen only concern: the ≤1180px
// media query hides the panel regardless. Persisted; the fnbar button shows
// an active tint while collapsed.
// an active tint while collapsed. Collapsed is the DEFAULT: the panel only
// stays open once the user has explicitly opened it ("open" in localStorage),
// so a fresh profile boots into the two-column chat-first layout.
{
let collapsed = false;
try { collapsed = localStorage.getItem('lisaRightbar') === 'collapsed'; } catch (e) {}
let collapsed = true;
try { collapsed = localStorage.getItem('lisaRightbar') !== 'open'; } catch (e) {}
const applyRb = () => {
document.body.classList.toggle('rb-collapsed', collapsed);
const btn = document.getElementById('fnPanel');
Expand Down
4 changes: 3 additions & 1 deletion src/web/lisa-css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2416,7 +2416,9 @@ export const MAIN_CSS = ` :root {
/* Hide the legacy pixel send icon; the text label is enough in the new theme. */
#sendBtn img { display: none; }

/* ── Manual right-panel collapse (F4, persisted client-side) ──── */
/* ── Manual right-panel collapse (F4, persisted client-side) ────
Collapsed is the DEFAULT state; the class is only absent once the user
has explicitly opened the panel (lisaRightbar === "open"). */
body.rb-collapsed .frame {
grid-template-columns: 300px 1fr;
grid-template-areas:
Expand Down
10 changes: 8 additions & 2 deletions src/web/lisa-html-snapshot.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,16 @@ import { MAIN_HTML } from "./lisa-html.js";
* #tabStrip); nodes now carry data-* attributes only
* (runDelegatedAction dispatches approve/deny/send/output/cancel/adopt/
* stream/open-lisa/close-stream).
* Then: the right panel now defaults to COLLAPSED — the lisaRightbar check
* inverted (open only when the value is literally "open", so an unset key
* reads as collapsed), and a tiny boot <script> right after <body> stamps
* body.rb-collapsed before .frame is parsed so a fresh profile never flashes
* the 3-column layout while the big inline bundle at the end of <body> is
* still loading. #fnPanel still toggles and persists it.
*/
const EXPECTED_LENGTH = 307402;
const EXPECTED_LENGTH = 308201;
const EXPECTED_SHA256 =
"8c08d262b17ca6251b05e0430c06fd54482d2803482e317cad59a29bdc9590af";
"08a2d262d3ccbc01c761bb4562bfc47c673650725f050105dbc8a36741b700ba";

test("MAIN_HTML length is byte-identical to the pre-split snapshot", () => {
assert.equal(MAIN_HTML.length, EXPECTED_LENGTH);
Expand Down
9 changes: 9 additions & 0 deletions src/web/lisa-html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@ ${MAIN_CSS}
</style>
</head><body>

<!-- Right-panel default = COLLAPSED. Applied here, before .frame is parsed,
so a fresh profile never flashes the 3-column layout during the long tail
of inline JS at the end of <body>. MAIN_CLIENT_JS re-applies the same
class idempotently and owns the toggle from then on. -->
<script>
try { if (localStorage.getItem('lisaRightbar') !== 'open') document.body.classList.add('rb-collapsed'); }
catch (e) { document.body.classList.add('rb-collapsed'); }
</script>

<div class="frame">

<!-- ╔════════════════ Title bar (drag zone) ════════════════╗ -->
Expand Down