Skip to content

feat: add frontend as third app type for apps domain - #2072

Open
zhmushan wants to merge 8 commits into
mainfrom
feat/frontend-app-type
Open

feat: add frontend as third app type for apps domain#2072
zhmushan wants to merge 8 commits into
mainfrom
feat/frontend-app-type

Conversation

@zhmushan

@zhmushan zhmushan commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

The apps domain previously exposed only html and full_stack as public app types. This PR adds frontend as the third public --app-type, letting users create pure-frontend (vite-react) apps via apps +create --app-type frontend and filter them via apps +list --app-type frontend. The value passes through to the backend verbatim; the CLI stays production-facing and carries no internal app-type codenames.

Changes

  • Add frontend to the --app-type enum, hint, and Tips in shortcuts/apps/apps_create.go; add acceptance test in shortcuts/apps/apps_create_test.go
  • Add frontend to the --app-type filter enum and description in shortcuts/apps/apps_list.go
  • Clarify frontend handling in shortcuts/apps/apps_init.go comments (zero-value scaffold policy; verbatim passthrough to the scaffolder, no client-side translation)
  • Note the backend FRONTEND return value in the queryAppType comment in shortcuts/apps/apps_meta.go
  • Rework the app-type routing guidance in skills/lark-apps/SKILL.md: three-way boundary (full_stack = has backend/DB, html = static, frontend = JS-interactive default), add type-upgrade guidance, and extend the dev-link note to cover frontend

Test Plan

  • validate passed (build / vet / unit / integration)
  • existing apps E2E regression passed (tests/cli_e2e/apps, incl. enum-rejection cases)
  • acceptance-reviewer passed (2/2 cases)
  • security code review passed (0 findings)
  • manual verification: apps +create --app-type frontend --dry-run sends "app_type":"frontend"; apps +create --app-type spa is rejected with allowed: html, frontend, full_stack
  • live end-to-end: real apps +create --app-type frontend then apps +get round-trips app_type=frontend against the deployed backend

Related Issues

N/A

Summary by CodeRabbit

  • New Features
    • Added frontend as an accepted app_type for +create and +list, including updated command examples and allowed-value help text.
  • Bug Fixes
    • Confirmed +create --app-type frontend works and, in --dry-run, the request reflects "app_type": "frontend" (case-sensitive enum enforcement).
  • Documentation
    • Updated publish safeguards, release workflow guidance, and local development references to include frontend, including +release-get polling behavior.

@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: f2a7b5b0-8bfe-4e3f-b9c9-4f3a9f140a3c

📥 Commits

Reviewing files that changed from the base of the PR and between 0897d84 and f8ca193.

📒 Files selected for processing (3)
  • shortcuts/apps/apps_create_test.go
  • 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 (1)
  • shortcuts/apps/apps_create_test.go

📝 Walkthrough

Walkthrough

The apps create and list shortcuts now accept frontend as an app type. Creation preserves the value in request bodies, tests cover dry-run validation, and Lark Apps guidance and coverage documentation define frontend selection, development, and release behavior.

Changes

Frontend app type support

Layer / File(s) Summary
CLI app-type acceptance and propagation
shortcuts/apps/apps_create.go, shortcuts/apps/apps_list.go, shortcuts/apps/apps_meta.go, shortcuts/apps/apps_init.go, shortcuts/apps/apps_create_test.go, tests/cli_e2e/apps/apps_create_dryrun_test.go
Create and list flags accept frontend; create dry-run output preserves "app_type": "frontend"; related policy, scaffolding, normalization, and lowercase-validation coverage is updated.
Frontend app guidance
skills/lark-apps/SKILL.md, skills/lark-apps/references/lark-apps-local-dev.md, skills/lark-apps/references/lark-apps-release-create.md
App-type selection rules, local development workflows, development links, and release polling now cover frontend.
Frontend app reference and coverage documentation
skills/lark-apps/references/lark-apps-create.md, skills/lark-apps/references/lark-apps-get.md, skills/lark-apps/references/lark-apps-list.md, tests/cli_e2e/apps/coverage.md
Creation examples, output examples, list-filter documentation, and CLI coverage records include frontend and strict lowercase enum behavior.

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

Possibly related PRs

  • larksuite/cli#1762: Related app_type normalization and metadata-query behavior in shortcuts/apps/apps_meta.go.
  • larksuite/cli#2075: Overlapping frontend handling guidance in shortcuts/apps/apps_init.go.

Suggested reviewers: liangshuo-1

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 60.00% 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 and concisely summarizes the main change: adding frontend as the third app type.
Description check ✅ Passed The description follows the template with Summary, Changes, Test Plan, and Related Issues, and it covers the main scope well.
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 feat/frontend-app-type

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
@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@f8ca19356c6003fc593fdf086233b87692c705e9

🧩 Skill update

npx skills add larksuite/cli#feat/frontend-app-type -y -g

@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 (f8ca193).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2072   +/-   ##
=======================================
  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.

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.

@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-create.md`:
- Line 12: Update the app type documentation to state only that the accepted
values are lowercase html, frontend, and full_stack. Remove the claim that the
CLI lowercases or normalizes user input, while preserving the enum values and
validation guidance.

In `@skills/lark-apps/references/lark-apps-local-dev.md`:
- Line 3: Update the applicability statement so database debugging is explicitly
limited to full_stack apps, while frontend and html remain covered only for
local development and publishing. Preserve the existing app-type scope and
clarify the workflow wording without changing other documentation.
🪄 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: 81db2afe-ef89-4f7b-9689-9ec9c7480d7a

📥 Commits

Reviewing files that changed from the base of the PR and between dd8255d and a7262ef.

📒 Files selected for processing (5)
  • 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

Comment thread skills/lark-apps/references/lark-apps-create.md Outdated
Comment thread skills/lark-apps/references/lark-apps-local-dev.md Outdated
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
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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature 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