lingo.dev icon indicating copy to clipboard operation
lingo.dev copied to clipboard

feat(cli): Update header docs link to be conditional for CI environments

Open adityasharmawork opened this issue 1 month ago • 0 comments

Summary

Updated the CLI header to display environment-aware documentation links based on the runtime environment (CI/CD vs Default).

Changes

  • Created a local isCI helper function in packages/cli/src/cli/utils/ui.ts to detect CI environments without external package dependencies.
  • Updated the renderHero function to conditionally set the documentation link.
  • Changed the link from the static https://lingo.dev/go/docs to dynamic paths: https://lingo.dev/ci (in CI) and https://lingo.dev/cli (default).

Testing

Business logic tests added:

  • [x] Verified locally that running node bin/cli.mjs login displays https://lingo.dev/cli in the header by default.
  • [x] Verified locally that running CI=true node bin/cli.mjs login displays https://lingo.dev/ci in the header.
  • [x] All tests pass locally

Visuals

Required for UI/UX changes:

  • [x] Screenshots showing the issue is fixed attached

CLI Mode -

Screenshot from 2025-11-18 17-00-48

CI Mode -

Screenshot from 2025-11-18 17-01-09

Checklist

  • [x] No breaking changes (or documented below)

Closes #1078

adityasharmawork avatar Nov 18 '25 11:11 adityasharmawork