Fix the two checks the full run 304 found red
game-maker / gate (push) Successful in 3m42s
game-maker / suite (push) Successful in 14m23s

The full CI run on 4c7861b had two red checks. Neither showed when
only the touched modules ran, because each needs a module before it.

- e2e 40c-iii (#347): a stroke on a tilemap drew the captions
  "Comment" and "Held" again. They are a note and a group that e2e 36
  leaves in a graph. AnnotationView gave its caption a new TextStyle
  on every redraw, and Pixi draws a text again for a new style. The
  graph redraws on every edit of the project. The caption now keeps
  its style while colour and width stay the same.
- e2e 49a: a plain user deleting a shared file got 404 instead of
  403. Since #344 the DELETE route asked whether the file exists
  before whose it is. It now refuses a stranger first, so another
  folder tells them nothing. The wiki's API page says so.

Tests:
- Unit annotation-view (new): 2 green, counter-check 1 red
- e2e 36,39,40,49 (melektaus-atx): both checks green, 49 then hit a
  harness timeout (CDP Network.enable) once
- e2e 49 alone (melektaus-atx): ALL PASSED - 22 checks
- Gate (melektaus-atx): CHECK EXIT 0, 261 files, 4040 tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Opus 5.5 committed 2026-10-07 17:26:35 +02:00
1 parent 4c7861b5b8
commit 8154569405
3 files changed
+48 -4

No files matched your search

+9 -1
View File
@@ -18,6 +18,8 @@ const PAD = 8;
export class AnnotationView extends Widget {
private readonly box = new Graphics();
private readonly caption: Text;
/** Colour and width of the caption's style, see `redraw`. */
private styleKey = '';
selected = false;
constructor(
@@ -105,7 +107,13 @@ export class AnnotationView extends Widget {
.lineTo(this.w - 2, this.h - RESIZE_HANDLE / 2)
.stroke({ width: 1, color: text, alpha: 0.5 });
this.caption.style = this.captionStyle(text);
// A new style draws the caption again even when nothing changed, and the graph redraws on every
// edit of the project, a stroke on a tilemap included (#347). So only a new colour or width sets one.
const styleKey = `${text}|${this.w}`;
if (styleKey !== this.styleKey) {
this.styleKey = styleKey;
this.caption.style = this.captionStyle(text);
}
this.caption.text =
this.kind === 'group'
? truncate(this.annotation.text, this.caption.style, Math.max(this.w - PAD * 2, 1))