fix: enable horizontal scroll in entity lookup and increase timeout to 120s
Replace Radix ScrollArea with plain overflow-auto div to allow nested horizontal scrolling in lookup result tables. Add overflow-auto to table containers. Increase per-database search timeout from 30s to 120s. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -49,7 +49,7 @@ async fn search_database(
|
|||||||
};
|
};
|
||||||
|
|
||||||
let result = tokio::time::timeout(
|
let result = tokio::time::timeout(
|
||||||
std::time::Duration::from_secs(30),
|
std::time::Duration::from_secs(120),
|
||||||
search_database_inner(&pool, database, column_name, value),
|
search_database_inner(&pool, database, column_name, value),
|
||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
@@ -65,7 +65,7 @@ async fn search_database(
|
|||||||
Err(_) => LookupDatabaseResult {
|
Err(_) => LookupDatabaseResult {
|
||||||
database: database.to_string(),
|
database: database.to_string(),
|
||||||
tables: vec![],
|
tables: vec![],
|
||||||
error: Some("Timeout (30s)".to_string()),
|
error: Some("Timeout (120s)".to_string()),
|
||||||
search_time_ms: start.elapsed().as_millis(),
|
search_time_ms: start.elapsed().as_millis(),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import { useState, useCallback, useMemo } from "react";
|
|||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { Input } from "@/components/ui/input";
|
import { Input } from "@/components/ui/input";
|
||||||
import { Badge } from "@/components/ui/badge";
|
import { Badge } from "@/components/ui/badge";
|
||||||
import { ScrollArea } from "@/components/ui/scroll-area";
|
|
||||||
import {
|
import {
|
||||||
Popover,
|
Popover,
|
||||||
PopoverContent,
|
PopoverContent,
|
||||||
@@ -253,7 +252,7 @@ export function EntityLookupPanel({ connectionId }: Props) {
|
|||||||
{(result.total_time_ms / 1000).toFixed(1)}s
|
{(result.total_time_ms / 1000).toFixed(1)}s
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ScrollArea className="h-full">
|
<div className="h-full overflow-auto">
|
||||||
<div className="flex flex-col gap-2 p-4">
|
<div className="flex flex-col gap-2 p-4">
|
||||||
{matchedDbs.map((dbResult) => (
|
{matchedDbs.map((dbResult) => (
|
||||||
<LookupResultGroup
|
<LookupResultGroup
|
||||||
@@ -275,7 +274,7 @@ export function EntityLookupPanel({ connectionId }: Props) {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</ScrollArea>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ export function LookupResultGroup({ dbResult }: Props) {
|
|||||||
</button>
|
</button>
|
||||||
|
|
||||||
{isOpen && table.columns.length > 0 && (
|
{isOpen && table.columns.length > 0 && (
|
||||||
<div className="h-[200px] border-t">
|
<div className="h-[200px] overflow-auto border-t">
|
||||||
<ResultsTable
|
<ResultsTable
|
||||||
columns={table.columns}
|
columns={table.columns}
|
||||||
types={table.types}
|
types={table.types}
|
||||||
|
|||||||
Reference in New Issue
Block a user