Skip to content

Commit 31565f9

Browse files
committed
fix(datagrid): address code review issues
1 parent 46395a3 commit 31565f9

4 files changed

Lines changed: 15 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10-
### Fixed
11-
12-
- Changing the editor or data grid font size in Appearance settings now applies immediately and persists across relaunch, instead of resetting and leaving orphan custom themes behind (#1381)
13-
- Opening a table in a new tab now restores saved hidden columns before the first load, so the initial query matches the visible column set
1410
### Added
1511

1612
- Cloudflare Tunnel: connect to a database behind Cloudflare Access by letting TablePro start and stop `cloudflared access tcp` for you, the same way it manages SSH tunnels. Configure it per connection with browser sign-in or a service token. Needs cloudflared installed (`brew install cloudflared`). (#1285)
@@ -29,10 +25,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2925

3026
### Fixed
3127

28+
- Changing the editor or data grid font size in Appearance settings now applies immediately and persists across relaunch, instead of resetting and leaving orphan custom themes behind (#1381)
29+
- Opening a table in a new tab now restores saved hidden columns before the first load, so the initial query matches the visible column set
3230
- Installing or updating a plugin right after updating TablePro now refetches the current plugin list first, so it no longer fails against a stale cached list (the error a restart used to clear). (#1380)
3331
- Pressing Esc to close the Raw SQL filter suggestions, or to clear a search field, no longer also exits fullscreen. (#1403)
3432
- Connecting an OAuth-capable MCP client like Claude Code with an invalid or expired token now shows a clear error instead of a confusing "Invalid OAuth error response". (#1409)
3533
- Data grid row context menus now copy the clicked or focused cell value for Copy, while Copy Rows still keeps the full-row TSV action.
34+
- The JSON detail popover now shows long string values up to 300 characters in the tree view instead of cutting them off at 80.
3635

3736
## [0.44.0] - 2026-05-23
3837

TablePro/Core/Coordinators/FilterCoordinator.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ final class FilterCoordinator {
423423

424424
func clearFilterState() {
425425
mutateSelectedTabFilterState { state in
426-
state.isVisible = false
426+
state.isVisible = true
427427
state.filters = []
428428
state.appliedFilters = []
429429
}

TablePro/Models/UI/JSONTreeNode.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ internal enum JSONTreeParseError: Error {
5757
internal enum JSONTreeParser {
5858
private static let maxNodes = 5_000
5959
private static let maxInputLength = 100_000
60+
private static let maxDisplayLength = 300
6061

6162
static func parse(_ jsonString: String) -> Result<JSONTreeNode, JSONTreeParseError> {
6263
guard (jsonString as NSString).length <= maxInputLength else {
@@ -108,9 +109,15 @@ internal enum JSONTreeParser {
108109
case .string(let raw):
109110
let decoded = JsonSyntaxParser.decodeStringLiteral(raw)
110111
let escaped = decoded.replacingOccurrences(of: "\"", with: "\\\"")
112+
let display: String
113+
if (escaped as NSString).length > maxDisplayLength {
114+
display = "\"\((escaped as NSString).substring(to: maxDisplayLength))...\""
115+
} else {
116+
display = "\"\(escaped)\""
117+
}
111118
return JSONTreeNode(
112119
key: key, keyPath: keyPath, valueType: .string,
113-
displayValue: "\"\(escaped)\"", rawValue: decoded, children: []
120+
displayValue: display, rawValue: decoded, children: []
114121
)
115122

116123
case .number(let raw):

TablePro/Views/Main/Extensions/MainContentView+Setup.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,10 @@ extension MainContentView {
6767
selectedTab.tableContext.databaseName != session.activeDatabase
6868
{
6969
await coordinator.switchDatabase(to: selectedTab.tableContext.databaseName)
70+
} else if coordinator.selectedTabHiddenColumns.isEmpty {
71+
coordinator.runQuery()
7072
} else {
71-
coordinator.executeTableTabQueryDirectly()
73+
coordinator.requeryWithColumnScope()
7274
}
7375
} else {
7476
coordinator.needsLazyLoad = true

0 commit comments

Comments
 (0)