Skip to content

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

Merged
zhmushan merged 9 commits into
mainfrom
feat/frontend-app-type
Aug 6, 2026
Merged

feat: add frontend as third app type for apps domain#2072
zhmushan merged 9 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 a supported app type for +create and +list, with updated help text and examples.
  • Bug Fixes
    • Confirmed frontend app creation preserves the selected type and enforces lowercase values.
  • Documentation
    • Expanded local development and release guidance for frontend apps, including no-database workflows and +release-get polling through publication completion.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 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, metadata, 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#2075: Overlapping frontend app-type changes across the CLI files and documentation.
🚥 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 states that frontend is added as a third app type for the apps domain.
Description check ✅ Passed The description covers the motivation, changes, extensive test plan, and related issue status required by the template.
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 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@b8946913e0702454307eb4d99fb6cbb009e7e6a2

🧩 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 76.21%. Comparing base (8e88492) to head (b894691).
⚠️ Report is 20 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2072      +/-   ##
==========================================
+ Coverage   75.89%   76.21%   +0.32%     
==========================================
  Files         962      986      +24     
  Lines      102085   104268    +2183     
==========================================
+ Hits        77480    79472    +1992     
- Misses      18720    18752      +32     
- Partials     5885     6044     +159     

☔ 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: 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
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 feat/frontend-app-type branch from f8ca193 to 163b724 Compare August 5, 2026 07:50
@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.

@zhmushan
zhmushan requested a review from liangshuo-1 August 6, 2026 02:42
…ng full_stack

The main SKILL.md router declares app_type and dev-method orthogonal and
routes no-database interactive tools to frontend, but cloud-dev/create
references still hardcoded `+create --app-type full_stack` for cloud
generation. This forced a frontend-routed request into a full_stack app
(unrecoverable since apps have no +delete).

Align with the 2026-07-24 design decision: cloud generation also splits by
database need — full_stack when persistence is required, frontend by default
when unstated. Verified on BOE that a frontend app runs the full cloud
session+chat pipeline to completed.
@zhmushan
zhmushan merged commit 5919e86 into main Aug 6, 2026
27 checks passed
@zhmushan
zhmushan deleted the feat/frontend-app-type branch August 6, 2026 16:11
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.

2 participants