fix: remove 80-char truncation of executed statement in changelog viewer by kate1128 · Pull Request #21276 · bytebase/bytebase · GitHub
Skip to content

fix: remove 80-char truncation of executed statement in changelog viewer - #21276

Open
kate1128 wants to merge 3 commits into
bytebase:mainfrom
kate1128:fix/sdl-statement-truncation
Open

kate1128 wants to merge 3 commits into
bytebase:mainfrom
kate1128:fix/sdl-statement-truncation

Conversation

@kate1128

@kate1128 kate1128 commented Aug 28, 2026 •

Copy link
Copy Markdown

fix: remove 80-char truncation of executed statement in changelog viewer

Fixes #21318

Problem:

When using SDL (Schema Definition Language), the executed statement in the changelog detail page is truncated to 80 characters with "..." appended.
SDL statements are typically very long (e.g., full CREATE TABLE), making them unreadable.

Root Cause:

getCommandExecuteDetail in frontend/src/components/task-run-log/model.ts hardcodes a 80-character truncation.

Fix:

Removed the truncation entirely. The statement is now rendered in full, and CSS (break-words, overflow: auto) handles long text naturally.

Verification:

  • pnpm check passed
  • 474 test files, 3855 test cases all passed

Screenshots

After fix - changelog detail page showing the full statement:
image

@kate1128
kate1128 requested a review from a team as a code owner August 28, 2026 14:48
@cla-bot

cla-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown

@cla-bot

cla-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement, and we don't have yours on file. In order for us to review and merge your code, please sign CLA and add your name to contributors list.

@sonarqubecloud

Copy link
Copy Markdown

The getCommandExecuteDetail function was hardcoding a 80-character
truncation on the SQL statement, appending '...' for longer statements.
This made SDL (Schema Definition Language) changes unreadable in the
changelog detail page since SDL statements are typically very long.

Removed the truncation entirely; CSS (break-words, overflow: auto)
handles long text naturally.
@kate1128
kate1128 force-pushed the fix/sdl-statement-truncation branch from 0ac582a to f919abf Compare September 2, 2026 12:34
@zchpeter

zchpeter commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Hi @kate1128 , as suggested in the related issue #21318 , the current approach will break our UIUX design principles for long statement. We have filed an internal ticket for a design to solve this problem

zchpeter added a commit that referenced this pull request Sep 18, 2026
The log cuts every executed statement to 80 characters inside the model, so
nothing downstream can show or copy the rest. #21276 removes the cut but keeps
the whitespace collapse above it, which turns a wide CREATE TABLE into one
run-on line inside a 200px box.

The doc lands on one rule: the model returns both forms of an entry, the line
the row shows and the text that line stands for, and destroys neither.
Truncation becomes CSS on the line; copy and unfold act on the text. A
statement row folds by default and unfolds in place with its original
formatting; an error row stays open, because an error is why the log was
opened.

Implementation follows in a separate PR.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-09T02:05:10.020672Z 3a2fa52 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

This branch has not been deployed

No deployments
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.

fix: executed statement truncated to 80 chars in changelog detail page

2 participants