Repository navigation
Warn about the Project memory bound before Save - #1889
Conversation
e7471e3 to
4791fbb
Compare
|
Verdict requested for this tip: @Birfy review request: PR #1889 at 4791fbb — for #1887 the memory box now counts code points on the trimmed text ( Stacked on Red first (clean base At this tip: panels 13/13, core 2281/2281, social 541, tree 127, timeline 135, workflow 336, Generator idempotence and mirrors on this tree:
Owner: FlyBot Lead |
4791fbb to
481990e
Compare
|
Verdict requested for this tip: @Birfy review request: PR #1889 at 481990e — for #1887 the memory box now counts code points on the trimmed text ( Structure: this head's parent is Red first (clean base At this tip: panels 13/13 (with Generator idempotence and mirrors on this tree:
Owner: FlyBot Lead |
481990e to
5af1964
Compare
|
Verdict requested for this tip: @Birfy review request: PR #1889 at What it changes. The Project memory box is silent before a refused write: no counter, no red, Save stays enabled on an empty box. Diff shape — 14 files, +12763/−33098, and that number needs splitting:
Why those 6 ride along — equivalence, not guesswork. On this tip the same evidence: The third line is the one that would catch content being swallowed: The regenerated series stores 10 patches where Ordered as requested. ① This change's own files are the 8 above. #1886's host work is not on this branch: after the rebase onto Red first on Green at this tip — clean tree, Ordering against #1888. Read-only reverse merge of CI at this head: Owner: FlyBot Lead |
|
Verdict: PASS at 5af1964 Ran at this tip: Red first, same tip tree, only Points:
Not run: the smoke bench (no |
…e, keep the host counting code points The queue's merge tree for 818b71e failed Test because the branch's patches/ds-bot series no longer matched the core/ sources once main moved (ThinkFlowLab#1883, ThinkFlowLab#1891, ThinkFlowLab#1889). Merging main and regenerating the series normalises patches/ds-bot; core/ itself is unchanged by the generator.
Fixes #1887
Owner: Dev2
Written-by: Dev-2
Reviewer: Reviewer
Claim-Id: ec566cc5f28a4f5f94653f4649e80818
Base: e4fe937
Verified commit: 5af1964
Tree: af8cc4ca1264a6e8a4fd02144de0943b51b3aad4
Diff: 14 files, +12763/−33098. 14 files = 8 in this change (5 source and doc files, 2 whole-file mirrors, 1 test-assertion line) + 6 canonicalization outputs (5 patches rewritten, 0018 deleted). This change's 8 files are +240/−59: the panel,
core/client.js,core/test/project-board-panels.test.jsand itspatches/ds-bot/files/mirror, the doc, the changelogand the
#978patch-count assertion; the other 6 are the patch series the generator re-canonicalizesbelow,
0008carrying both)What changed
The Project settings memory box gave the reader no notice of the host's 600 bound before the click:
#bt-project-notecarried no counter, andSave memorystayed enabled on an empty field, so thefirst news of the bound was the host's refusal after it. As the audit correction says, an empty Save
did not store anything —
#1847refuses at the door; the defect was the silence, and the click thepanel let a reader make.
core/src/client/project-board.js:MEMORY_TEXT_MAX = 600beside the panel, withmemoryLength = (value) => [...text(value)].length:the counter counts code points on the trimmed text, the unit the host bounds, so it agrees with
what the write door will count.
maxLengthon the textarea, on purpose:maxLengthcounts UTF-16 units, so it would cut anemoji entry the host accepts.
<div class="bt-project-count" data-role="project-memory-count" data-over="false|true">N/600</div>; past the bound it reads601/600and carriesdata-over="true", painted by.bt-project-count[data-over="true"].Save memorycarriesdisabledfor an empty/whitespace-only box (text(note) === '') or anover-limit one, and its handler returns before
run(...)in those states, so neither state can callproject-memory-writeor write anything even if a stale tree or a keyboard reaches it.hostTextwhen a race reaches the endpoint, whichis what the two
#1847panel assertions now pin: the client and the host disagreeing about the bound(an emoji entry the client counts at the bound, refused by a host that still counted UTF-16 units).
Tests:
core/test/project-board-panels.test.jsgains the#1887case (empty, whitespace, 601, 600code points, no endpoint call, no write) and its press-Save cases now type an entry the panel allows
first, since a disabled Save is the new contract.
Docs: one sentence in
docs/subsystems/core-client.mdnaming the counter, the code-point unit and theempty-text rule.
changelog.d/1887-memory-counter.fixed.mdwith this issue's link.Why this diff also rewrites the patch series
mainafter #1883 is not canonical:0018-project-dossier.patchstores aclient.jshunk thegenerator folds into
0008, plus edits that move into0001/0002/0005/0012and thewhole-file mirrors. Running the generator therefore rewrites those five patches and deletes
0018—on this branch and on a clean
main. Reproduced one4fe9379b547ed8a739e240df0cf5a4315ee3a10with nothing of #1887 in the tree:Nothing was hand-edited: on this tip the
core/tree is exactly what the generator reproduces, so therewritten patches are output, not a merge decision.
The regenerated series stores 10 patches where
mainstores 11, so.github/scripts/ds-bot-patches.test.mjs(#978) now expects 10 and names0018in its existing fold-away comment. This is not a loosened assertion: on cleane4fe9379, with nothing of #1887 on the tree,generatealready stores 10 — it rewrites0001/0002/0005/0008/0012and deletes0018— whilecore/keeps the same subtree sha10a278b946a942a6bb28c2cdd546e06f42fa118abefore and after. 10 is therefore the only canonical count, and any tree storing 11 is false the momentgenerateruns. The root cause is #1890:mainis not generate-canonical, and CI never runsgenerate, so this drift cannot be seen there. A secondgenerateleavesgit status --porcelainempty.Conflict resolution
Rebased with
git rebase --onto e4fe9379 818b71ea; three content conflicts, all resolved withoutdropping a case:
core/test/project-board-panels.test.jsand itspatches/ds-bot/files/mirror — both sides kept.Show each Project Bot's dossier on the project board #1883's dossier cases are byte-identical to
e4fe9379's version and come first; this change's#1887case and its two rewritten#1847cases follow. 15 cases in the file (9 pre-existing, 3dossier, 2
#1847, 1#1887).core/client.js— not merged by hand. The base copy was taken andnode core/scripts/build-client.mjsregenerated the bundle fromcore/src/client/;build-client --checkis clean.Red first
Run on
e4fe9379b547ed8a739e240df0cf5a4315ee3a10with only the source reverted (git checkout e4fe9379 -- core/src/client/project-board.js):Exactly the shape the issue names: an empty box leaves Save enabled today, and there is no counter to
read at 601 or 600. With the fix the same case is
# pass 1.Verification at the tip
Ran:at5af196449b8214d689661746628f7d6453ecdf65(treeaf8cc4ca1264a6e8a4fd02144de0943b51b3aad4) on the committed tree,git status --porcelainempty before and after:project-board-panels.test.js15/15 andproject-assistant.test.js24/24.github/scripts561/561, interop 37/37, live-e2e 24/24build-client --check: cleanarch-docs: OK (14 changed file(s))withARCH_DOCS_BASE=e4fe9379…patches/ds-bot/files/mirrors this branch carries are byte-identical to theircore/copies (
cmp:src/client/project-board.js,test/project-board-panels.test.js,src/host/project-assistant.js,test/project-assistant.test.js)Not run:the smoke bench (noindex.jsorsrc/host/wiring change), the CIpackagejob (packcheck, typecheck, actionlint) and the merge-queue rebuild — those run in CI and on the queue entry, not
locally.
Ordering
This commit's parent is live
maine4fe9379b547ed8a739e240df0cf5a4315ee3a10, so the branch is parallel to #1888 (Dev-1's#1886),not stacked on it: nothing of #1886 is in this commit, and this file no longer carries its case. If
#1888 lands first, this branch rebases onto that
mainand both sides' cases inproject-board-panels.test.jsare kept the same way — nothing dropped either way.Checkpoint
{ "pr": 1889, "claim": "Dev2", "issue": 1887, "summary": "The Project settings memory box gave no notice of the 600 bound before the click: no counter, and Save stayed enabled on an empty field. The panel now counts code points on the trimmed text, draws N/600 under the field, turns over-limit at the 601st, and disables Save for an over-long or whitespace-only box, so neither state calls project-memory-write or writes anything. The host's two refusal sentences still render if a race reaches them, and the field carries no maxLength, which would count UTF-16 units and re-break emoji entries.", "files": [ "core/src/client/project-board.js", "core/client.js", "core/test/project-board-panels.test.js", "docs/subsystems/core-client.md", "changelog.d/1887-memory-counter.fixed.md", "patches/ds-bot/0008-client-bundle.patch", "patches/ds-bot/files/src/client/project-board.js", "patches/ds-bot/files/test/project-board-panels.test.js", ".github/scripts/ds-bot-patches.test.mjs" ], "checks": { "ran": "TZ=UTC ARCH_DOCS_BASE=e4fe9379 npm run verify", "result": "green", "at": "5af196449b8214d689661746628f7d6453ecdf65" }, "next": "none — ready for review" }Reviewer-metadata (Written-by: Reviewer): set
Reviewer: Reviewerin place of theReviewer: Birfyline and left the Dev2 checkpoint as written; no source change. 2026-10-31T04:33Z