Skip to content

feat: Change console title with Console.Title() (#26) - #32

Merged
T-b-t-nchos merged 1 commit into
developfrom
feat/changing-console-title-Issue#26
Feb 23, 2026
Merged

feat: Change console title with Console.Title() (#26)#32
T-b-t-nchos merged 1 commit into
developfrom
feat/changing-console-title-Issue#26

Conversation

@T-b-t-nchos

@T-b-t-nchos T-b-t-nchos commented Feb 23, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

New Features

  • Console window title now dynamically updates to reflect your current location in the application (e.g., "Main Menu", "Connect", "List Targets"), providing better context awareness during use.

@coderabbitai

coderabbitai Bot commented Feb 23, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

A new ChangeConsoleTitle() method is added to the Action class and integrated throughout Program.cs to update the console title at key UI points, reflecting the current context (Main Menu, Connect, List Targets, Add Target, Edit Target, Delete Target, Edit Execution Option, Exit?).

Changes

Cohort / File(s) Summary
Action class enhancement
sshhub/Action.cs
New public static method ChangeConsoleTitle(string subtitle) that sets console title to "sshhub - {subtitle}" format.
Console title integration
sshhub/Program.cs
Integrated console title updates across multiple UI methods (ShowMenu, Connect, ListTargets, AddTarget, EditTarget, DeleteTarget, EditExec, ConfirmExit) to reflect current context.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related issues

  • Issue #26: Directly implements the "[feat] Change console title with Console.Title" feature request by adding the ChangeConsoleTitle() method and updating all relevant UI methods to call it.

Poem

🐰 A rabbit hops through titles bright,
Each menu now shows its name just right,
From "Connect" to "List" they dance with glee,
The console knows exactly where to be! 🌟

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 45.45% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main change: adding a method to change console title and implementing it throughout the UI to reflect current context.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/changing-console-title-Issue#26

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
sshhub/Program.cs (1)

79-80: ChangeConsoleTitle / Console.Clear() ordering is reversed vs every other call site.

Connect() calls ChangeConsoleTitle before Console.Clear(), while all seven other methods (ShowMenu, ListTargets, AddTarget, EditTarget, DeleteTarget, EditExec, ConfirmExit) do the opposite. No behavioral impact, but a cosmetic inconsistency worth aligning.

♻️ Proposed fix
 static void Connect()
 {
-    ChangeConsoleTitle("Connect");
     Console.Clear();
+    ChangeConsoleTitle("Connect");
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@sshhub/Program.cs` around lines 79 - 80, The Connect() call-site currently
calls ChangeConsoleTitle("Connect") before Console.Clear(), which is
inconsistent with the other methods (ShowMenu, ListTargets, AddTarget,
EditTarget, DeleteTarget, EditExec, ConfirmExit); swap the calls so
Console.Clear() runs first then ChangeConsoleTitle("Connect") to match the
established ordering and restore visual consistency.
ℹ️ Review info

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d0e00d1 and a9fddb9.

📒 Files selected for processing (2)
  • sshhub/Action.cs
  • sshhub/Program.cs
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@sshhub/Program.cs`:
- Around line 79-80: The Connect() call-site currently calls
ChangeConsoleTitle("Connect") before Console.Clear(), which is inconsistent with
the other methods (ShowMenu, ListTargets, AddTarget, EditTarget, DeleteTarget,
EditExec, ConfirmExit); swap the calls so Console.Clear() runs first then
ChangeConsoleTitle("Connect") to match the established ordering and restore
visual consistency.

@T-b-t-nchos
T-b-t-nchos merged commit c459ef4 into develop Feb 23, 2026
2 checks passed
@T-b-t-nchos
T-b-t-nchos deleted the feat/changing-console-title-Issue#26 branch February 23, 2026 08:10
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