Skip to content

fix ANSI code for secret#84

Merged
Jason2866 merged 2 commits intomainfrom
fix_secret
Apr 6, 2026
Merged

fix ANSI code for secret#84
Jason2866 merged 2 commits intomainfrom
fix_secret

Conversation

@Jason2866
Copy link
Copy Markdown
Owner

@Jason2866 Jason2866 commented Apr 6, 2026

Summary by CodeRabbit

  • New Features
    • Added blink and rapid-blink text effects for console output and extended ANSI escape handling to control blink and secret modes.
  • Style
    • Added CSS animations to render standard and rapid blinking.
  • Chores
    • Bumped package version, service worker cache identifier, and CI workflow action versions.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 6, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2cd085bf-3957-4485-b3ff-af449ac81d9c

📥 Commits

Reviewing files that changed from the base of the PR and between 207dc24 and 3ca44cc.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • .github/workflows/build_upload.yml
  • package.json
  • sw.js

📝 Walkthrough

Walkthrough

Added blink and rapidBlink formatting to the colored console, remapped ANSI escape codes (5→blink, 6→rapidBlink, 8→secret; 25/28 to disable), updated reset handling, and added CSS keyframes/classes for blinking. Also bumped package/workflow versions and updated service worker cache name and package metadata.

Changes

Cohort / File(s) Summary
Console color / blinking
js/util/console-color.js
Introduced blink and rapidBlink state flags, applied .log-blink / .log-rapid-blink span classes, adjusted ANSI escape code handling (0 clears blink/rapidBlink; 5→blink, 6→rapidBlink, 8→secret, 25 disables blink/rapidBlink, 28 disables secret), and added blink-related CSS (.log-blink, .log-rapid-blink, @keyframes blink).
CI workflow versions
.github/workflows/build_upload.yml
Updated GitHub Pages action major versions: actions/configure-pages v5→v6 and actions/deploy-pages v4→v5.
Package metadata / deps
package.json
Bumped package version 1.6.3→1.6.4 and upgraded several dev dependency versions; extended overrides entries.
Service worker cache
sw.js
Updated cache name from esp32tool-v1.6.3 to esp32tool-v1.6.4 used for install/activate cache logic.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I twitched my nose and gave a wink,

The console learned to blink and blink.
Codes remapped, the text took flight,
A rapid flutter—what a sight! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix ANSI code for secret' is specific and directly related to the main change, which reassigns ANSI escape codes and adds proper support for the secret formatting mode.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix_secret

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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
js/util/console-color.js (1)

251-261: Minor accessibility consideration for rapid blink.

The rapid-blink animation at 0.3s interval produces ~3.33 flashes/second, which slightly exceeds the WCAG 2.3.1 guideline of maximum 3 flashes/second. However, this is acceptable because:

  1. It follows the ANSI standard for rapid blink (code 6)
  2. Terminal emulators commonly implement it this way
  3. This is a developer console context where such usage is expected

Consider adding a prefers-reduced-motion media query as an optional enhancement for users with motion sensitivity:

♿ Optional: Respect reduced motion preference
  `@keyframes` blink {
    50% {
      opacity: 0;
    }
  }
+  `@media` (prefers-reduced-motion: reduce) {
+    .log-blink,
+    .log-rapid-blink {
+      animation: none;
+    }
+  }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@js/util/console-color.js` around lines 251 - 261, Add a
prefers-reduced-motion media query to the CSS so users who opt into reduced
motion won't see the blinking animations: wrap or override the .log-blink,
.log-rapid-blink animations (and their reliance on `@keyframes` blink) inside a
media query that disables animations or sets animation: none when
(prefers-reduced-motion: reduce) is active, leaving existing .log-rapid-blink
behavior unchanged for all other users.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@js/util/console-color.js`:
- Around line 251-261: Add a prefers-reduced-motion media query to the CSS so
users who opt into reduced motion won't see the blinking animations: wrap or
override the .log-blink, .log-rapid-blink animations (and their reliance on
`@keyframes` blink) inside a media query that disables animations or sets
animation: none when (prefers-reduced-motion: reduce) is active, leaving
existing .log-rapid-blink behavior unchanged for all other users.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c7128a81-f70e-4896-8d02-eade30da9156

📥 Commits

Reviewing files that changed from the base of the PR and between f11d993 and 207dc24.

📒 Files selected for processing (1)
  • js/util/console-color.js

@Jason2866 Jason2866 merged commit 018f859 into main Apr 6, 2026
2 of 3 checks passed
@Jason2866 Jason2866 deleted the fix_secret branch April 6, 2026 11:33
@coderabbitai coderabbitai Bot mentioned this pull request Apr 23, 2026
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.

1 participant