Skip to content

test: frontend +init acceptance scaffold (DO NOT MERGE) - #2075

Open
zhmushan wants to merge 8 commits into
mainfrom
test/frontend-init-alpha
Open

test: frontend +init acceptance scaffold (DO NOT MERGE)#2075
zhmushan wants to merge 8 commits into
mainfrom
test/frontend-init-alpha

Conversation

@zhmushan

@zhmushan zhmushan commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

DO NOT MERGE — acceptance scaffold only. This branch pins apps +init to @lark-apaas/miaoda-cli@0.1.24-alpha.03a64f0 (which contains the frontend -> vite-react mapping) so reviewers can validate apps +init on frontend apps before the miaoda-cli release lands on npm latest.

The real feature PR is #2072. This branch = #2072 + a one-line temporary version pin. It exists solely to generate a pkg.pr.new preview build for acceptance testing, and will be deleted once miaoda-cli MR #129 is published to npm latest.

Changes

  • shortcuts/apps/apps_init.go: temporarily pin miaodaCLIPkg to the frontend alpha version (revert to @latest before any merge)

Test Plan

  • builds locally (go build ./...)
  • Acceptance: install this branch's pkg.pr.new preview, then run apps +init on a frontend app and confirm it scaffolds a vite-react project

Related Issues

N/A (acceptance scaffold for #2072)

Summary by CodeRabbit

  • New Features

    • Added frontend as a supported --app-type for apps +create and apps +list, including updated hints/examples.
  • Documentation

    • Updated CLI reference docs and publish/development guardrails to cover the frontend flow, frontendfull_stack upgrade via cloud session, and expanded +release-get coverage.
  • Tests

    • Added a CLI test to verify apps +create --app-type frontend sends the correct app_type in the request payload.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0b90b5c8-6004-4570-97be-b36022949b8d

📥 Commits

Reviewing files that changed from the base of the PR and between 8281875 and 3ad2504.

📒 Files selected for processing (3)
  • shortcuts/apps/apps_init.go
  • skills/lark-apps/references/lark-apps-create.md
  • skills/lark-apps/references/lark-apps-local-dev.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • skills/lark-apps/references/lark-apps-create.md
  • skills/lark-apps/references/lark-apps-local-dev.md

📝 Walkthrough

Walkthrough

frontend is now supported by app creation and listing flags, request propagation, scaffolding metadata, app type guidance, and local development documentation. The scaffolding CLI package is pinned to a specific prerelease version.

Changes

Frontend app type support

Layer / File(s) Summary
CLI frontend type validation
shortcuts/apps/apps_create.go, shortcuts/apps/apps_list.go, shortcuts/apps/apps_create_test.go, shortcuts/apps/apps_meta.go
Creation and listing accept html, frontend, and full_stack; hints, examples, metadata, and request propagation coverage reflect the expanded type set.
Scaffold package and app type forwarding
shortcuts/apps/apps_init.go
The scaffolding package is pinned to a prerelease version, and comments document default policy handling plus verbatim appType forwarding.
App type guidance and workflows
skills/lark-apps/SKILL.md, skills/lark-apps/references/*
Documentation covers frontend selection, creation, retrieval, listing, local development, cloud-session upgrades, development links, and release coverage.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • larksuite/cli#2072: Closely aligned changes to frontend flag enums and creation test coverage.

Suggested labels: feature

Suggested reviewers: liangshuo-1

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the temporary frontend +init acceptance scaffold change and is concise enough for history scanning.
Description check ✅ Passed The description follows the template with Summary, Changes, Test Plan, and Related Issues, and it clearly states the acceptance-only scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/frontend-init-alpha

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.

@github-actions github-actions Bot added the size/M Single-domain feat or fix with limited business impact label Jul 28, 2026
@zhmushan
zhmushan marked this pull request as ready for review July 28, 2026 08:01
@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.16%. Comparing base (3d2c10c) to head (3ad2504).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2075   +/-   ##
=======================================
  Coverage   75.16%   75.16%           
=======================================
  Files         912      912           
  Lines       96451    96475   +24     
=======================================
+ Hits        72495    72517   +22     
- Misses      18380    18381    +1     
- Partials     5576     5577    +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
shortcuts/apps/apps_list.go (1)

38-38: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Add direct coverage for the new frontend list filter.

Please add or verify a test in shortcuts/apps/apps_list_test.go that invokes +list --app-type frontend and asserts the outgoing app_type=frontend parameter. This behavior change should have an accompanying contract test.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@shortcuts/apps/apps_list.go` at line 38, Add a contract test in the apps list
test suite covering the frontend filter: invoke +list with --app-type frontend
and assert the outgoing request includes app_type=frontend, while preserving
existing filter coverage.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@shortcuts/apps/apps_init.go`:
- Line 42: Restore the reviewed default Miaoda CLI package tag in the
miaodaCLIPkg declaration, replacing the alpha pin while preserving the existing
package variable and production init/sync flows.

---

Nitpick comments:
In `@shortcuts/apps/apps_list.go`:
- Line 38: Add a contract test in the apps list test suite covering the frontend
filter: invoke +list with --app-type frontend and assert the outgoing request
includes app_type=frontend, while preserving existing filter coverage.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9c6d725d-2958-47e3-937b-454caa0a2260

📥 Commits

Reviewing files that changed from the base of the PR and between 1b173e1 and 036335f.

📒 Files selected for processing (6)
  • shortcuts/apps/apps_create.go
  • shortcuts/apps/apps_create_test.go
  • shortcuts/apps/apps_init.go
  • shortcuts/apps/apps_list.go
  • shortcuts/apps/apps_meta.go
  • skills/lark-apps/SKILL.md


const (
miaodaCLIPkg = "@lark-apaas/miaoda-cli@latest"
miaodaCLIPkg = "@lark-apaas/miaoda-cli@0.1.24-alpha.03a64f0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== locate target file =="
git ls-files | rg '(^|/)shortcuts/apps/apps_init\.go$|shortcuts/apps'

echo "== target snippet and nearby context =="
if [ -f shortcuts/apps/apps_init.go ]; then
  nl -ba shortcuts/apps/apps_init.go | sed -n '1,90p'
fi

echo "== references to miaodaCLIPkg or 0.1.24-alpha.03a64f0 =="
rg -n 'miaodaCLIPkg|lark-apaas/miaoda-cli|0\.1\.24-alpha\.03a64f0|`@latest`' .

echo "== git status/diff stat/name-only =="
git status --short
git diff --stat || true
git diff -- shortcuts/apps/apps_init.go | sed -n '1,200p' || true

Repository: larksuite/cli

Length of output: 6987


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== target snippet and nearby context =="
awk '{printf "%6d\t%s\n", NR, $0}' shortcuts/apps/apps_init.go | sed -n '1,90p'

echo "== references to miaodaCLIPkg or 0.1.24-alpha.03a64f0 =="
rg -n 'miaodaCLIPkg|lark-apaas/miaoda-cli|0\.1\.24-alpha\.03a64f0|`@latest`' .

echo "== git status/diff stat/name-only =="
git status --short || true
git diff --stat || true
git diff -- shortcuts/apps/apps_init.go | sed -n '1,200p' || true

Repository: larksuite/cli

Length of output: 7382


Restore the default Miaoda CLI tag before merge.

miaodaCLIPkg is used by app +init/app sync/skills sync production flows, including init tests. Leaving @lark-apaas/miaoda-cli@0.1.24-alpha.03a64f0 in place makes normal scaffold users consume the alpha pin instead of the reviewed/default release.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@shortcuts/apps/apps_init.go` at line 42, Restore the reviewed default Miaoda
CLI package tag in the miaodaCLIPkg declaration, replacing the alpha pin while
preserving the existing package variable and production init/sync flows.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

🔍 Intentional — not for merge. This branch (test/frontend-init-alpha) is a temporary acceptance-only scaffold that pins miaoda-cli to the frontend alpha so reviewers can validate apps +init before the miaoda-cli release lands on npm latest. The real feature PR is #2072 (which keeps @latest). This branch will be deleted after acceptance; it is marked DO NOT MERGE.

@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

npm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@3ad25048d017a207df97a5f4af8a6a98fc58ab0d

🧩 Skill update

npx skills add larksuite/cli#test/frontend-init-alpha -y -g

SKILL.md's routing table already covered frontend, but the per-command
reference docs still enumerated only html/full_stack. Update create/list/get
enum values, add a frontend local-dev section, and note frontend in the
release-create entry so agents document the third app type consistently.
@zhmushan
zhmushan force-pushed the test/frontend-init-alpha branch from 036335f to 8281875 Compare July 28, 2026 11:56

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@skills/lark-apps/references/lark-apps-local-dev.md`:
- Around line 56-60: Update the post-commit release workflow after lark-cli apps
+release-create to invoke +release-get for the created release and verify that
status=finished before stating or proceeding as if deployment completed. Keep
the existing branch and app parameters consistent with the release creation
command.
- Line 3: 更新文档开头的适用范围说明,仅将数据库调试归于 full_stack 应用;保留 frontend 和 html
的本地开发、调试及发布范围,但不要暗示它们包含数据库调试流程。
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3c96c737-6310-474b-9065-143e2e89131e

📥 Commits

Reviewing files that changed from the base of the PR and between 036335f and 8281875.

📒 Files selected for processing (6)
  • shortcuts/apps/apps_init.go
  • skills/lark-apps/references/lark-apps-create.md
  • skills/lark-apps/references/lark-apps-get.md
  • skills/lark-apps/references/lark-apps-list.md
  • skills/lark-apps/references/lark-apps-local-dev.md
  • skills/lark-apps/references/lark-apps-release-create.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • shortcuts/apps/apps_init.go

Comment thread skills/lark-apps/references/lark-apps-local-dev.md Outdated
Comment thread skills/lark-apps/references/lark-apps-local-dev.md
zhmushan added 2 commits July 28, 2026 20:06
- create.md: state the app-type enum is matched exactly (lowercase), drop
  the incorrect claim that the CLI normalizes case
- local-dev.md: scope database debugging to full_stack (frontend/html have
  no DB) and add the +release-get finished-status poll to the frontend flow
Temporary acceptance-only change: point +init at
@lark-apaas/miaoda-cli@0.1.24-alpha.03a64f0 (contains the frontend ->
vite-react mapping) so reviewers can validate `apps +init` on frontend
apps before the miaoda-cli release lands on npm latest. Do NOT merge;
revert to @latest once miaoda-cli MR #129 is published.
@zhmushan
zhmushan force-pushed the test/frontend-init-alpha branch from 8281875 to 3ad2504 Compare July 28, 2026 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Single-domain feat or fix with limited business impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant