Skip to content

Commit f9f3682

Browse files
antfuclaude
andcommitted
fix(self-inspect): use floating PanelSideNav and improve UI
- Switch from grid layout to floating sidebar matching rolldown pattern - Re-enable dark mode toggle - Use VisualLoading for page loading states - Show short RPC function names with full name in tooltip - Use badges for schema indicators - Remove stale eslint-disable for removed module Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ff72034 commit f9f3682

File tree

7 files changed

+18
-21
lines changed

7 files changed

+18
-21
lines changed

packages/self-inspect/src/app/app.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ const { refresh, loading } = useRefresh()
4747
v-else-if="!connectionState.connected"
4848
text="Connecting..."
4949
/>
50-
<div v-else grid="~ cols-[max-content_1fr]" h-vh>
51-
<PanelSideNav :show-dark-mode-toggle="false" />
52-
<div flex="~ col" of-hidden>
53-
<div flex="~ items-center justify-end" border="b base" px2 h8 shrink-0>
50+
<div v-else h-vh w-screen max-w-screen max-h-screen of-hidden>
51+
<PanelSideNav />
52+
<div pl-12 h-full flex="~ col" of-hidden>
53+
<div flex="~ items-center justify-end" border="b base" px3 h8 shrink-0>
5454
<button
5555
p1.5 rounded
5656
hover:bg-active

packages/self-inspect/src/app/components/RpcFunctionsList.vue

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ function getNamespace(name: string) {
3737
return parts.slice(0, -1).join(':')
3838
}
3939
40+
function getShortName(name: string) {
41+
const parts = name.split(':')
42+
return parts.at(-1)!
43+
}
44+
4045
const grouped = computed(() => {
4146
const groups = new Map<string, typeof filtered.value>()
4247
for (const fn of filtered.value) {
@@ -100,8 +105,8 @@ const grouped = computed(() => {
100105
</thead>
101106
<tbody>
102107
<tr v-for="fn in fns" :key="fn.name" border="b base" hover:bg-active>
103-
<td px2 py1.5 font-mono text-xs>
104-
{{ fn.name }}
108+
<td px2 py1.5 font-mono text-xs :title="fn.name">
109+
{{ getShortName(fn.name) }}
105110
</td>
106111
<td px2 py1.5>
107112
<DisplayBadge :text="fn.type" />
@@ -111,8 +116,9 @@ const grouped = computed(() => {
111116
<span v-else op20>-</span>
112117
</td>
113118
<td px2 py1.5 text-center>
114-
<span v-if="fn.hasArgs || fn.hasReturns" text-xs op60>
115-
{{ fn.hasArgs ? 'args' : '' }}{{ fn.hasArgs && fn.hasReturns ? ' + ' : '' }}{{ fn.hasReturns ? 'returns' : '' }}
119+
<span v-if="fn.hasArgs || fn.hasReturns" flex="~ items-center justify-center gap-1">
120+
<DisplayBadge v-if="fn.hasArgs" text="args" />
121+
<DisplayBadge v-if="fn.hasReturns" text="returns" />
116122
</span>
117123
<span v-else op20>-</span>
118124
</td>

packages/self-inspect/src/app/composables/rpc.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { getDevToolsRpcClient } from '@vitejs/devtools-kit/client'
66
import { DEVTOOLS_MOUNT_PATH } from '@vitejs/devtools-kit/constants'
77
import { reactive, shallowRef } from 'vue'
88

9-
// eslint-disable-next-line unimport/auto-insert -- locally defined, not from rolldown
109
export const connectionState = reactive<{
1110
connected: boolean
1211
error: Error | null

packages/self-inspect/src/app/pages/docks.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ onMounted(fetchData)
1616
</script>
1717

1818
<template>
19-
<div v-if="!data" flex="~ items-center justify-center" h-full op50>
20-
Loading...
21-
</div>
19+
<VisualLoading v-if="!data" />
2220
<DocksList v-else :docks="data" />
2321
</template>

packages/self-inspect/src/app/pages/plugins.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ onMounted(fetchData)
1616
</script>
1717

1818
<template>
19-
<div v-if="!data" flex="~ items-center justify-center" h-full op50>
20-
Loading...
21-
</div>
19+
<VisualLoading v-if="!data" />
2220
<DevtoolsPluginsList v-else :plugins="data" />
2321
</template>

packages/self-inspect/src/app/pages/rpc.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ onMounted(fetchData)
2626
</script>
2727

2828
<template>
29-
<div v-if="!data" flex="~ items-center justify-center" h-full op50>
30-
Loading...
31-
</div>
29+
<VisualLoading v-if="!data" />
3230
<RpcFunctionsList v-else :functions="data" />
3331
</template>

packages/self-inspect/src/app/pages/scripts.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ onMounted(fetchData)
1616
</script>
1717

1818
<template>
19-
<div v-if="!data" flex="~ items-center justify-center" h-full op50>
20-
Loading...
21-
</div>
19+
<VisualLoading v-if="!data" />
2220
<ClientScriptsList v-else :scripts="data" />
2321
</template>

0 commit comments

Comments
 (0)