Repository navigation
Validate project description/instructions length (AZDO 4355) - #202
Merged
Merged
Conversation
The API rejects a project description or instructions over 10000 characters, but the edit page and create wizard had no check, so the server error showed under whichever section was open (or as a generic dialog on Create). Check both fields as the user types, show the error on the field that is too long (and an error icon on its tab), and block Save/Next/Create until fixed. The limit and message live in util/project-text.ts.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
shweta2101
approved these changes
Dec 2, 2026
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.
AZDO work item: https://dev.azure.com/TDEI-UW/db00fabb-4894-43f8-b5a2-e7bc9aa44334/_workitems/edit/4355
Problem
Saving the project edit page with a too-long Instructions section showed "String should have at most 10000 characters" under Project Description (whichever tab was open), implying the wrong field.
Root cause
The workspaces API caps project
descriptionandinstructionsat 10,000 characters (api/src/tasking/projects/dtos.py, create and update). The frontend had no check, so one Save sent both fields and the server's error was shown against the open section. The create wizard had the same gap and only failed at "Create Project" with a generic dialog.Changes
util/project-text.ts: the limit and a helper returning the error message (counts characters like the server).Testing
project-text.test.ts). ESLint clean on changed files.project-edit.spec.ts(2 tests) andproject-create.spec.ts(1 test) pass, and fail without the fix. Rest of the e2e suite not run.