mirror of
https://github.com/volcengine/OpenViking.git
synced 2026-09-29 04:02:57 +08:00
* feat(web-studio): PWA, mobile UI polish, OAuth-setup tab, request-logs touch-ups
PWA & install
- manifest 192/512 + maskable icons, service-worker registration in main.tsx,
apple-mobile-web-app meta + viewport-fit=cover in index.html.
- openviking/server/app.py: redirect "/" -> "/studio/" so the PWA install
start_url resolves correctly when accessed from the bare host.
OAuth setup as its own tab
- New /studio/oauth/setup route + OAuthSetupDialog; sidebar footer entry
routes to the dialog on >=md and to the dedicated page on phone (mobile
fullscreen dialogs are hard to dismiss). OTP form extracted from the
connection dialog into a reusable component.
Mobile UI fixes
- Home metric chips: grid minmax 92px -> 140px, removed truncate so chips
wrap instead of clipping.
- Context-commits tooltip: clamps into viewport on narrow screens.
- Context-commits heatmap: auto-scrolls to rightmost (latest) on items
change so phone view opens on the current week.
- Dialog: max-h-[calc(100dvh-2rem)] + overflow-y-auto for phone overflow.
- FS page (resources):
* full-height container uses calc(100svh-6rem) + symmetric -my-6 so the
outer ScrollArea no longer overflows by parent's py-6.
* inner overlay-style scrollbars on phone (matches iOS / Atlas).
* PWA standalone mode hides the outer page scrollbar on this route.
* Tighter row density on phone (text-xs / py-1) to match Atlas.
* FolderIcon size-5 -> size-4 so folder and file text columns align.
* Folder highlight only when no file is selected (clean single-select).
* Toolbar refresh button: size-icon-sm + pl-4 to align with the header
sidebar trigger on phone.
- Find-palette: phone-center + max-h-[calc(100svh-2rem)] (was top-anchored
+ 84vh). Search input min font-size 16px to dodge iOS auto-zoom; same
treatment in the retrieval search bar.
Request logs
- Time column: dot-separated YYYY.MM.DD HH:MM:SSam/pm (compact, no locale
variance).
- Total calls clamps display at "999+".
- Pagination row: justify-center on phone (sm:justify-between preserved).
i18n
- Retrieval placeholder: "Search context" / "输入检索内容".
- Find-palette placeholder: "Search" / "搜索".
- Context-commits title: drop "in the last year" (range chip still shows).
- find / search labels: drop the parentheses.
- Workspace sidebar header: "OpenViking Studio".
Build verified after each change. Phone view validated via Chromium
emulation; iOS PWA-mode scrollbar fix scoped behind
@media (display-mode: standalone).
* feat(web-studio): more mobile polish and viewer-tz bucket shift for commit heatmap
PR #2178 follow-ups based on phone PWA testing:
Context commits heatmap (Home)
- Re-bucket UTC (date, hour_bucket) 4h rows into viewer-local (date,
hour) before daily aggregation, so a UTC+8 viewer's "today" cell holds
the right local-day count instead of UTC's. Pure client-side relabel —
each bucket's count is preserved, just attributed to the correct local
date. Daily / "today_tokens" aggregates can't be rebucketed this way
and still need the backend tz work (separate follow-up).
- Auto-scroll: align viewport's right edge with the rightmost rendered
rect's right edge (not the SVG's hardcoded width=820 right edge), so
the ~50px of trailing SVG padding stays off-screen on phone.
- Wrap the scroll write in requestAnimationFrame so HeatMap has a tick
to lay out its SVG; otherwise scrollWidth equals clientWidth and the
scroll snaps to the left (oldest) edge.
FS / resources route polish
- File tree: clicking a folder row now toggles expand/collapse in
addition to opening the folder (chevron icon still works alone via
stopPropagation, no double-toggle).
- File tree: parent passes selectedFileUri only when the selected entry
is actually a file; opening a folder no longer leaves it competing
with the parent's directory highlight.
- File tree: session subtree (any URI under viking://session/) sorts
children by modTimestamp DESC instead of name, so the most recent
session shows first.
- FolderIcon size-5 -> size-4 to match File icon and chevron, so folder
and file rows share the same text x-offset at every depth.
- Toolbar: refresh Button now uses size="icon-sm" + pl-4 on the toolbar
so its icon center aligns vertically with the header's sidebar
trigger on phone.
- Breadcrumb nav: overflow-hidden -> overflow-x-auto + whitespace-nowrap
+ flex-1 so long paths scroll horizontally on phone instead of being
cut off invisibly.
formatModTime
- Parse time-only mod_time strings ("HH:MM:SS", "12:34am" etc) against
UTC today + Z marker — backend's format_simplified uses UTC's "today"
reference, not the viewer's local today, so the prior local-today
prefix mis-attributed days for non-UTC viewers.
- Date-only mod_time ("YYYY-MM-DD") renders as-is; we don't fake an
"00:00" time component that doesn't exist.
JSONL dialog
- Cards: drop ml-auto / mx-auto / mr-auto chat-bubble alignment;
switch w-fit max-w-[min(820px,88%)] to w-full min-w-0 max-w-full so
long expanded messages, tool-call JSON, and markdown tables can use
the full pane width and trigger their own internal overflow-auto
instead of pushing the article wider than the viewport.
- List container picks up min-w-0 so the flex column can shrink.
- Kind distinction now color-only (bg / border).
Request-logs pagination
- justify-center on phone for both the summary row and the pagination
control row; sm:justify-between / sm:justify-end preserved on tablet+.