Repository navigation
fix(platform): close the task-limits review round after #3689 - #3749
Merged
Merged
Conversation
The REST task door answered a saved but undeployed automation with `"<slug>" has no deployed version — …`, repeating the automationSlug or workflowSlug the caller sent, and said AUTOMATION_PROJECT_FORBIDDEN as "this project" where the automations store says "that project". The refusal guard never saw it: it read ProjectError and AutomationError only in domains/tasks/ and in the domain functions a door reaches, never in the other door files themselves. The guard now judges every refusal a TASK_DOORS file builds and pins that it reads the REST door's three automation refusals. The not-deployed sentences are static per door (intake, start, review), and both forbidden sentences read alike. Docs, error-code register and the integration journey follow. Refs TALE-75, follow-up to #3689.
The description cap put the draft's running length into the field's error, which the Textarea renders as a live role="alert" region and shakes on every new sentence: past the cap each keystroke was announced again, so TASK-B11's "a screen reader announces it once" could not hold. The error is now the cap sentence a server refusal toasts (tasks.errors.TASK_DESCRIPTION_INVALID) and changes only when the draft crosses the cap; the length moves in the Textarea's own used / max counter, outside the live region, in the description editor and the create form alike. The retired tasks.fields.descriptionTooLong key leaves every catalog. A test pins the inline title's 200 cap. Refs TALE-75, follow-up to #3689.
The task pages said nothing about the board's caps: a title takes up to 200 characters, a description up to 20,000 (most emoji count as 2), and a longer description, pasted or left by an earlier import, is not cut but holds Create task and Save until it is shortened. EN, DE and FR. Refs TALE-75, follow-up to #3689.
The GitHub and GlitchTip importers pre-cut a task's description at a local 50,000 code units with a raw slice, under a comment that called it the limit the app's task API accepts. The board's cap is 20,000, so the local bound was a divergent second copy that no longer held, and a code-unit slice can end on half an emoji. They now seed the description with truncateImportedDescription, the task domain's own grapheme-safe cut, so a run carries what the task will hold. The source snapshot keeps its 100,000 limit. Refs TALE-75, follow-up to #3689.
A mock body can only throw, so a test run of task.upsert or
task.upsert_issues reports the domain's empty-title sentence under
MOCK_BODY_FAILED ("the task.upsert mock body failed: …"), while a live
run answers INPUT_INVALID with the sentence alone. The connector and the
automation reference said the mocks refuse alike; they now say how the
code differs, and a dispatcher test holds it.
Refs TALE-75, follow-up to #3689.
The refusal guard admits AUTOMATION_INPUT_INVALID's first problem as "a path and a rule, never a value", yet the rule is Ajv's own reason and can quote the stored inputs schema: `must match pattern "^[A-Z]"`, a bound. The admission now says so and why it may travel (the automation author's contract with whoever starts it, naming no person, no other task and nothing the caller sent), and a schema test pins both halves: the pattern is quoted, the refused value is not. Refs TALE-75, follow-up to #3689.
#3689 moved the light --destructive token from red-500 to red-700 inside a task-limits fix, and the squash hid it. Record the decision where the token map lives: the one token colours error text and destructive fills, red-500 stays under 4.5:1 as text on the page and under white button text, and the design intent's button.danger.bg still reads red-500 until the design sources follow. Refs TALE-75, follow-up to #3689.
The counter printed raw digits (20005 / 20000) beside an error that names the cap in the reader's number format, and no field referenced it. It now formats both numbers in the UI language, joins the field's aria-describedby (read on focus, still no live region), and takes a caller-measured counterValue, so a caller that saves the value trimmed counts it trimmed.
The EN/DE/FR task pages state the title (200) and description (20,000) caps by hand. A guard now reads each page for both numbers in its locale's format, so a cap that moves without its page fails; the pages join the platform test task's turbo inputs.
The over-cap counter showed the raw textarea length while the cap and the save measure the trimmed draft, so surrounding whitespace overstated what was left to delete. The description editor and the create form now hand the Textarea the trimmed length. The create-form test also holds the alert to one node and no new shake across a keystroke past the cap, and TASK-B11 expects the grouped counter read on focus.
Red-500 is 3.67:1 on the page (3.76:1 was white), 3.60:1 under the button's 98% foreground; red-600 is 4.71:1 on the page and 4.39:1 on --muted.
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.
Follow-up to #3689 (TALE-75), which merged before its first review round was addressed. This PR closes the findings that review raised.
What changes
The REST task door no longer repeats the slug the caller sent.
AUTOMATION_NOT_DEPLOYEDon task intake, task start and a review's request for changes used to say"<slug>" has no deployed version — …. Each door now has its own fixed sentence.AUTOMATION_PROJECT_FORBIDDENnow reads "that project" at both throw sites (automations/store.ts,rest/v1-tasks.ts). The refusal guard (domains/tasks/errors.test.ts) had missed the slug because it readProjectError/AutomationErroronly underdomains/tasks/and in the domain functions a door reaches. It now also reads everyTASK_DOORSfile, and it pins that the REST door's three automation refusals are read. With the old sentence restored, the guard fails. The EN/DE/FR API reference,error-codes.mdand the integration journey are updated to match.A description over the cap no longer re-announces on every keystroke.
The field's error is a live
role="alert"region, and theTextareashakes each time its text changes. Because that text held the running length, every keystroke past the cap triggered a new announcement. The error is now the cap sentence the server refusal toasts (tasks.errors.TASK_DESCRIPTION_INVALID), and it changes only when the draft crosses the cap. The length moves in theTextarea's ownused / maxcounter (counterMax), which is not a live region. This applies to both the description editor and the create form.tasks.fields.descriptionTooLongis removed from every catalog. New tests check that the alert keeps the same node and the same text across keystrokes past the cap. A render test pins the inline title'smaxLengthat 200.TASK-B11is updated.Task docs state the caps.
docs/{en,de,fr}/platform/projects/tasks.mdnow give the title limit (200) and the description limit (20,000; most emoji count as 2). They also say that a longer description holds Create task / Save until you shorten it.The issue importers use the domain's own cut. Both importers used a local 50,000-unit
.slice, a second copy of the cap that no longer matched it. They now calltruncateImportedDescription, which cuts at 20,000 on a grapheme boundary. The source snapshot keeps its 100,000 limit.Mock vs live blank-title refusal is now documented and tested. A mock body can only throw, so a test run reports the empty-title sentence under
MOCK_BODY_FAILED, while a live run answersINPUT_INVALID.connector.ymlandreference/automation.mdnow say this, and a dispatcher test checks it.The ADMITTED reason for
AUTOMATION_INPUT_INVALIDis corrected. It used to say the sentence never quotes the stored schema. It now says it can: Ajv's rule may quote the inputs schema, for example a pattern or a bound. It also states why that may travel. A schema test checks that the pattern is quoted and the refused value is not.Design token decision recorded. #3689 changed the light
--destructivetoken from red-500 to red-700, which recolours every destructive button, badge and alert across@tale/uiconsumers. The squash commit title did not mention it.design/docs/tokens.mdnow records the decision and flags that the design intent'sbutton.danger.bgstill reads red-500.Not changed
task.<action>:prefix:refuse()adds one only to list zod issues, and the file's other refusals don't carry it either.MAX_LABEL*constants: the pickers already importTASK_LABEL_CHARS_MAX.Checks run locally
tsc --noEmiton the platformlint:manualandcheck-guide.tson the tasks suitemaxLengthReview round 1
AUTOMATION_NOT_DEPLOYEDsentence names the slug (scripts/openapi/spec.ts, regeneratedpublic/openapi.json).AUTOMATION_PROJECT_FORBIDDENsentence.AUTOMATION_NOT_BOUND_SENTENCE(domains/automations/store.ts) is used at both throw sites, and the REST intake test pins the 403 body.RestRefusals andFolderErrors a door's own file builds, withtask.statusand the folder domain's static rethrows admitted and their reasons given.@tale/uiTextareaformatsused / maxin the UI language, adds the counter to the field'saria-describedby(still not a live region), and takes a caller-measuredcounterValue. The task description editor and create form pass the trimmed length that the cap and the save use, so surrounding whitespace no longer inflates the count. The create-form test now checks that the alert keeps the same node and that no new shake starts on a keystroke past the cap.TASK-B11is updated.backend/core/tasks/limits_docs.test.tschecks that the EN/DE/FR task pages state both caps in their locale's number format. The pages are now@tale/platform#testturbo inputs, with the guard entry added.design/docs/tokens.mdnow lists every intent token that is still lighter than the shipped red, says why red-700 was chosen over red-600, and corrects the contrast figures.Each new test was checked to fail without its fix.
backend:integrationRun against a fresh
tale-dbcontainer and a fresh MinIO:checkConversationApi(500 !== 200). Seven REST lanes failed. Most of their requests got429 RATE_LIMITED, round d of the journey included, and the rate-limit attribution lane itself failed (valid key from burned source → 400). This PR does not change rate limiting or the conversation API. I have not confirmed whethermainfails the same way on this machine.checkRestMachineJourney: REST task owner refusals + trigger health on the listing (round d) passes. It holds the edited assertions (no deployed version, and the slug is not repeated). The lane then threw later, in a step that depends on an earlier lane.checkRestDoor,checkRestMachineJourney: round d passes again. The journey's upload and file steps fail without the object store that an earlier S3 lane seeds.checkRestDooralso fails in this filtered run, although no value in its summary reads false.