Skip to content

Commit bbeaf14

Browse files
committed
fix(ui): improve mobile shell and mcp catalog layout
1 parent dc8015d commit bbeaf14

6 files changed

Lines changed: 115 additions & 14 deletions

File tree

scripts/audit-wdc-ui.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ async function auditRoute(page, mode, route) {
227227

228228
await page.goto(`http://127.0.0.1:5190/#${route}`, { waitUntil: 'domcontentloaded', timeout: 5000 })
229229
await waitSettled(page)
230+
await closeTransientUi(page)
230231
entry.finalUrl = page.url()
231232
entry.title = await page.title().catch(() => null)
232233
entry.h1 = await page.locator('h1').first().textContent({ timeout: 1000 }).catch(() => null)

scripts/review-wdc-ui-ux.mjs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,11 @@ async function waitSettled(page) {
163163
await page.waitForTimeout(300)
164164
}
165165

166+
async function closeTransientUi(page) {
167+
await page.keyboard.press('Escape').catch(() => {})
168+
await page.waitForTimeout(120)
169+
}
170+
166171
async function setMode(page, mode) {
167172
await page.goto('http://127.0.0.1:5190/#/sites', { waitUntil: 'domcontentloaded', timeout: 5000 })
168173
await waitSettled(page)
@@ -204,10 +209,11 @@ try {
204209
const checks = []
205210
for (const vp of viewports) {
206211
await page.setViewportSize({ width: vp.width, height: vp.height })
207-
await setMode(page, routeEntry.mode)
208-
await page.goto(`http://127.0.0.1:5190/#${routeEntry.route}`, { waitUntil: 'domcontentloaded', timeout: 5000 })
209-
await waitSettled(page)
210-
const metrics = await page.evaluate(() => {
212+
await setMode(page, routeEntry.mode)
213+
await page.goto(`http://127.0.0.1:5190/#${routeEntry.route}`, { waitUntil: 'domcontentloaded', timeout: 5000 })
214+
await waitSettled(page)
215+
await closeTransientUi(page)
216+
const metrics = await page.evaluate(() => {
211217
const parseColor = (raw) => {
212218
const match = String(raw).match(/rgba?\(([^)]+)\)/)
213219
if (!match) return null

src/frontend/src/App.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,8 +498,8 @@ onUnmounted(() => {
498498
}
499499
500500
@media (max-width: 959px) {
501-
.sidebar-desktop {
502-
display: none;
501+
.app-body > .sidebar-desktop {
502+
display: none !important;
503503
}
504504
.hamburger-btn {
505505
display: flex;

src/frontend/src/components/layout/AppHeader.vue

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,4 +309,40 @@ function isActive(path: string) {
309309
}
310310
.update-label { letter-spacing: 0.02em; }
311311
312+
@media (max-width: 760px) {
313+
.app-header {
314+
padding: 0 8px;
315+
gap: 8px;
316+
}
317+
318+
.logo-copy,
319+
.conn-pill {
320+
display: none;
321+
}
322+
323+
.header-nav {
324+
justify-content: flex-start;
325+
overflow-x: auto;
326+
scrollbar-width: none;
327+
}
328+
329+
.header-nav::-webkit-scrollbar {
330+
display: none;
331+
}
332+
333+
.nav-tab {
334+
padding: 7px 10px;
335+
font-size: 0.78rem;
336+
}
337+
338+
.header-right {
339+
gap: 6px;
340+
}
341+
342+
.update-badge {
343+
min-width: 40px;
344+
padding: 0 8px;
345+
}
346+
}
347+
312348
</style>

src/frontend/src/components/mcp/McpOnboardingPanel.vue

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<div class="onboarding-title">
55
🚀 {{ t('mcpOnboarding.title') }}
66
</div>
7-
<el-button size="small" link @click="dismissed = true">
7+
<el-button size="small" text class="dismiss-btn" @click="dismissed = true">
88
{{ t('mcpOnboarding.dismiss') }}
99
</el-button>
1010
</div>
@@ -247,14 +247,40 @@ onBeforeUnmount(() => {
247247
display: flex; align-items: center; gap: 8px;
248248
}
249249
.recommended-tag { font-size: 10px; }
250-
.profile-desc { font-size: 12px; }
250+
.profile-desc { font-size: 13px; line-height: 1.45; }
251251
.profile-bullets {
252252
margin: 4px 0 0;
253253
padding-left: 16px;
254-
font-size: 11px;
254+
font-size: 12px;
255+
line-height: 1.4;
255256
color: var(--el-text-color-secondary);
256257
}
257258
.profile-bullets li { margin-bottom: 2px; }
258259
.profile-cta { margin-top: auto; align-self: flex-start; }
259260
.muted { color: var(--el-text-color-secondary); }
261+
.dismiss-btn {
262+
min-height: 32px;
263+
color: var(--wdc-text-2) !important;
264+
background: var(--wdc-surface-2) !important;
265+
border: 1px solid var(--wdc-border) !important;
266+
}
267+
.recommended-tag {
268+
min-height: 24px;
269+
font-size: 0.72rem;
270+
}
271+
272+
@media (max-width: 640px) {
273+
.mcp-onboarding-panel {
274+
padding: 14px;
275+
}
276+
277+
.onboarding-header {
278+
align-items: flex-start;
279+
gap: 8px;
280+
}
281+
282+
.profile-cards {
283+
grid-template-columns: 1fr;
284+
}
285+
}
260286
</style>

src/frontend/src/components/pages/McpKinds.vue

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -322,9 +322,9 @@ async function refresh(): Promise<void> {
322322

323323
<style scoped>
324324
.page { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
325-
.page-header { display: flex; align-items: center; justify-content: space-between; }
325+
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
326326
.page-header h2 { margin: 0; }
327-
.header-actions { display: flex; gap: 8px; }
327+
.header-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
328328
.lock-count-badge {
329329
display: inline-block;
330330
margin-left: 6px;
@@ -346,10 +346,15 @@ async function refresh(): Promise<void> {
346346
background: var(--el-border-color); margin: 0 4px;
347347
}
348348
.filter-toolbar {
349-
display: flex; gap: 8px; align-items: center;
349+
display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
350350
}
351-
.filter-toolbar .search-input { max-width: 280px; }
351+
.filter-toolbar .search-input { width: min(280px, 100%); }
352352
.filter-toolbar .plugin-select { width: 180px; }
353+
.filter-toolbar :deep(.el-input__wrapper),
354+
.filter-toolbar :deep(.el-select__wrapper),
355+
.filter-toolbar :deep(.el-radio-button__inner) {
356+
min-height: 32px;
357+
}
353358
.auto-approve-tag {
354359
cursor: pointer;
355360
user-select: none;
@@ -359,7 +364,8 @@ async function refresh(): Promise<void> {
359364
}
360365
.quick-grant-btn {
361366
margin-left: 6px;
362-
font-size: 11px;
367+
min-height: 28px;
368+
font-size: 0.76rem;
363369
}
364370
.always-confirm-tag {
365371
font-weight: 600;
@@ -369,4 +375,30 @@ async function refresh(): Promise<void> {
369375
.always-confirm-tag:hover {
370376
filter: brightness(1.1);
371377
}
378+
379+
@media (max-width: 900px) {
380+
.page-header {
381+
align-items: flex-start;
382+
flex-direction: column;
383+
}
384+
385+
.header-actions {
386+
justify-content: flex-start;
387+
}
388+
389+
.filter-toolbar .plugin-select,
390+
.filter-toolbar :deep(.el-radio-group) {
391+
width: 100%;
392+
}
393+
394+
.filter-toolbar :deep(.el-radio-group) {
395+
display: flex;
396+
flex-wrap: wrap;
397+
}
398+
399+
.quick-grant-btn {
400+
display: flex;
401+
margin: 4px 0 0;
402+
}
403+
}
372404
</style>

0 commit comments

Comments
 (0)