A phone, and how much of this could not be used on one

The sidebar was a 280px panel laid over the page below the phone breakpoint,
opened from first paint, with the only control that closed it underneath it --
and that control existed on /chat and on none of the seven other pages carrying
a sidebar, Settings included. It starts closed at that width now, slides, dims
the page behind it, and closes by tapping beside it, by Escape, or by its own
button, which is inside the drawer where it can be reached.

Everything a finger has to hit was 36px, or 28 for renaming a chat, every action
on a message and every panel's close button. Raising --control-h under a coarse
pointer is the only fix that reaches all forty of them, which is what that token
is for. The row and message actions were also hover-only, so on a phone they did
not exist at all.

Installing: the splash and the browser chrome follow the instance's theme rather
than always being Moria's near-black; there are screenshots, so the install
offer is a dialog rather than a one-line bar; a new release no longer takes over
a page somebody is reading; the notification badge is a silhouette rather than a
grey square; and a browser rotating its own subscription no longer ends
notifications for good.

Every request now says it is happening -- nothing did before, so anything slower
than a few milliseconds looked like a click that had not registered.

A chat can be archived. The column has been filtered on in four places since
folders arrived and written by nothing, which is what made it look built.

chat.css may contain media queries. The ban protected the composer toolbar from
being "fixed" with a breakpoint; that guarantee is asserted directly now, and
the old test would have passed a version of the file that wrapped the toolbar
without one.

scripts/shoot.py is the instrument all of this was found with: it renders a page
through TestClient into a real headless browser at a real size and refuses to
run if an asset URL was left pointing at testserver.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-25 13:39:35 +00:00
co-authored by Claude Opus 5
parent 92070d7879
commit 28390095a9
44 changed files with 2290 additions and 135 deletions
+33
View File
@@ -1987,6 +1987,21 @@ async def update_chat(request: Request, db: Db, user: RequiredUser, chat_id: str
folder = db.get(Folder, wanted) if wanted else None
chat.folder_id = folder.id if folder is not None and folder.user_id == user.id else None
# Out of the way, and reversible.
#
# `Chat.archived` has been filtered on in four places since folders arrived
# and written by nothing anywhere -- so the hiding worked, the archiving
# did not, and the column read as a built feature to anyone who grepped for
# it. Here rather than as its own endpoint because it is a property of the
# chat, exactly like its title and its folder, and `update_chat` already
# reads the raw form for the reason this field needs too: absent must mean
# "leave it alone" and "0" must mean "put it back".
archived_changed = False
if "archived" in form:
wanted = str(form["archived"]).strip() not in ("", "0", "false")
archived_changed = wanted != chat.archived
chat.archived = wanted
# The mode is the one agent field that changes mid-chat: it decides what
# gets asked about, not what the conversation is.
if "agent_mode" in form:
@@ -2100,6 +2115,24 @@ async def update_chat(request: Request, db: Db, user: RequiredUser, chat_id: str
return HTMLResponse(
templates.get_template("chat/_title_oob.html").render({"chat": chat})
)
# Archiving moves a row out of one group and into another, so the sidebar
# has to be re-rendered -- and it cannot be, from a 204. htmx's own config
# is `{code: "204", swap: false}`, so a control aimed at `#sidebar-tree`
# with this endpoint's usual answer sets the column and then does visibly
# nothing at all, which is this codebase's signature failure rather than a
# new one. The same fragment and the same `oob` the sidebar switch returns,
# for the same reason: New chat lives above the tree and comes along out of
# band.
if archived_changed:
from lembas.api.pages import sidebar_context
return templates.TemplateResponse(
request,
"partials/_sidebar_tree.html",
{"chat": None, "user": user, "oob": True, **sidebar_context(db, user)},
)
return Response(status_code=status.HTTP_204_NO_CONTENT)