Skip to content

feat(sidebar): recent tables section (opt-in)#1484

Open
J2TeamNNL wants to merge 33 commits into
TableProApp:mainfrom
J2TeamNNL:recent-tables
Open

feat(sidebar): recent tables section (opt-in)#1484
J2TeamNNL wants to merge 33 commits into
TableProApp:mainfrom
J2TeamNNL:recent-tables

Conversation

@J2TeamNNL
Copy link
Copy Markdown
Contributor

Restores the Recent tables section dropped from #1422 (commit 4b76452) for separate review, and adds a setting to toggle it.

Changes

  • Restore Recent tables (RecentTablesStore in-memory, last 10 per connection+database, push-on-open, Recent section in the Tables tab, tests, docs, CHANGELOG Favorite tables and recent tables #1352). Recovered by reverting the removal commit.
  • New setting General > Sidebar > Show recent tables, default OFF. When off the section is hidden and no opens are recorded. Added GeneralSettings.showRecentTables (backward-compatible decode), settings UI toggle, gating in SidebarView and MainContentCoordinator+Navigation, settings docs, and GeneralSettingsTests.

Review focus

  1. Nghiep vu: scope per connection+database, cap 10, in-memory only, opt-in default off.
  2. Trai nghiem: vi tri Recent section, hanh vi khi bat/tat setting.

Verification

Build/lint not run here (no Xcode in this env), needs CI. Restored code previously compiled on sidebar; verified TableRow / SidebarContextMenu / RecentTablesStore.Entry signatures still match. New test file is auto-included via the project's synchronized file groups.

J2TeamNNL and others added 30 commits May 25, 2026 18:27
…verflow fix

- Recent tables section at top of Tables sidebar (last 10 per connection/database,
  in-memory, clears on quit). RecentTablesStore pushes on every openTableTab call.
- TableRow trailing star button toggles favorite inline; overlay star badge removed.
  Add/Remove Favorites dropped from SidebarContextMenu (star button replaces it).
- Favorites tab now has only Tables and Queries sections (Recent removed).
- Plus button next to sidebar search field opens Create Table tab; disabled in safe mode.
- Window minimum width now recomputes dynamically when sidebar or inspector
  collapse/expand, preventing layout overflow on small windows.
- feat(sync): add syncTableFavorites toggle to SyncSettings and SyncSection
- refactor(sidebar): scope FavoriteTablesStorage by (connectionId, schema, name) instead of global table name
- fix(sync): gate tableFavorite push/apply/clear behind syncTableFavorites setting
- fix(storage): add NSLock to FavoriteTablesStorage for thread safety
- refactor(storage): change RecentTablesStore.Key.database to String? with nilIfEmpty convention
- fix(changelog): add View ER Diagram removal entry
- test: update FavoriteTablesStorageTests for connection-scoped favorites
- test: update SyncRecordMapperFavoriteTableTests with connectionId and schema
- test: add nil-database test to RecentTablesStoreTests
- test(ui): add window minimum size assertion
# Conflicts:
#	CHANGELOG.md
#	TablePro/Resources/Localizable.xcstrings
Signed-off-by: Ngô Quốc Đạt <datlechin@gmail.com>
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@github-actions
Copy link
Copy Markdown
Contributor

Thank you for your contribution! Before we can merge this PR, you need to sign our Contributor License Agreement.

To sign, please comment below with:

I have read the CLA Document and I hereby sign the CLA.


I have read the CLA Document and I hereby sign the CLA.


1 out of 2 committers have signed the CLA.
✅ (J2TeamNNL)[https://github.com/J2TeamNNL]
@claude
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Remove private entryId helper — push now constructs Entry first and
deduplicates via Entry.id, keeping a single identity source.

Add ClearAll test covering two keys (nil and string database).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants