summaryrefslogtreecommitdiffhomepage
path: root/packages/ui/src
diff options
context:
space:
mode:
authorDavid Hill <[email protected]>2026-01-24 20:51:53 +0000
committerDavid Hill <[email protected]>2026-01-24 22:02:08 +0000
commit02aea77e9249af5701a29a06adf47e47cedf84f3 (patch)
tree797a3aaf12229b0961ff17558caa2a2b0a99beca /packages/ui/src
parenta98add29d1b5d5f834a69b0e25156d0f301a6ec8 (diff)
downloadopencode-02aea77e9249af5701a29a06adf47e47cedf84f3.tar.gz
opencode-02aea77e9249af5701a29a06adf47e47cedf84f3.zip
feat(app): update manage servers dialog styling and behavior
Diffstat (limited to 'packages/ui/src')
-rw-r--r--packages/ui/src/components/dialog.css2
-rw-r--r--packages/ui/src/hooks/use-filtered-list.tsx6
2 files changed, 7 insertions, 1 deletions
diff --git a/packages/ui/src/components/dialog.css b/packages/ui/src/components/dialog.css
index a0e7e111f..bc3e113bb 100644
--- a/packages/ui/src/components/dialog.css
+++ b/packages/ui/src/components/dialog.css
@@ -66,7 +66,7 @@
[data-slot="dialog-header"] {
display: flex;
- padding: 16px 16px 16px 24px;
+ padding: 20px;
justify-content: space-between;
align-items: center;
flex-shrink: 0;
diff --git a/packages/ui/src/hooks/use-filtered-list.tsx b/packages/ui/src/hooks/use-filtered-list.tsx
index e418b55d5..2d4e2bdd1 100644
--- a/packages/ui/src/hooks/use-filtered-list.tsx
+++ b/packages/ui/src/hooks/use-filtered-list.tsx
@@ -13,6 +13,7 @@ export interface FilteredListProps<T> {
sortBy?: (a: T, b: T) => number
sortGroupsBy?: (a: { category: string; items: T[] }, b: { category: string; items: T[] }) => number
onSelect?: (value: T | undefined, index: number) => void
+ noInitialSelection?: boolean
}
export function useFilteredList<T>(props: FilteredListProps<T>) {
@@ -57,6 +58,7 @@ export function useFilteredList<T>(props: FilteredListProps<T>) {
})
function initialActive() {
+ if (props.noInitialSelection) return ""
if (props.current) return props.key(props.current)
const items = flat()
@@ -71,6 +73,10 @@ export function useFilteredList<T>(props: FilteredListProps<T>) {
})
const reset = () => {
+ if (props.noInitialSelection) {
+ list.setActive("")
+ return
+ }
const all = flat()
if (all.length === 0) return
list.setActive(props.key(all[0]))