Skip to content

feat: add genui-sdk submodule#66

Merged
rhlin merged 36 commits into
devfrom
jyh/genui-sdk-submodule
Jan 28, 2026
Merged

feat: add genui-sdk submodule#66
rhlin merged 36 commits into
devfrom
jyh/genui-sdk-submodule

Conversation

@gargameljyh
Copy link
Copy Markdown
Collaborator

@gargameljyh gargameljyh commented Jan 23, 2026

Summary by CodeRabbit

  • New Features

    • Added GenUI‑SDK: new top‑level navigation entry, route and homepage; SDK assets and styles included.
  • Improvements

    • Refined responsive height calculations for more consistent layout.
    • Updated local app dependencies to newer minor versions.
  • Chores

    • CI/CD workflows updated to fetch, build and include the GenUI‑SDK submodule during builds; submodule added to repository.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 23, 2026

Walkthrough

Adds genui-sdk as a Git submodule and integrates it into site navigation, routing, build (Vite alias/chunk), styling, dependency updates for home, and CI/CD workflows to initialize, install, and build the genui-sdk homepage.

Changes

Cohort / File(s) Summary
Submodule Configuration
\.gitmodules, genui-sdk
Adds genui-sdk Git submodule (SSH URL) and records the subproject commit reference.
Navigation & Routing
packages/common/src/config/header.ts, packages/home/src/router.js, packages/home/src/App.vue
Adds GenUI-SDK menu entry (logo, URL, GitHub), lazy route /opentiny-design/genui-sdk, and imports @/genui-sdk/index.css.
Vite Build Config & Aliasing
packages/home/vite.config.js
Switches importPlugin call to object form (options), excludes /genui-sdk/, adds manualChunks to group genui-sdk assets, and adds alias '@/genui-sdk'../../genui-sdk/sites/homepage/web/dist.
Dependencies (home)
packages/home/package.json
Bumps numerous @opentiny/vue-* dependencies (approx. ~3.20.0 → ~3.25.0).
CI/CD Workflows
.github/workflows/build-common.yml, .../build-home.yml, .../deploy-github.yml, .../deploy-obs.yml
Add SSH agent setup, checkout with fetch-depth: 0/submodules: false, set Git identity, run git submodule sync/update --init --recursive, install genui-sdk deps, and build genui-sdk homepage.
Styling
packages/home/src/index.less
Adds height: calc(100% - Xpx) adjustments in two media query breakpoints to match top margin changes.

Sequence Diagram(s)

sequenceDiagram
  participant Actions as GitHub Actions
  participant SSH as SSH Agent
  participant Repo as Repository
  participant Git as Git CLI
  participant GenUI as genui-sdk
  participant Home as Home build

  Actions->>SSH: start agent (load key from secrets)
  Actions->>Repo: checkout (fetch-depth:0, submodules:false)
  Actions->>Git: set user.name / user.email
  Actions->>Git: git submodule sync --recursive
  Actions->>Git: git submodule update --init --recursive
  Git->>Repo: populate `genui-sdk` submodule
  Actions->>GenUI: cd genui-sdk && pnpm install
  Actions->>GenUI: pnpm build:homepage
  Actions->>Home: pnpm -F opentiny-design-home install && pnpm -F opentiny-design-home build
  Actions->>Actions: collect & deploy artifacts
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 I found a submodule tucked in hay,
Menus, routes, and build steps join the play,
Keys hop in, CI sings bright,
CSS trims the moonlit height,
I nibble commits and bounce away.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add genui-sdk submodule' clearly and accurately summarizes the main change—adding a new submodule entry for genui-sdk, which is reflected across the .gitmodules file, router configuration, and build workflows.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch jyh/genui-sdk-submodule

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 and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/common/src/config/header.ts (1)

71-122: Header underline won’t activate for GenUI-SDK.
The underline logic doesn’t include genui-sdk, so the ecosystem menu might not highlight on that page.

💡 Proposed fix
-      ['tiny-cli', 'tiny-charts', 'designtheme', 'pro', 'tiny-engine', 'tiny-ng', 'tiny-vue-mobile'].some((app) =>
+      ['tiny-cli', 'tiny-charts', 'designtheme', 'pro', 'tiny-engine', 'tiny-ng', 'tiny-vue-mobile', 'genui-sdk'].some((app) =>
         location.pathname.includes(app)
       )
🤖 Fix all issues with AI agents
In `@genui-sdk`:
- Line 1: The repository's git submodule reference points to a non-existent
commit ca4d369277d66eb071475519ec2cd84ba0e5833d in the genui-sdk submodule;
update the submodule entry to a valid commit by opening the submodule
(genui-sdk) and checking out a known-good commit or tag, then run git add on the
submodule and commit the updated gitlink (update .gitmodules/submodule entry if
needed) so the superproject references an existing commit in
https://github.com/opentiny/genui-sdk.git.

In `@packages/home/package.json`:
- Around line 20-55: The package.json lists "@opentiny/vue-renderless":
"~3.20.3" which is incompatible with the other "@opentiny/vue" packages at
3.25.x; update "@opentiny/vue-renderless" to "~3.25.0" to match the rest (or
alternatively downgrade all "@opentiny/vue*" entries to "3.20.3" if you must
keep renderless at 3.20.3), and verify the "@opentiny/genui-sdk-vue" entry
currently set to "workspace:*" actually exists as a local workspace package—if
not, replace "workspace:*" with the appropriate published version (e.g.,
"0.0.1-alpha.0" or later).

In `@packages/home/vite.config.js`:
- Around line 91-93: The vite alias '@/genui-sdk':
_resolve('../../genui-sdk/sites/homepage/web/dist') points to a missing git
submodule build output causing dev/build to fail when importing
'@/genui-sdk/index.js' and '@/genui-sdk/index.css' (see router.js imports); fix
by ensuring the genui-sdk submodule is initialized and its site is built before
Vite resolves the alias: add git submodule update --init --recursive to CI
job(s) and/or a root package.json postinstall script, and add a build step that
runs inside the genui-sdk (to produce sites/homepage/web/dist) before the home
site build step runs, or alternatively adjust the alias in vite.config.js to
point to the correct existing build output path.

Comment thread genui-sdk Outdated
Comment thread packages/home/package.json Outdated
Comment thread packages/home/vite.config.js Outdated
Comment thread packages/home/src/router.js Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/build-home.yml (1)

4-7: Missing path trigger for genui-sdk changes.

The workflow builds genui-sdk but the paths filter only includes packages/home/**. Changes to the genui-sdk submodule won't trigger this workflow, potentially causing stale builds.

🔧 Proposed fix
   pull_request:
     types: [opened, reopened, synchronize, edited]
     paths:
       - 'packages/home/**'
+      - 'genui-sdk/**'
🧹 Nitpick comments (6)
.github/workflows/build-home.yml (3)

30-38: Git identity configuration is unnecessary; submodule steps are redundant.

  1. Git identity configuration (lines 30-33) is only needed for commits/pushes - this is a build-only workflow.
  2. The submodule sync/update steps (lines 34-38) are redundant since submodules: recursive in the checkout action already initializes submodules.
♻️ Suggested simplification
-      - name: Configure Git identity
-        run: |
-          git config --global user.name "GitHub Actions"
-          git config --global user.email "actions@github.com"
-      - name: Ensure submodules are up-to-date
-        run: |
-          git submodule sync --recursive
-          git submodule update --init --recursive
-          git submodule status --recursive

If you want to keep submodule status verification for debugging purposes, retain only:

      - name: Verify submodule status
        run: git submodule status --recursive

39-48: Using --no-frozen-lockfile reduces build reproducibility.

Both install steps use --no-frozen-lockfile, which allows dependency resolution to differ from the committed lockfile. This can lead to non-reproducible builds and potential "works on my machine" issues.

Consider removing --no-frozen-lockfile if possible, or document why lockfile bypass is necessary (e.g., submodule has its own lockfile management).


49-50: Build step lacks workspace filter for consistency.

The install step uses -F opentiny-design-home filter, but the build step runs unfiltered pnpm build. This may build more packages than intended.

♻️ Suggested fix for consistency
       - name: Build home
-        run: pnpm build
+        run: pnpm -F opentiny-design-home build
.github/workflows/build-common.yml (3)

30-33: Git identity configuration appears unnecessary.

Git identity is only required for operations that create commits (merge, rebase, commit, etc.). The submodule sync/update operations don't require user identity. Consider removing this step unless there's a specific need.


34-38: Redundant submodule initialization.

Since actions/checkout@v4 with submodules: recursive already initializes and updates submodules, the git submodule update --init --recursive command is redundant. The sync step is only needed if submodule URLs might differ from .gitmodules.

Consider simplifying to just the status check for debugging:

♻️ Suggested simplification
       - name: Ensure submodules are up-to-date
         run: |
-          git submodule sync --recursive
-          git submodule update --init --recursive
           git submodule status --recursive

If you need both as a safety net, that's acceptable but adds ~10-15 seconds to the build.


39-46: --no-frozen-lockfile may cause non-reproducible builds.

Using --no-frozen-lockfile allows dependency resolution that may differ between runs, potentially causing inconsistent builds. If the lockfile in genui-sdk is out of sync, it's better to fix it at the source rather than bypass it in CI.

Additionally, consider using working-directory for cleaner syntax:

♻️ Suggested improvements
       - name: Install genui-sdk deps
+        working-directory: genui-sdk
         run: |
-          cd genui-sdk && pnpm install --no-frozen-lockfile
+          pnpm install --frozen-lockfile
       - name: Build genui-sdk homepage
+        working-directory: genui-sdk
         run: |
-          cd genui-sdk
           pnpm prebuild:homepage
           pnpm build:homepage

If the lockfile is intentionally not committed to genui-sdk, consider documenting this decision.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In @.github/workflows/build-common.yml:
- Around line 30-39: The CI step named "Ensure submodules are up-to-date"
currently runs "git submodule update --remote --merge" which advances submodules
to remote HEAD; change this step to only sync and update submodules to the
committed SHA by removing the "--remote --merge" invocation and keeping "git
submodule sync --recursive" and "git submodule update --init --recursive" (and
optionally "git submodule status --recursive") so the build uses the pinned
commits rather than fetching remote heads.
- Around line 19-25: The SSH agent step (webfactory/ssh-agent@v0.8.0) and the
recursive submodule checkout (actions/checkout@v4 with submodules: recursive)
must be guarded so secrets.SUBMODULE_SSH_KEY is not used for forked PRs; update
the workflow to add a conditional such as if: ${{ github.event.pull_request ==
null || github.repository == github.event.pull_request.head.repo.full_name }} on
the SSH step (and/or the Checkout repository step) so the SSH setup and
recursive submodule checkout run only for trusted contexts, or alternatively
change the genui-sdk submodule URL to HTTPS to avoid needing the SSH key.

Comment thread .github/workflows/build-common.yml Outdated
Comment thread .github/workflows/build-common.yml
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.github/workflows/deploy-github.yml:
- Around line 37-42: The CI step "Ensure submodules are up-to-date" currently
uses git submodule update --remote --merge which fetches the latest remote
branch instead of the commit recorded in the superproject; remove or replace
that command so the workflow uses the pinned commit recorded in the superproject
(keep git submodule sync --recursive and git submodule update --init --recursive
and git submodule status --recursive) so CI checks out the committed submodule
revisions rather than pulling remotes — update the job step to no longer call
git submodule update --remote --merge.

Comment thread .github/workflows/deploy-github.yml
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Fix all issues with AI agents
In @.github/workflows/build-common.yml:
- Around line 19-26: The SSH agent step using webfactory/ssh-agent@v0.8.0
currently runs unconditionally and fails on forked PRs due to missing
secrets.SUBMODULE_SSH_KEY; update the ssh-agent step (the step that specifies
ssh-private-key: ${{ secrets.SUBMODULE_SSH_KEY }}) to include a conditional
guard so it only runs for pushes or PRs originating from the same repo (use an
if like: github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name == github.repository) to prevent
failures while keeping submodule SSH setup for trusted contexts.

In @.github/workflows/build-home.yml:
- Around line 35-40: The workflow currently runs "git submodule update --remote
--merge --recursive", which pulls the latest remote commits and breaks
reproducibility; update the workflow step to remove the --remote --merge flags
so it uses the pinned submodule commit (i.e., run "git submodule update --init
--recursive" or keep the existing "git submodule update --init --recursive" call
and delete the separate --remote --merge invocation) unless you explicitly want
CI to always track the latest submodule tip—if so, document that choice in the
job and accept the reproducibility trade-off.
- Around line 43-50: Update the CI workflow to enforce lockfile integrity and
ensure genui-sdk changes trigger rebuilds: in the "Install genui-sdk deps" and
main install steps (steps named "Install genui-sdk deps" and "Build genui-sdk
homepage") replace pnpm install --no-frozen-lockfile with pnpm install
--frozen-lockfile so CI fails on lockfile drift, and update the workflow "paths"
trigger to include genui-sdk/** (or remove the exclusion) so changes in the
genui-sdk submodule will trigger the pipeline.
🧹 Nitpick comments (4)
.github/workflows/build-home.yml (3)

31-34: Git identity configuration may be unnecessary.

This workflow only builds artifacts and doesn't appear to make any commits. Git identity is typically only needed for git commit operations. If no commits are being made, these lines can be removed.

Verify if Git identity is actually required
#!/bin/bash
# Check if any git commit operations exist in this workflow or if submodule update --merge requires it
rg -n "git commit|git push" .github/workflows/build-home.yml

41-42: Consider pinning tsx version for reproducibility.

Installing tsx without a version specifier may lead to inconsistent builds if a breaking change is released.

Pin the tsx version
       - name: Install tsx globally
-        run: pnpm add -g tsx
+        run: pnpm add -g tsx@4.7.0

46-50: Missing working-directory directive; consider using it for cleaner steps.

Instead of cd genui-sdk && ..., you can use the working-directory directive for cleaner YAML and better error handling if the directory doesn't exist.

Suggested improvement
       - name: Install genui-sdk deps
-        run: |
-          cd genui-sdk && pnpm install --no-frozen-lockfile
+        working-directory: genui-sdk
+        run: pnpm install --frozen-lockfile
       - name: Build genui-sdk homepage
-        run: |
-          cd genui-sdk
-          pnpm prebuild:homepage
-          pnpm build:homepage
+        working-directory: genui-sdk
+        run: |
+          pnpm prebuild:homepage
+          pnpm build:homepage
.github/workflows/build-common.yml (1)

43-50: Consider using --frozen-lockfile for reproducible CI builds.

Using --no-frozen-lockfile (line 45) allows pnpm to modify the lockfile during install, which can lead to inconsistent builds if dependencies have been updated. For CI reproducibility, prefer --frozen-lockfile and ensure the lockfile is committed and up-to-date.

♻️ Suggested change
       - name: Install genui-sdk deps
         run: |
-          cd genui-sdk && pnpm install --no-frozen-lockfile
+          cd genui-sdk && pnpm install --frozen-lockfile

Comment thread .github/workflows/build-common.yml
Comment thread .github/workflows/build-home.yml
Comment thread .github/workflows/build-home.yml
rhlin
rhlin previously approved these changes Jan 28, 2026
rhlin
rhlin previously approved these changes Jan 28, 2026
lhuans
lhuans previously approved these changes Jan 28, 2026
@gargameljyh gargameljyh dismissed stale reviews from lhuans and rhlin via 4c547f1 January 28, 2026 12:09
Comment thread .github/workflows/build-home.yml Outdated
Comment thread packages/home/package.json
Comment thread packages/home/src/router.js Outdated
Comment thread packages/home/vite.config.js
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.github/workflows/deploy-obs.yml:
- Around line 40-41: Update the GitHub Actions step named "Checkout" to use the
newer checkout action version: replace the uses declaration referencing
"actions/checkout@v3" with "actions/checkout@v4" so the workflow matches other
workflows in the PR and benefits from v4 fixes and security updates.
🧹 Nitpick comments (3)
.github/workflows/build-common.yml (1)

31-34: Git identity configuration may no longer be needed.

Since the --remote --merge was removed from the submodule update step, Git identity is no longer required (no merge commits are being created). Consider removing these lines to simplify the workflow.

🔧 Suggested change
       - name: Setup pnpm
         uses: pnpm/action-setup@v3
         with:
           version: 9
-      - name: Configure Git identity
-        run: |
-          git config --global user.name "GitHub Actions"
-          git config --global user.email "actions@github.com"
       - name: Ensure submodules are up-to-date
.github/workflows/deploy-obs.yml (1)

46-49: Git identity configuration may no longer be needed.

Same as in build-common.yml, since --remote --merge was removed, Git identity is not required for the submodule update. Consider removing for cleaner workflow.

.github/workflows/deploy-github.yml (1)

33-36: Git identity configuration may no longer be needed.

Consistent with other workflows, the Git identity step can be removed since no merge commits are being created after removing --remote --merge.

🔧 Suggested change
       - name: Setup pnpm
         uses: pnpm/action-setup@v3
         with:
           version: 9
-      - name: Configure Git identity
-        run: |
-          git config --global user.name "GitHub Actions"
-          git config --global user.email "actions@github.com"
       - name: Ensure submodules are up-to-date

Comment thread .github/workflows/deploy-obs.yml
Comment thread .github/workflows/deploy-github.yml Outdated
@rhlin rhlin merged commit 9c95598 into dev Jan 28, 2026
4 checks passed
James-9696 pushed a commit that referenced this pull request May 25, 2026
* feat(genui-sdk): add genui submodule

* feat(genui-sdk-home): complete genui sdk home develop

* feat: genui sdk home page code migration

* feat: delete genui assest resource

* feat(genui-sdk-home): complete genui sdk home develop

* feat: genui sdk home page code migration

* feat: delete genui assest resource

* feat: update genui-sdk icon

* feat: modify the script to support building genui-sdk

* feat: add build script key

* fix: modify the submodule update method

* fix: update build common

* fix: modify git global config during build

* fix: update build common submodule

* fix: reset git global config during build

* feat: update deploy script

* feat: update import plugin config

* feat: modify the script to globally install tsx before building

* feat: workspace exclude genui-sdk output

* feat: delete geui-sdk from workspace

* feat: remove the prebuild process from the script

* feat: modify env max_old_space_size

* feat: modify genui-sdk submodule

* fix: optimize the slow initial screen access of genui-sdk

* feat: fix rabbit ai comment

* feat: CI strictly uses the locked submodule versions in the repository

* feat: delete NODE_OPTIONS

* feat: optimize the building of the genui-sdk module

* feat: modify genui-sdk homepage huawei obs deploy script

* fix: remove the --no-frozen-lockfile option when executing `pnpm install` for submodules

* feat: remove build script tsx install

* feat: rename genui-sdk build step

* feat: remove genui-sdk build step

* feat: revert genui-sdk build step

* feat: update genui-sdk commit

* feat: update genui-sdk submodule commit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants