Take the console title helper from NosCore.Shared - #2363
Conversation
NosCore.Core.ConsoleTitle was written here because the package had nothing to offer. 6.0.2 does - ConsoleHelper carries the same two calls next to the window-size predicate that Logger.PrintHeader uses - so the local copy goes and the seven call sites take the shared one. NosCore.Injector and NosCore.ParserInputGenerator keep their own try/catch around Console.Title and can drop it the same way; they are separate repositories. Tested: builds with 0 warnings, suite green - 1126 tests.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
💤 Files with no reviewable changes (1)
Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review. WalkthroughThe change updates ChangesConsole title helper migration
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to The change centralizes existing console-title behavior in the shared package without altering startup reachability or user-visible functionality; no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 7 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
What
NosCore.Core.ConsoleTitlewas written here (#2323) because the package had nothing to offer. NosCore.Shared 6.0.2 does:ConsoleHelpercarries the same two calls, next to the window-size predicateLogger.PrintHeaderuses. So the local copy goes and the seven call sites take the shared one.ConsoleTitle.Set→ConsoleHelper.SetTitle,ConsoleTitle.Append→ConsoleHelper.AppendTitle. Behaviour is identical — same Windows check, same!IsOutputRedirected, sameGetConsoleWindow()probe.Why it belongs in the package
Three repositories had grown the same
try { Console.Title = …; } catch { }: this one,NosCore.InjectorandNosCore.ParserInputGenerator. All three already depend onNosCore.Shared, so one helper serves them. The other two are separate repositories and get the same treatment separately.6.0.2 also fixes a hole in
PrintHeaderitself: its width probe counted stdin, and a console input handle has no screen buffer, soServer.exe > log.txt 2>&1from a shell still threw. Nothing here changes for that — the package handles it — but it is the reason the version moves.Testing
NosCore.Shared.6.0.2.nupkgbefore it indexed on nuget.org; CI restores the published one.Summary by CodeRabbit
Improvements
Maintenance