Skip to content

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

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

test: frontend +init acceptance scaffold (DO NOT MERGE)#2075
zhmushan wants to merge 9 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 guidance to cover the frontend workflow, upgrading to full_stack, and release status polling.
  • Tests

    • Added coverage verifying apps +create --app-type frontend sends the correct app type.

@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: e05cdff5-9046-41df-8bbb-8c2292a23d13

📥 Commits

Reviewing files that changed from the base of the PR and between 8e88492 and a0f3440.

📒 Files selected for processing (13)
  • 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
  • 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
  • tests/cli_e2e/apps/apps_create_dryrun_test.go
  • tests/cli_e2e/apps/coverage.md
🚧 Files skipped from review as they are similar to previous changes (10)
  • shortcuts/apps/apps_meta.go
  • shortcuts/apps/apps_create.go
  • skills/lark-apps/references/lark-apps-list.md
  • skills/lark-apps/references/lark-apps-release-create.md
  • skills/lark-apps/references/lark-apps-get.md
  • shortcuts/apps/apps_list.go
  • shortcuts/apps/apps_init.go
  • shortcuts/apps/apps_create_test.go
  • skills/lark-apps/references/lark-apps-local-dev.md
  • skills/lark-apps/references/lark-apps-create.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, tests/cli_e2e/apps/*
Creation and listing accept html, frontend, and full_stack. Hints, examples, metadata, request propagation coverage, and coverage documentation 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. Comments document default policy handling and 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 | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 57.14% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the frontend apps +init acceptance scaffold and correctly marks it as not for merging.
Description check ✅ Passed The description includes all required sections and clearly explains the temporary pin, scope, testing, and acceptance-only purpose.
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 💡 1
📝 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.89%. Comparing base (8e88492) to head (a0f3440).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2075   +/-   ##
=======================================
  Coverage   75.89%   75.89%           
=======================================
  Files         962      962           
  Lines      102085   102085           
=======================================
  Hits        77480    77480           
  Misses      18720    18720           
  Partials     5885     5885           

☔ 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

Comment thread shortcuts/apps/apps_init.go Outdated
@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@a0f344012593c7bcfbc77b677c759225b0fbd876

🧩 Skill update

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

@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
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.
- 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
The E2E coverage table and two test comments still described the --app-type
enum as html/full_stack after frontend was added. Update them to
html/frontend/full_stack for consistency; assertions are unaffected (they
match on substrings, not the full enum set).
@zhmushan
zhmushan force-pushed the test/frontend-init-alpha branch from 3ad2504 to a0f3440 Compare August 5, 2026 07:52
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

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