Skip to content

Improve severity labels in Actions logs and tweak colors#36993

Merged
wxiaoguang merged 10 commits intogo-gitea:mainfrom
silverwind:actlabels
Mar 26, 2026
Merged

Improve severity labels in Actions logs and tweak colors#36993
wxiaoguang merged 10 commits intogo-gitea:mainfrom
silverwind:actlabels

Conversation

@silverwind
Copy link
Copy Markdown
Member

@silverwind silverwind commented Mar 26, 2026

Add support for error, warning, notice, and debug log commands with bold label prefixes and colored backgrounds matching GitHub's style. Parse both ##[cmd] and ::cmd args:: formats.

Also improved the severity colors globally and added a devtest page for these.

Screenshot 2026-03-26 at 09 48 07 Screenshot 2026-03-26 at 09 48 20 Screenshot 2026-03-26 at 09 47 50 Screenshot 2026-03-26 at 09 47 38

Add support for error, warning, notice, and debug log commands with
bold label prefixes and colored backgrounds matching GitHub's style.
Parse both ##[cmd] and ::cmd args:: formats. Update error/warning
theme colors to match GitHub's hue.

Co-Authored-By: Claude (claude-opus-4-6) <noreply@anthropic.com>
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 26, 2026
@silverwind silverwind added type/enhancement An improvement of existing functionality topic/gitea-actions related to the actions of Gitea labels Mar 26, 2026
@silverwind silverwind requested a review from Copilot March 26, 2026 08:20
Co-Authored-By: Claude (claude-opus-4-6) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds richer parsing and rendering of GitHub Actions “severity” log commands so Actions job logs can display consistent labeled lines (and styling hooks) for error/warning/notice/debug.

Changes:

  • Extend Actions log command parsing to recognize ##[severity] and raw ::severity ...:: formats for warning/notice/debug (in addition to error).
  • Render severity lines with a bold label prefix (Error:, Warning:, etc.) and add per-line CSS classes for styling.
  • Tweak theme error/warning palette variables and update frontend unit tests for the new HTML structure.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
web_src/js/components/ActionRunView.ts Adds parsing for ::severity ...:: commands and injects severity label spans into rendered log messages.
web_src/js/components/ActionRunView.test.ts Updates expected HTML output and adds coverage for new severity parsing/rendering cases (partial).
web_src/js/components/ActionRunJobView.vue Adds per-line class names for severity and introduces new CSS rules for label styling and some severity visuals.
web_src/css/themes/theme-gitea-light.css Adjusts global --color-error-* and --color-warning-* theme variables.
web_src/css/themes/theme-gitea-dark.css Adjusts global --color-error-* and --color-warning-* theme variables.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread web_src/css/themes/theme-gitea-dark.css
Comment thread web_src/js/components/ActionRunView.ts Outdated
Comment thread web_src/js/components/ActionRunView.ts
Comment thread web_src/js/components/ActionRunView.test.ts Outdated
Comment thread web_src/js/components/ActionRunJobView.vue
Comment thread web_src/css/themes/theme-gitea-light.css Outdated
silverwind and others added 2 commits March 26, 2026 09:27
Co-Authored-By: Claude (claude-opus-4-6) <noreply@anthropic.com>
Error, success, and info backgrounds and borders were too faint
compared to warning. Make them similarly visible.

Co-Authored-By: Claude (claude-opus-4-6) <noreply@anthropic.com>
silverwind and others added 2 commits March 26, 2026 09:33
Co-Authored-By: Claude (claude-opus-4-6) <noreply@anthropic.com>
Use filter: saturate(2) for message headers instead of separate color
overrides. Match perceived lightness across all severity text colors.
Use Tailwind classes in devtest page. Increase saturation of light
theme severity backgrounds and borders.

Co-Authored-By: Claude (claude-opus-4-6) <noreply@anthropic.com>
@silverwind silverwind changed the title Handle all severity labels in Actions log lines Improve severity labels in Actions logs and tweak colors Mar 26, 2026
Co-Authored-By: Claude (claude-opus-4-6) <noreply@anthropic.com>
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Mar 26, 2026
silverwind and others added 2 commits March 26, 2026 10:20
…ateElement`

Move the saturate(2) filter from base.css to message.css to cover all
message types and remove the now-obsolete partial rule. Add color:
inherit for consistency. Use document.createElement instead of
createElementFromAttrs with null attrs.

Co-Authored-By: Claude (claude-opus-4-6) <noreply@anthropic.com>
Co-Authored-By: Claude (claude-opus-4-6) <noreply@anthropic.com>
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 26, 2026
@wxiaoguang wxiaoguang enabled auto-merge (squash) March 26, 2026 10:10
@wxiaoguang wxiaoguang merged commit d5a8980 into go-gitea:main Mar 26, 2026
26 checks passed
@wxiaoguang wxiaoguang deleted the actlabels branch March 26, 2026 10:18
@GiteaBot GiteaBot added this to the 1.26.0 milestone Mar 26, 2026
@wxiaoguang
Copy link
Copy Markdown
Contributor

You can see that if our framework is designed correctly (I made the changes to parseLogLineCommand, createLogLine and appendLogs in 0e9010d ), then AI can write clear and correct code.

@silverwind
Copy link
Copy Markdown
Member Author

silverwind commented Mar 26, 2026

Yes, it's clean-ish. Still I run Claude with max effort and always /simplify all changes to get good code. It's absolutely necessary.

@wxiaoguang
Copy link
Copy Markdown
Contributor

The color looks dirty (more grey) than before

image

@silverwind
Copy link
Copy Markdown
Member Author

silverwind commented Mar 28, 2026

Looks completely fine to me on that screenshot. Which color are you referring to? The only wrong think i spot there is the double top border.

@wxiaoguang
Copy link
Copy Markdown
Contributor

The blue color looks dirty.

Before

image

After

image

@silverwind
Copy link
Copy Markdown
Member Author

On my screen the hue of text and background seems to match, is that what you mean? The background is more intense, but I think that's fine.

If you want, I can make exact color copies from Primer (https://primer.style/product/components/banner/guidelines/#variant).

@wxiaoguang
Copy link
Copy Markdown
Contributor

The colors defined in https://primer.style/product/components/banner/guidelines/#variant are indeed much better and clearer

@silverwind
Copy link
Copy Markdown
Member Author

#37019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/gitea-actions related to the actions of Gitea type/enhancement An improvement of existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants