Skip to content

docs(smartui): use @latest for SmartUI CLI install commands (TE-22391) - #3313

Open
chaitanyas-maker wants to merge 1 commit into
LambdaTest:stagefrom
chaitanyas-maker:docs/te-22391-smartui-cli-latest
Open

docs(smartui): use @latest for SmartUI CLI install commands (TE-22391)#3313
chaitanyas-maker wants to merge 1 commit into
LambdaTest:stagefrom
chaitanyas-maker:docs/te-22391-smartui-cli-latest

Conversation

@chaitanyas-maker

@chaitanyas-maker chaitanyas-maker commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Part of TE-22391.

Tags every SmartUI CLI install command in the docs with @latest, and removes a stale prerelease pin that was handing users a CLI 23 minor versions behind.

Changes

1. @latest on all install commands (70 occurrences, 39 files: 33 docs/smartui-* + 6 docs/hyperexecute-*)

Includes smartui-selenium-java-sdk.md:110, the page named on the ticket. After this change all 86 install commands across the docs read npm install [-g] @lambdatest/smartui-cli@latest.

2. Removed the 4.1.54-beta.0 pin (7 occurrences, 1 file: the 7th docs/hyperexecute-* file)

hyperexecute-smart-ui-capture-onboarding.md instructed users to install @lambdatest/smartui-cli@4.1.54-beta.0 and presented it as the recommended install. Current stable is 4.1.77, so every reader of that page was pinned to an old prerelease.

I verified the pin is no longer needed before removing it. capture is a registered command in the stable 4.1.77 package:

$ npm pack @lambdatest/smartui-cli@4.1.77
$ grep -oE "name\(['\"][a-zA-Z:_-]+['\"]\)" package/dist/index.cjs | sort -u
branch, build, capture, config:create, config:create-figma, ...

Scope note

The diff is 77 changed lines across 40 files, and every changed line is an install command inside a fenced code block. No prose, links, frontmatter, or sidebar entries were touched.

Important caveat on impact

@latest here is a documentation improvement, not a functional fix. npm install <package> with no version specifier already resolves to the latest dist-tag, so item 1 above installs exactly what it installed before:

npm i @lambdatest/smartui-cli           ->  add @lambdatest/smartui-cli 4.1.77
npm i @lambdatest/smartui-cli@latest    ->  add @lambdatest/smartui-cli 4.1.77

Item 2, the beta pin, is a real fix.

The actual cause of users landing on an outdated CLI is the dependency manifests in the sample repositories, where caret ranges capped below major 4 and stale committed lockfiles were resolving to CLI 2.x and 3.x. That is addressed in 19 companion PRs across the sample repos, also under TE-22391.

🤖 Generated with Claude Code

https://claude.ai/code/session_01H5pDePdJgs3Ms7qpjKc4kU

Tag all SmartUI CLI install commands with @latest and replace the stale
4.1.54-beta.0 pins in the HyperExecute SmartUI Capture onboarding page
with @latest. The capture command ships in stable 4.1.77, so the
prerelease pin is no longer required.

Refs TE-22391

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H5pDePdJgs3Ms7qpjKc4kU
@sushobhit-lt

Copy link
Copy Markdown

Review: clean — approve

40 files, 77 lines, all inside docs/. Every changed line is a single-token edit within a fenced code block or inline-code span. No prose, frontmatter, sidebar entries, links, or MDX components touched, so there's no rendering or MDX-escaping risk (@latest inside backticks is inert).

The one substantive change is verified safe

docs/hyperexecute-smart-ui-capture-onboarding.md was pinning readers to @lambdatest/smartui-cli@4.1.54-beta.0. Current registry state is latest: 4.1.77. I unpacked the stable 4.1.77 tarball and confirmed capture is a registered command, and that every flag that page actually uses is present on it:

.name("capture").description("Capture screenshots of static sites")
  .option("-C, --parallel [number]", ...)
  .option("--fetch-results [filename]", ...)
  .option("--buildName <string>", ...)
  .option("--scheduled <string>", ...)

The page uses --config, --buildName, --fetch-results, --parallel, --scheduled, plus config:create and config:create-web-static — all present in stable. Nothing on that page depended on the prerelease.

Coverage is complete

Grepped the head ref for @lambdatest/smartui-cli installs not followed by @latest (unversioned or version-pinned) — zero remaining hits under docs/. The three SmartUI pages absent from the diff (smartui-cli-responsive-dom.md, smartui-customscroll.md, smartui-sdk-config-options.md) already used @latest, which is why they're not here — correct, not an oversight.

No stale prose left behind: no remaining 4.1.54 reference on the onboarding page, and smartui-troubleshooting-guide.md already used @latest, so this makes that page internally consistent.

npm syntax is correct in the multi-package cases (npm install @lambdatest/smartui-cli@latest @lambdatest/selenium-driver selenium-webdriver) — the tag binds to the one specifier, as intended.

Non-blocking notes

1. static/docs/ still carries the beta pin — but it does not reach customers. static/docs/hyperexecute-smart-ui-capture-onboarding.md still has @4.1.54-beta.0 in several places, and ~14 other static/docs/*.md files still have unversioned installs. This is not a defect in this PR: scripts/generate-static-md.js regenerates the whole tree from docs/ via prebuild/prestart and writes unconditionally, so the deployed markdown is rebuilt from the corrected sources. Leaving it alone was the right call.

The real (pre-existing, separate) issue is that .gitignore lines 15-17 have the explanatory comment for these generated files but the actual patterns are missing, so static/docs/ is tracked despite being described as gitignored and will keep drifting from docs/. Worth a follow-up ticket, not a change here.

2. PR description counts are slightly off. The body says "70 occurrences, 39 files" for item 1, but the diff shows 33 files for that portion. Cosmetic — the diff itself is right.

3. Merge expectations. npm install <pkg> already resolves the latest dist-tag, so item 1 is a readability/explicitness change with no behavioral effect. Only the beta-pin removal changes what a user actually gets. This should not be merged expecting it to fix the "users on old CLI" report — as the description correctly says, that lives in the sample-repo manifests.

@chaitanyas-maker

chaitanyas-maker commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review. Actioned all three notes.

1. .gitignore / static/docs/ — filed as TE-22943

Confirmed and reproduced, and it's worse than a missing pattern: git history shows the block was correct once and got dismantled in two commits.

d06a24f8 (2026-07-09) added:

# ... (regenerated on every build by scripts/generate-static-md.js,
# generate-llms-txt.js and generate-skill-index.js via prestart/prebuild).
# SKILL.md is hand-written, so keep it tracked.
/static/docs/*.md
!/static/docs/SKILL.md
/static/docs/llms.txt
/static/.well-known/

5952ebdd then dropped the !SKILL.md negation and llms.txt; 07ac7fff dropped /static/docs/*.md. Both look like the rule was deleted so a hand-written file it was excluding could be committed, rather than using git add -f. What's left is the orphaned comment plus /static/.well-known/.

Quantified the churn from a clean tree on this head, running only what prebuild/prestart already run:

$ git status --porcelain | wc -l
0
$ node scripts/generate-static-md.js && node scripts/generate-llms-txt.js
$ git status --porcelain static/docs | wc -l
74
$ git diff --numstat static/docs | awk '{a+=$1;d+=$2} END{print "+"a" -"d}'
+483 -221

So starting the dev server with zero source edits yields 74 modified files.

One trap for whoever fixes it, which the ticket calls out: a blanket ignore plus git rm -r --cached static/docs would destroy real content. static/docs/SKILL.md and static/docs/OpenAPI.md are hand-written with no docs/ source, and SKILL.md is both served at /support/docs/SKILL.md (referenced from custom.js:456) and read as an input by generate-skill-index.js. Resolved all 1,316 tracked files through the generator's own resolveSlug(): 1,313 generated, 1 llms.txt, exactly those 2 hand-written. The fix needs negation entries.

Agreed on leaving static/docs/ untouched in this PR — prebuild runs the generators before docusaurus build, so the deployed output regenerates from docs/ regardless. Verified the tracked copy still carries all 7 beta pins while docs/ now has 0.

2. The 39 vs 33 file count

Double-checked this one and the PR body is right — 33 is an undercount from filtering on the smartui- filename prefix. The hyperexecute-* pages are also SmartUI docs and also carry install commands:

files occurrences
docs/smartui-* 33
docs/hyperexecute-* 7
Total 40 77

Item 2 (the beta pin) is 1 of those hyperexecute-* files with 7 occurrences, so item 1 is the other 39 files with 70 occurrences. That reconciles to the 40 files / 77 lines in the diff header. Same numbers from gh pr view 3313 --json files.

Since the split isn't obvious from the filenames, I've reworded that heading in the description to show the breakdown rather than leaving a bare "39 files".

3. @latest being a no-op

Agreed, and no change needed — this is the same point the description makes under "Important caveat on impact". Only the beta-pin removal changes what a user actually gets; the reported "users on old CLI" issue is the sample-repo manifests and lockfiles, covered by the companion PRs under TE-22391.

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.

2 participants