Skip to content

feat: decode escape sequences in error messages - #312

Merged
sajal-truefoundry merged 7 commits into
mainfrom
chore/AGE-1751/render-new-lines-in-error-messages-in-ui
Aug 18, 2026
Merged

sajal-truefoundry merged 7 commits into
mainfrom
chore/AGE-1751/render-new-lines-in-error-messages-in-ui

Conversation

@vinit-truefoundry

@vinit-truefoundry vinit-truefoundry commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Note

Low Risk
Display-only changes to error string formatting and alert styling; no API, auth, or persistence behavior changes.

Overview
API validation errors that arrive as literal \n and \t text (typical for Zod-style messages) are now turned into real line breaks and tabs before display.

getErrorMessage runs new decodeErrorMessageEscapes on extracted message strings. Decoding covers common JSON/C escapes (\n, \t, \r, \uXXXX, \xHH, etc.), normalizes CRLF, and skips full decode when the string already contains real control characters so mixed content stays safe.

The Save Agent modal error role="alert" block uses whitespace-pre-wrap (plus word-break/tab styling) so multi-line decoded text renders correctly.

Unit tests cover the decoder and Save Agent alert behavior; changeset notes a patch for @truefoundry/trueforge-ui.

Reviewed by Cursor Bugbot for commit 63e0fb9. Bugbot is set up for automated code reviews on this repo. Configure here.

@changeset-bot

changeset-bot Bot commented Aug 17, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 63e0fb9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@truefoundry/trueforge-ui Patch
frontend Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@sajal-truefoundry
sajal-truefoundry enabled auto-merge (squash) August 18, 2026 05:30

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 31b0776. Configure here.

@sajal-truefoundry
sajal-truefoundry merged commit 92ee970 into main Aug 18, 2026
7 checks passed
@sajal-truefoundry
sajal-truefoundry deleted the chore/AGE-1751/render-new-lines-in-error-messages-in-ui branch August 18, 2026 06:27
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