Skip to content

Validate project description/instructions length (AZDO 4355) - #202

Merged
shweta2101 merged 1 commit into
developfrom
issue-4355
Dec 2, 2026
Merged

shweta2101 merged 1 commit into
developfrom
issue-4355

Conversation

@sureshgaussian

Copy link
Copy Markdown
Contributor

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 description and instructions at 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).
  • Edit page: both fields checked as you type. The error shows under the field that is too long, the tab gets an error icon, and Save is disabled with a sidebar hint.
  • Create wizard: same inline errors on the Details (description) and Settings (instructions) steps. Next, Create Project and the stepper jump to Review are blocked until fixed.

Testing

  • Unit: 805 passed (new project-text.test.ts). ESLint clean on changed files.
  • e2e (new): project-edit.spec.ts (2 tests) and project-create.spec.ts (1 test) pass, and fail without the fix. Rest of the e2e suite not run.
  • Wizard Instructions error has no e2e (reaching that step needs an uploaded area); it relies on the shared helper and the same pattern as the edit page.

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.
@coderabbitai

coderabbitai Bot commented Dec 1, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b94b6323-7ffd-4a63-a09b-3496c4d9d62b
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@shweta2101
shweta2101 merged commit 92bceea into develop Dec 2, 2026
2 checks passed
@shweta2101
shweta2101 deleted the issue-4355 branch December 2, 2026 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants