Files
LLeMbas/src/lembas/web/templates/library/_layout.html
T
HomerandClaude Opus 5 201281d616 New markup over an old stylesheet
Reported from a desktop browser: a stray close button beside the logo, badly
drawn, and a page that would not scroll. None of it was in the code that was
running -- it was the code the browser had not fetched.

The worker caches /static/ under a cache named for the release while the files
in it carried no version, and a page is fetched network-first. That only ever
worked because the worker used to seize every open tab the instant it installed
and wipe the old cache. 1.1.0 stopped it doing that, rightly -- it was swapping
stylesheets out from under a streaming reply -- and a momentary mismatch became
a permanent one: new markup over the previous release's CSS for as long as the
old worker lived. `.sidebar__close` had no rule there, so `.btn--icon` made it
inline-flex: visible everywhere, placed by nothing.

Every /static/ URL carries the release now, written by `templating.asset` and
precached by `sw.js:versioned` -- both halves, because caches.match compares the
query too and precaching the bare path would cache entries nothing requests.
Self-correcting: updating is enough.

The header was also a brand with a button appended and margin-left:auto doing
the placing, which holds exactly while that button is last. Two slots now: a
brand that shrinks and truncates, and a rail on the trailing edge.

Verified before changing anything: with the current stylesheet the button is
display:none at 1280 and, with thirty chats and forty messages, both scrollers
scroll. The first measurement said the thread did not -- that was
scroll-behavior: smooth reporting where it started.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-25 18:16:24 +00:00

48 lines
1.6 KiB
HTML

{% extends "base.html" %}
{% from "_macros.html" import icon %}
{#
The library shell.
Keeps the chat sidebar rather than having its own like the admin area does:
administration is a different place, but a library is part of using the thing
— you go there mid-conversation to add a document and come straight back.
#}
{% block head %}
<link rel="stylesheet" href="{{ asset('css/chat.css') }}">
<link rel="stylesheet" href="{{ asset('css/admin.css') }}">
{% endblock %}
{% block body_attrs %} data-authenticated="true"{% endblock %}
{% block body %}
<div class="shell">
{% include "partials/sidebar.html" %}
<main class="main">
<header class="topbar">
{% include "partials/_sidebar_toggle.html" %}
<h1 class="topbar__title">{% block heading %}Library{% endblock %}</h1>
<div class="topbar__actions">{% block actions %}{% endblock %}</div>
</header>
<nav class="tabs__bar" aria-label="Library">
<a class="tabs__tab {{ 'is-active' if section == 'knowledge' }}"
href="/library/knowledge">{{ icon("archive", "icon--sm") }} Knowledge</a>
<a class="tabs__tab {{ 'is-active' if section == 'notes' }}"
href="/library/notes">{{ icon("pencil", "icon--sm") }} Notes</a>
<a class="tabs__tab {{ 'is-active' if section == 'skills' }}"
href="/library/skills">{{ icon("sparkle", "icon--sm") }} Skills</a>
<span class="spacer"></span>
<a class="tabs__tab" href="/settings">{{ icon("user", "icon--sm") }} Memory</a>
</nav>
<div class="admin-scroll">
<div class="admin-page">
{% block library_content %}{% endblock %}
</div>
</div>
</main>
</div>
{% endblock %}