Conversation
- The field gave no feedback on the 20,000-character limit: a user learned of it only from the daemon's error after pressing Save, with no way to tell how far over a pasted text was. - The counter counts Unicode code points, as the daemon does, so an emoji outside the BMP counts as one and the two never disagree; a maxLength attribute counts UTF-16 units and would cut a paste. - Neither typing nor a paste is held at the limit: the field marked in red with Save disabled is the only guard, as triage settled, and a text of exactly 20,000 characters stays savable, with only the counter in the error style. - The counter's text names the limit in words at and over it, so the error style does not rely on color alone. Closes #982
Contributor
Author
|
Approve. No blocking finding. Each acceptance criterion of #982 and each point the owner settled in its triage is met:
Standards: styles use design tokens only, no animation, file names unchanged, nothing cites a private record. Checks Notes:
|
lpiedade
marked this pull request as ready for review
November 16, 2026 13:48
Contributor
Author
|
Merging at |
This was referenced Nov 16, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #982
Summary
The general system prompt's field in Settings → AI tools now shows a live character counter under the text area and
blocks a save past the 20,000-character limit, as the issue's settled answers ask.
1,234 / 20,000, numbers formatted for the interface's language, updated on every change, a pasteincluded. It counts Unicode code points (
Array.from(text).length), as the daemon'sutf8.RuneCountInStringdoes,so an emoji outside the BMP counts as one. There is no
maxLength, which counts UTF-16 units.state: the field is marked in red (
field--error,aria-invalid), with a message saying to shorten the text, andSave is disabled until the text is trimmed. That covers a value saved before this change or set through the API.
limit it takes the error style, and its text says so in words (
· limit reached,· over the limit), so the cuedoes not rely on color alone. At exactly 20,000 characters only the counter changes: the field stays unmarked and
Save stays enabled.
settings.systemPromptCount,…CountAtLimit,…CountOver,…TooLong) in en-US, pt-BR, and es-ES. Placeholders are{{used}}and{{limit}}, not{{count}}, which i18nextwould read as a plural selector.
.field__countand.field__count--errorinapp.css, from the design tokens only.The issue names
SettingsScreen.tsx, butSystemPromptFieldnow lives inscreens/settings/AgentsSection.tsx, sothe change is there. The daemon's refusal is still shown on the field, but over-limit text can no longer reach it
through Save. The test of that path now has
api.updateSettingsreject, so it no longer relies on the stand-indaemon's length check.
Tests
Tests: passed
pnpm -C desktop typecheck: passed.pnpm -C desktop test(the interface's whole unit suite, run once): 54 files, 1077 tests passed. These include thenew cases in
SettingsScreen.test.tsx:no
maxlengthattribute;field unmarked, Save enabled, and the text saved;
deleting the character unmarks it;
i18n.test.ts(same keys and placeholders in every locale) anddesign.test.ts(token-only styles) ran in thatsuite and passed.
Pending
Nothing.
Managed by HarmFlow task queue-implement.