Skip to content

feat(web-studio): add frontend console workspace#2128

Merged
qin-ctx merged 135 commits into
volcengine:mainfrom
Ferry-200:upstream-pr/web-studio
May 20, 2026
Merged

feat(web-studio): add frontend console workspace#2128
qin-ctx merged 135 commits into
volcengine:mainfrom
Ferry-200:upstream-pr/web-studio

Conversation

@Ferry-200
Copy link
Copy Markdown
Contributor

@Ferry-200 Ferry-200 commented May 19, 2026

This PR is frontend-only and primarily touches web-studio/.

It consumes existing OpenViking APIs and the Console BFF already present in the target branch from #2016. It does not introduce new backend contracts, and it keeps raw OV Server contracts centralized under web-studio/types/ov-server/ for the first PR’s actual API surface.

What changed

  • Replayed the Web Studio merge history on a clean branch while preserving commit granularity.
  • Moved route-private session logic into web-studio/src/lib/sessions/.
  • Scoped ResourceUploadProvider to the Resources route instead of the global app shell.
  • Updated the Web Studio formatting scope to match the lint scope, excluding generated client files and UI primitives from checks.
  • Kept the first PR frontend-only and avoided hand-written /api/v1/console/* paths.

Validation

  • npm --prefix web-studio run lint
  • npm --prefix web-studio run build
  • npm --prefix web-studio run format

Notes

  • Generated client output continues to come from the target branch OpenAPI.
  • Backend-dependent features such as resource tags, bot file attachments, config editing, and token-level bot streaming are intentionally omitted or degraded for this first PR.
img_v3_0211r_b9b651c4-3df1-4e0a-9bb7-27513dc1fd6g img_v3_0211r_ac866ead-ae8d-4787-a880-0bb872e87feg img_v3_0211r_765f475b-ab89-45e9-bf1d-07eb91062bfg img_v3_0211r_376b0c89-8712-4eaa-9f37-f5ecda5c3b6g img_v3_0211r_aff87133-13e5-463a-8e29-5a665aef4d5g img_v3_0211r_45646815-94b8-47b8-8787-dfa07cfc4c7g img_v3_0211r_d458420b-771e-4f55-992c-9ba93d98560g
2026-05-19.17-52-33.mov

Ferry-200 and others added 30 commits May 19, 2026 13:26
- 新增顶栏(全宽) + 左侧边栏 + 右侧内容区的三段式布局
- 将 Data 大页面拆分为独立路由: FileSystem、Find、Add Memory
- 将 Access 页面迁移为独立的 Settings 页面
- 侧边栏按 Data/Ops/Access 分组显示导航项
- 提取共享工具函数到 data-utils.ts
- 修复 .gitignore 中 data/ 规则误匹配子目录的问题
- Add i18next with browser language detection (zh-CN / en)
- Add language switcher dropdown in header bar
- Add dark/light theme toggle with animated Sun/Moon icons
- Wire up next-themes ThemeProvider with class-based dark mode
- Replace shadcn dark theme with default Zinc (neutral gray)
- Connect sidebar labels to i18n translation keys
- Fix dropdown menu forced dark styling
- Added translation support for the PlaceholderPage component, including layout notes and current status descriptions.
- Updated use-app-connection hook to return connection identity summaries with translation keys.
- Enhanced server mode descriptions with translation keys in the use-server-mode hook.
- Introduced a new resources file for managing translations in English and Chinese.
- Updated admin, operations, resources, and sessions routes to utilize translations for titles, descriptions, and highlights.
- Refactored error handling in the ov-client to improve clarity and maintainability.
- Improved utility functions for better type handling and code readability.
@github-actions
Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🏅 Score: 80
🧪 No relevant tests
🔒 No security concerns identified
✅ No TODO sections
🔀 No multiple PR themes
⚡ No major issues detected

@github-actions
Copy link
Copy Markdown

PR Code Suggestions ✨

No code suggestions found for the PR.

Copy link
Copy Markdown
Collaborator

@qin-ctx qin-ctx left a comment

Choose a reason for hiding this comment

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

I found one blocking security issue around credential persistence, plus one non-blocking production-hardening suggestion.

}

try {
window.localStorage.setItem(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[Bug] (blocking) This persists the full ConnectionDraft into localStorage, and ConnectionDraft includes apiKey. The README says the API key should only live in sessionStorage, but after saving the connection this writes it into ov_console_connection and keeps it across browser restarts. That materially increases credential exposure for any same-origin XSS, malicious dependency script, browser extension, or shared-machine access. Please keep localStorage limited to non-secret fields such as baseUrl, accountId, and userId, explicitly drop/clean any previously stored apiKey, and leave the API key in sessionStorage or behind an explicit user opt-in.

<Outlet />
</AppShell>
<Toaster />
<TanStackDevtools
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[Suggestion] (non-blocking) This renders TanStack Devtools unconditionally, so production Web Studio users can inspect router/search state such as session ids and resource URIs. Please gate this behind import.meta.env.DEV or a dedicated debug build flag, and consider keeping the devtools packages out of runtime dependencies.

@qin-ctx qin-ctx merged commit e4d9f90 into volcengine:main May 20, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in OpenViking project May 20, 2026
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@Ferry-200 @qin-ctx feedback on @hey-api would be welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

7 participants