Skip to content

feat: adapt REPL welcome message to terminal width - #14848

Merged
kgryte merged 8 commits into
stdlib-js:developfrom
0PrashantYadav0:bug/repl-rendering
Sep 1, 2026
Merged

feat: adapt REPL welcome message to terminal width#14848
kgryte merged 8 commits into
stdlib-js:developfrom
0PrashantYadav0:bug/repl-rendering

Conversation

@0PrashantYadav0

Copy link
Copy Markdown
Member

Resolves None.

Description

What is the purpose of this pull request?

This pull request:

  • stack help command on narrow terminal
  • wrap the stdlib welcome text in narrow terminal

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance. This helps reviewers determine how much scrutiny to apply when reviewing your contribution. Example disclosures: "This PR was written primarily by Claude Code." or "I consulted ChatGPT to understand the codebase, but the proposed changes were fully authored manually by myself.".

Used AI to review what the code and making few changes to create the correct constant numbers.


@stdlib-js/reviewers

---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown_pkg_readmes
    status: na
  - task: lint_markdown_docs
    status: na
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: passed
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: na
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: passed
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---
@0PrashantYadav0
0PrashantYadav0 requested a review from a team August 31, 2026 13:22
@stdlib-bot stdlib-bot added REPL Issue or pull request specific to the project REPL. Needs Review A pull request which needs code review. labels Aug 31, 2026
@0PrashantYadav0

Copy link
Copy Markdown
Member Author

Narrow Terminal View

Screenshot 2026-08-31 at 6 52 43 PM

Wide Terminal VIew

Screenshot 2026-08-31 at 6 53 04 PM
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown_pkg_readmes
    status: na
  - task: lint_markdown_docs
    status: na
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: passed
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: na
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: passed
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---
@stdlib-bot

stdlib-bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
repl $\\color{red}18696/25343$
$\\color{green}+0.03\\%$
$\\color{red}887/1161$
$\\color{green}+0.00\\%$
$\\color{red}217/461$
$\\color{green}+0.43\\%$
$\\color{red}18696/25343$
$\\color{green}+0.03\\%$

The above coverage report was generated for the changes in this PR.

Comment thread lib/node_modules/@stdlib/repl/lib/defaults.js Outdated
0PrashantYadav0 and others added 2 commits September 1, 2026 16:22
Co-authored-by: Athan <kgryte@gmail.com>
Signed-off-by: JoyBoy <prashantyadav09783@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>
Comment thread lib/node_modules/@stdlib/repl/lib/welcome_text.js Outdated
Comment thread lib/node_modules/@stdlib/repl/lib/welcome_text.js Outdated
Co-authored-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>

@kgryte kgryte left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Dynamic generation is arguably more work than we need to do (we could just have two hardcoded arrays: one with the wide description and one with the narrow description), but doing it this way is also fine.

@kgryte kgryte changed the title fix: adapt REPL welcome message to terminal width Sep 1, 2026
@kgryte
kgryte merged commit c3f1bfb into stdlib-js:develop Sep 1, 2026
11 checks passed
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Sep 1, 2026
@kgryte kgryte added Enhancement Issue or pull request for enhancing existing functionality. Needs Review A pull request which needs code review. and removed Needs Review A pull request which needs code review. labels Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Issue or pull request for enhancing existing functionality. REPL Issue or pull request specific to the project REPL.

3 participants