Skip to content

Conversation

@Gaubee
Copy link
Contributor

@Gaubee Gaubee commented Jan 20, 2026

Summary

  • 多 Tab 终端管理器 (pnpm dev): 使用 Bun PTY 支持同时运行多个开发命令
  • i18n 类型自动生成: 使用 i18next-cli 在 typecheck 前自动生成类型,解决 tsc 性能问题
  • 进程生命周期管理: 支持僵尸进程处理和端口释放

Changes

新增文件

文件 说明
scripts/dev.ts 多 Tab 终端管理器主入口
scripts/dev/types.ts 类型定义
scripts/dev/commands.ts 命令配置 (vite, tsc, i18n, storybook)
scripts/dev/process-manager.ts 进程管理器 (含僵尸进程处理)
scripts/dev/control-panel.ts 控制面板 UI
scripts/i18n-types.ts i18n 类型生成
scripts/i18n-types-watch.ts i18n 类型监听

修改文件

  • package.json: 新增 dev, i18n:types scripts; typecheck:run 前置 i18n 类型生成
  • tsconfig.app.json: 移除 src/i18n/** exclude
  • .gitignore: 添加生成的 i18n 类型文件

Usage

# 启动多 Tab 开发服务器
pnpm dev

# 快捷键
# Option+← / Option+→  切换 Tab
# ↑/↓                  选择命令
# Enter                启动
# S                    停止
# R                    重启
# Q                    退出

# typecheck 会自动先生成 i18n 类型
pnpm typecheck

解决的问题

  • 修复 src/i18n/** 被 exclude 导致的类型检查缺失问题
  • 解决 i18next.d.ts 引用大量 JSON 导致的 tsc 性能问题

…ONS to use i18n

- Add Chinese string detection to i18n-check.ts script
- Simplify KNOWN_PERMISSIONS to only contain risk field
- Refactor getPermissionInfo() to return translated text via i18n
- Convert MiniappDetailActivity.tsx to use i18n for all UI strings
- Add permission translations to all 4 locale files (zh-CN, en, zh-TW, ar)
- Export permissions module from ecosystem service
- Add i18n-set.ts for batch setting translation keys across all locales
- Add i18n-delete.ts for removing translation keys from all locales
- Update i18n-check.ts to show quick tool usage hints on errors
- Support locale shortcuts (zh -> zh-CN, tw -> zh-TW)
- Support nested key paths (e.g., validation.required)
- Add scripts/dev.ts: multi-tab terminal manager with PTY support
- Add scripts/dev/: types, commands, process-manager, control-panel
- Add scripts/i18n-types.ts: i18next type generation using i18next-cli
- Add scripts/i18n-types-watch.ts: watch mode for i18n type updates
- Update package.json: new dev, i18n:types scripts, typecheck pre-generates types
- Update tsconfig.app.json: remove src/i18n/** exclude
- Update .gitignore: ignore generated i18n type files
- Install i18next-cli dependency

Features:
- Option+←/→ to switch tabs, ↑/↓ to select, Enter/S/R/Q for actions
- Process lifecycle management with zombie process handling
- Automatic i18n type generation before typecheck
test:storybook was running before workspace dependencies were built,
causing 'does not provide an export' errors when key-ui tried to
import from key-utils before it was compiled.
@Gaubee Gaubee merged commit d73dc90 into main Jan 20, 2026
5 checks passed
@Gaubee Gaubee deleted the opencode/playful-lagoon branch January 20, 2026 14:39
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.

2 participants