Repository navigation
Description
Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.
Written-by: FlyBot Lead
Claimed-by: FlyBot Lead
Claim-Id: ec566cc5f28a4f5f94653f4649e80818
Branch: dev/2-p258-memory-counter
Base: 575accc
At: 2026-10-31T02:54:52Z
What happens today
The assistant-memory composer in core/src/client/project-board.js:676-682 gives the reader no notice of the 600 bound before the click:
- the textarea (
#bt-project-note) has nomaxLengthand noN/600counter; Save memorystays enabled with an empty field, so the only feedback is the host refusal after the click (A Project memory entry needs text, The memory box accepts empty and over-long text and reports Memory saved., while the assistant's own writer refuses both #1847/The memory box accepts empty and over-long text and reports Memory saved., while the assistant's own writer refuses both #1881);- typing past the bound looks exactly like a valid entry until Save refuses with
A Project memory entry is at most 600 characters.
One correction to the audit wording, so the red-first pins the true shape: an empty Save does not store anything today — the store refuses at the door (#1847). The defect is that the button stays enabled and nothing warns before the click. A test that claims "empty write lands" would be red for the wrong reason.
Expected
- A live counter under the field,
N/600, counting code points so it agrees with the host (core-host: count a Project memory entry in code points, not UTF-16 units #1886 fixes the host to code points). Do not usemaxLength: it counts UTF-16 units and would re-break emoji entries inside 600 characters. - Over the bound: the counter (and the Save button) shows the over-limit state before the click, and Save is disabled.
- Empty (or whitespace-only) text: Save is disabled.
- Neither state calls the endpoint or writes anything; the existing refusal text still renders if a race reaches the host.
- One sentence in the client docs (
docs/subsystems/…) naming the counter and the empty-text rule.
Red first (must be red on 575accc6)
One panel test, no host write needed:
- empty field → the Save button is disabled (today: enabled);
- 601 code points (emoji, not ASCII filler) → a counter reads
601/600and Save is disabled (today: neither exists); - 600 code points → counter reads
600/600, Save enabled; - the panel renders both states without an endpoint call.
Scope
core/src/client/project-board.js, core/test/project-board-panels.test.js, the client doc, the patches/ds-bot/files/… mirror, one changelog.d fragment with this issue's link.
Not in scope: any change to the bound or its message (that is #1886), grapheme clusters, the metrics panel.
Ordering
core/test/project-board-panels.test.js is also touched by #1886 (the memory-bound case). This branch must rebase on the #1886 PR tip before pushing, keeping both hunks — no parallel edits to the same file without that rebase.
Dedup
Closed-issue search for maxLength / counter / memory box found no issue for advance notice; #1881 fixed the false "Memory saved." after a refusal, not the warning before it.
Verification
Touched suites green at the tip, patches check three lines ok, mirror byte-identical (cmp), base 575accc6.
Activity
Warn about the Project memory bound before the Save (ThinkFlowLab#1887)
Warn about the Project memory bound before the Save (ThinkFlowLab#1887)
Warn about the Project memory bound before the Save (ThinkFlowLab#1887)
Warn about the Project memory bound before Save (ThinkFlowLab#1889)
HugoXK commentedon Oct 31, 2026
Release
Written-by: FlyBot Lead
Released: ec566cc5f28a4f5f94653f4649e80818
Reason: merged as d92fe89 via PR #1889
At: 2026-10-31T04:59:22Z