Trim needless comments and fix the picker width

Remove comments that only restate the code, keeping the section banners
and the notes that carry a reason, a measured fact or an external
contract.

ButtonOptions.width claimed to be a fixed width but only set minWidth,
so the Graph and Texture pickers grew with the name they showed. It is
now what it promises, with a separate minWidth for the buttons that have
two forms. Narrow buttons shrink their padding, otherwise a 24px icon
button had 8px left for its glyph and truncate dropped it entirely.

__gm.labelsDropped() guards that class: the overflow guard only saw text
that was too wide, never a label truncated to nothing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
rootandClaude Opus 5 committed 2026-09-08 15:52:05 +02:00
1 parent f16801aef3
commit 4d84231b9f
115 files changed
+707 -1564

No files matched your search

+3 -8
View File
@@ -1,11 +1,7 @@
import { statusMessage } from './http';
import type { StoredTexture, TextureStore, UploadedTexture } from './TextureStore';
/**
* Talks to the texture routes of `api/index.php`. Routing goes through the `r` query parameter
* (`?r=textures/{file}`) for the same reason as `HttpProjectStore`: nginx does not pass
* PATH_INFO to PHP.
*/
/** Routing goes through the `r` query parameter because nginx does not pass PATH_INFO to PHP. */
export class HttpTextureStore implements TextureStore {
constructor(private readonly endpoint: string) {}
@@ -21,7 +17,6 @@ export class HttpTextureStore implements TextureStore {
await this.request<void>('DELETE', `textures/${encodeURIComponent(file)}`);
}
/** One round trip; every failure becomes an `Error` carrying the server's message. */
private async request<T>(
method: string,
route: string,
@@ -39,8 +34,8 @@ export class HttpTextureStore implements TextureStore {
try {
data = text ? JSON.parse(text) : null;
} catch {
// An upload is exactly the request nginx refuses before PHP sees it, and its answer is
// an HTML page. Explain such a failure from the status; a successful non-JSON body is a defect.
// An upload is the request nginx refuses before PHP sees it, answering with an HTML page,
// so a failure is explained from the status instead.
if (response.ok) throw new Error(`API ${method} ${route}: invalid JSON (${response.status})`);
data = null;
}