Skip to content

[#2363] Added colour to ahoy confirm.#2366

Merged
AlexSkrypnyk merged 1 commit intomainfrom
feature/2363-add-colour-confirm-ahoy
Mar 12, 2026
Merged

[#2363] Added colour to ahoy confirm.#2366
AlexSkrypnyk merged 1 commit intomainfrom
feature/2363-add-colour-confirm-ahoy

Conversation

@AlexSkrypnyk
Copy link
Member

@AlexSkrypnyk AlexSkrypnyk commented Mar 12, 2026

Closes #2363

Summary by CodeRabbit

  • Style
    • Enhanced interactive confirmation prompts with colorized formatting: the prompt text is highlighted and the “[y/N]” hint is dimmed for clearer emphasis, and the echoed confirmation line uses matching color styling. This improves readability and user experience during command-line confirmations without changing behavior or validation.

@coderabbitai
Copy link

coderabbitai bot commented Mar 12, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 39ef4633-db8a-49a9-a67e-79744a0740e2

📥 Commits

Reviewing files that changed from the base of the PR and between d6a8ee8 and 3286b52.

⛔ Files ignored due to path filters (1)
  • .vortex/installer/tests/Fixtures/handler_process/_baseline/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
📒 Files selected for processing (1)
  • .ahoy.yml

Walkthrough

The .ahoy.yml confirm command output and input prompts were updated to include ANSI escape codes that color the prompt text red and render the [y/N] hint in dim text; no control flow or validation logic was changed.

Changes

Cohort / File(s) Summary
Confirm Command Styling
./.ahoy.yml
Prompt and echoed confirmation now include ANSI color codes: red prompt (\033[31m) and dim hint (\033[2m) for both interactive read prompts and the printed confirmation line. No logic changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰
I nudged the prompt to shine in red,
Dimmed the hint where answers tread,
A tiny flash of ANSI light,
Confirmations now gleam polite. 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title '[#2363] Added colour to ahoy confirm' directly matches the main change—adding color formatting to the confirm command in Ahoy.
Linked Issues check ✅ Passed The PR implements the colorized confirm command with ANSI escape codes for red text and dim hints as specified in issue #2363, matching all stated requirements.
Out of Scope Changes check ✅ Passed All changes are limited to updating color formatting in the ahoy confirm command prompts; no unrelated modifications are present.
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 unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/2363-add-colour-confirm-ahoy

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

Copy link

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.ahoy.yml:
- Line 338: The current echo command keeps ${AHOY_CONFIRM_RESPONSE} in dim text;
update the echo in the confirmation prompt so the dim styling only wraps the
"[y/N]" hint and is reset before printing ${AHOY_CONFIRM_RESPONSE}. Concretely,
adjust the printf/echo format around the existing echo line (the line containing
echo -e and ${AHOY_CONFIRM_RESPONSE}) to place \033[2m...\033[0m around "[y/N]"
only, and ensure a \033[0m reset occurs immediately before
${AHOY_CONFIRM_RESPONSE} so the preset response is printed with normal styling.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 9f47b7a2-b114-4469-bf72-f5d649d0612a

📥 Commits

Reviewing files that changed from the base of the PR and between 2d85b55 and d6a8ee8.

⛔ Files ignored due to path filters (2)
  • .vortex/installer/tests/Fixtures/handler_process/_baseline/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/_baseline/scripts/custom/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
📒 Files selected for processing (1)
  • .ahoy.yml

else
if [ "${AHOY_CONFIRM_WAIT_SKIP}" != "1" ]; then
echo ">> $1 [y/N] ${AHOY_CONFIRM_RESPONSE}"
echo -e "\033[31m>> $1\033[0m \033[2m[y/N] ${AHOY_CONFIRM_RESPONSE}\033[0m"
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Reset dim styling before printing the preset response.

Right now ${AHOY_CONFIRM_RESPONSE} is echoed in dim text too. The linked requirement only dims the [y/N] hint and then shows the provided response.

Suggested fix
-          echo -e "\033[31m>> $1\033[0m \033[2m[y/N] ${AHOY_CONFIRM_RESPONSE}\033[0m"
+          echo -e "\033[31m>> $1\033[0m \033[2m[y/N]\033[0m ${AHOY_CONFIRM_RESPONSE}"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
echo -e "\033[31m>> $1\033[0m \033[2m[y/N] ${AHOY_CONFIRM_RESPONSE}\033[0m"
echo -e "\033[31m>> $1\033[0m \033[2m[y/N]\033[0m ${AHOY_CONFIRM_RESPONSE}"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.ahoy.yml at line 338, The current echo command keeps
${AHOY_CONFIRM_RESPONSE} in dim text; update the echo in the confirmation prompt
so the dim styling only wraps the "[y/N]" hint and is reset before printing
${AHOY_CONFIRM_RESPONSE}. Concretely, adjust the printf/echo format around the
existing echo line (the line containing echo -e and ${AHOY_CONFIRM_RESPONSE}) to
place \033[2m...\033[0m around "[y/N]" only, and ensure a \033[0m reset occurs
immediately before ${AHOY_CONFIRM_RESPONSE} so the preset response is printed
with normal styling.

@github-actions

This comment has been minimized.

@AlexSkrypnyk
Copy link
Member Author

Code Coverage Report:
  2026-03-12 04:55:18

 Summary:
  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   100.00% (189/189)

Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@AlexSkrypnyk
Copy link
Member Author

Code Coverage Report:
  2026-03-12 04:58:44

 Summary:
  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   100.00% (189/189)

Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@AlexSkrypnyk AlexSkrypnyk enabled auto-merge (rebase) March 12, 2026 05:22
@AlexSkrypnyk AlexSkrypnyk force-pushed the feature/2363-add-colour-confirm-ahoy branch from d6a8ee8 to 3286b52 Compare March 12, 2026 05:22
@AlexSkrypnyk AlexSkrypnyk added the AUTOMERGE Pull request has been approved and set to automerge label Mar 12, 2026
@github-actions
Copy link

Code Coverage Report:
  2026-03-12 05:28:36

 Summary:
  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   100.00% (189/189)

Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@AlexSkrypnyk
Copy link
Member Author

Code Coverage Report:
  2026-03-12 05:29:37

 Summary:
  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   100.00% (189/189)

Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@AlexSkrypnyk
Copy link
Member Author

Code Coverage Report:
  2026-03-12 05:32:29

 Summary:
  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   100.00% (189/189)

Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@AlexSkrypnyk
Copy link
Member Author

Code Coverage Report:
  2026-03-12 05:32:33

 Summary:
  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   100.00% (189/189)

Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@AlexSkrypnyk AlexSkrypnyk disabled auto-merge March 12, 2026 05:38
@AlexSkrypnyk AlexSkrypnyk merged commit 10b42b2 into main Mar 12, 2026
25 of 28 checks passed
@AlexSkrypnyk AlexSkrypnyk deleted the feature/2363-add-colour-confirm-ahoy branch March 12, 2026 05:38
@github-project-automation github-project-automation bot moved this from BACKLOG to Release queue in Vortex Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AUTOMERGE Pull request has been approved and set to automerge

Projects

Status: Released in 1.37.0

Development

Successfully merging this pull request may close these issues.

Add colour to the confirm in the Ahoy config

1 participant