Object tree: add a control to read the objects again
I maintainer di solito rispondono entro 1 giorno
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Summary
The object tree has no control a user can press to read it again.
It re-reads only when a statement run inside Studio changes the catalog, so a table created by another client, a migration, or a teammate does not show up until the page is reloaded.
The Source tab already has this control since #1407 ("Read this definition again" in its header, data-testid="object-source-refresh").
The tree is the missing half.
What exists already
useTreeNodesreturnsrefresh()(src/components/object-tree/use-tree-nodes.ts), which re-issues the container read and every expanded folder's read without collapsing the tree.ObjectTreetakes arefreshTokenprop and callsrefresh()when it changes (src/components/object-tree/ObjectTree.tsx, the effect onrefreshToken).- Both shells own a counter for it:
objectRefreshTokenandobjectsChangedinsrc/components/Studio.tsx, andobjectRefreshTokeninsrc/workspace/StudioWorkspace.tsx.
So no new read path is needed: the button calls the existing refresh.
What to do
- Add an icon button with
aria-label="Read the objects again"above the tree insrc/components/sidebar/Sidebar.tsx, next to the Objects / Keys switch, shown only while the object tree is shown.
UseRefreshCwfromlucide-react, as the Source tab and the Keys panel do. - Pressing it calls the tree's
refresh()directly, or bumps a counter the tree already listens to. Do not add a second counter besideobjectRefreshToken; if the shell's counter is used, note that it also marks open Source tabs stale, and decide in the PR whether that is wanted. - Disable it while a deferred tree (
deferred, the "Do not read the object list on connect" setting) has not been loaded yet, so it never starts a read the user opted out of. - The embedded package shell (
StudioWorkspace) renders the sameSidebar, so check the button there too.
Tests
tests/components/object-tree.test.tsxor a sidebar test: pressing the button issues a freshcontainersread, keeps an expanded container expanded, and shows an object the second answer adds.- A deferred tree: the button is disabled and pressing it reads nothing.
Acceptance criteria
- A table created from another client appears in the tree after pressing the button, without a page reload.
- Expanded containers stay expanded across the refresh.
- The button has an accessible name and works from the keyboard.
-
bun run test:coverage && bun run coverage:checkstays at 100% line coverage.
- Lingua principale
- TypeScript
- Stelle
- 810
- Fork
- 158
- Merge medio
- 10h 9m
- PR unite (30g)
- 603
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di libredb/libredb-studio
-
[BUG] inspect_schema matches named container case-insensitively without preferring exact matchForse già presa @Maaz2212 l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
libredb/libredb-studio#2128 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] Multi-statement query sent to single-statement route (/api/db/query) answers HTTP 500 (D88)Apertabug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
libredb/libredb-studio#2021 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] VS Code extension runs a write without the confirmation dialog the web editor showsForse già presa @MarcBasas l’ha presa 7 giorni fa. Apertabug hacktoberfest help wanted
Difficoltà 3/5 1-2 giorni Idoneità per principianti 76/100
libredb/libredb-studio#1935 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[FEATURE] registering a TOTP authenticator using a QR CodeForse già presa @khaledCSE l’ha presa 5 giorni fa. Apertaenhancement hacktoberfest help wanted security
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
libredb/libredb-studio#1826 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[FEATURE] kafka: show every member of a classic consumer group and flag an unreadable oneForse già presa @T-Zaid l’ha presa 13 giorni fa. Apertaenhancement kafka
Difficoltà 4/5 3-5 giorni Idoneità per principianti 15/100
libredb/libredb-studio#1796 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di libredb/libredb-studio
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
Equal-Vote/bettervoting#1754 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
Doist/todoist-sdk-typescript#740 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
privatenumber/cleye#47 ·
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:auth-provider issue-rating: 🦞 diamond lobster no-stale P1
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
steipete/oracle#614 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
MoonshotAI/kimi-code#4591 ·
I maintainer di solito rispondono entro 1 giorno