test: frontend +init acceptance scaffold (DO NOT MERGE) - #2075
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthrough
ChangesFrontend app type support
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
shortcuts/apps/apps_list.go (1)
38-38: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAdd direct coverage for the new
frontendlist filter.Please add or verify a test in
shortcuts/apps/apps_list_test.gothat invokes+list --app-type frontendand asserts the outgoingapp_type=frontendparameter. 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
📒 Files selected for processing (6)
shortcuts/apps/apps_create.goshortcuts/apps/apps_create_test.goshortcuts/apps/apps_init.goshortcuts/apps/apps_list.goshortcuts/apps/apps_meta.goskills/lark-apps/SKILL.md
|
|
||
| const ( | ||
| miaodaCLIPkg = "@lark-apaas/miaoda-cli@latest" | ||
| miaodaCLIPkg = "@lark-apaas/miaoda-cli@0.1.24-alpha.03a64f0" |
There was a problem hiding this comment.
🩺 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' || trueRepository: 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' || trueRepository: 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.
There was a problem hiding this comment.
🔍 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.
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@3ad25048d017a207df97a5f4af8a6a98fc58ab0d🧩 Skill updatenpx 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.
036335f to
8281875
Compare
There was a problem hiding this comment.
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
📒 Files selected for processing (6)
shortcuts/apps/apps_init.goskills/lark-apps/references/lark-apps-create.mdskills/lark-apps/references/lark-apps-get.mdskills/lark-apps/references/lark-apps-list.mdskills/lark-apps/references/lark-apps-local-dev.mdskills/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
- 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.
8281875 to
3ad2504
Compare
Summary
DO NOT MERGE — acceptance scaffold only. This branch pins
apps +initto@lark-apaas/miaoda-cli@0.1.24-alpha.03a64f0(which contains thefrontend -> vite-reactmapping) so reviewers can validateapps +initon frontend apps before the miaoda-cli release lands on npmlatest.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 pinmiaodaCLIPkgto the frontend alpha version (revert to@latestbefore any merge)Test Plan
go build ./...)apps +initon a frontend app and confirm it scaffolds a vite-react projectRelated Issues
N/A (acceptance scaffold for #2072)
Summary by CodeRabbit
New Features
frontendas a supported--app-typeforapps +createandapps +list, including updated hints/examples.Documentation
frontendflow,frontend→full_stackupgrade via cloud session, and expanded+release-getcoverage.Tests
apps +create --app-type frontendsends the correctapp_typein the request payload.