Skip to content

Commit ef45af8

Browse files
committed
Merge remote-tracking branch 'upstream/main' into recent-tables
# Conflicts: # .gitignore # CHANGELOG.md # CLAUDE.md # TablePro/Core/Services/Infrastructure/MainSplitViewController.swift # TablePro/Views/Settings/GeneralSettingsView.swift # TablePro/Views/Sidebar/FavoritesTabView.swift # TablePro/Views/Sidebar/SchemaPickerControl.swift # TablePro/Views/Sidebar/SidebarContextMenu.swift # TablePro/Views/Sidebar/SidebarView.swift # TablePro/Views/Sidebar/TableRowView.swift # TableProTests/Views/TableRowLogicTests.swift # docs/features/favorites.mdx
2 parents de36083 + 790b61b commit ef45af8

390 files changed

Lines changed: 14356 additions & 4809 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Known divergent shared contracts pending Phase 1 consolidation (R-001 / R-002).
2+
# scripts/audit-refactor-health.sh --check fails when a shared contract diverges
3+
# that is NOT listed here. Burn this list down as contracts move into TableProCore;
4+
# never add a fresh entry just to make new divergence pass.
5+
#
6+
# Format: <kind>:<key>
7+
# pluginkit:<path under the PluginKit tree that differs or exists in only one tree>
8+
# databasetype:<file defining a production DatabaseType other than the TableProCore source>
9+
10+
databasetype:TablePro/Models/Connection/DatabaseConnection.swift

.github/macos-test-quarantine.txt

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Quarantined macOS test suites (skipped by the macOS Tests CI gate).
2+
#
3+
# These suites fail or hang in the headless XCTest host for reasons documented below,
4+
# not because the app code is wrong. The gate runs every other suite. Burn this list
5+
# down: fix a suite, delete its line, and it rejoins the gate. See
6+
# specs/claude-code-refactor-roadmap.md and the macOS-test gotchas note.
7+
#
8+
# Format: one Swift Testing suite type name per line. '#' starts a comment.
9+
10+
# --- Hangs: real Network-framework transport harness with no timeout (blocks forever headless)
11+
MCPBridgeIntegrationTests
12+
13+
# --- Driver-dependent: bundled .tableplugin drivers do not activate in the headless test
14+
# host (only plugin metadata loads), so driver-backed SQL generation returns empty.
15+
TableOperationsPluginTests
16+
TableQueryBuilderFilteredQueryTests
17+
FilterSQLGeneratorTests
18+
SQLCompletionProviderTests
19+
SQLStatementGeneratorPKRegressionTests
20+
SQLStatementGeneratorCompositePKTests
21+
EtcdQueryBuilderBrowseTests
22+
EtcdQueryBuilderCountTests
23+
EtcdQueryBuilderFilteredTests
24+
EtcdQueryBuilderTagTests
25+
EtcdPrefixRangeEndTests
26+
DataChangeManagerClickHouseTests
27+
OracleCellFormattingTests
28+
QueryExecutorTests
29+
ClickHouseDialectTests
30+
ValidateDriverDescriptorTests
31+
PluginCapabilityTests
32+
FreeTDSClassifierTests
33+
DatabaseTypeCassandraTests
34+
RowOperationsManagerBinaryCopyTests
35+
RowOperationsManagerTests
36+
StructureGridDelegateAddRowTests
37+
SaveCompletionTests
38+
ChangeReapplyVersionTests
39+
40+
# --- Persistence-entangled: tests assume lowercase enum values but rawValues are
41+
# display-style ("Red"/"Private Key"); changing them needs a Codable migration.
42+
ConnectionSharingTests
43+
ConnectionURLFormatterSSHProfileTests
44+
DatabaseConnectionExternalAccessTests
45+
DataGridSettingsDefaultSortDecoderTests
46+
47+
# --- Environment-coupled: iCloud entitlement, locally-installed apps, or live network.
48+
MCPHttpServerTransportTests
49+
MCPPairingServiceTests
50+
MCPBearerTokenAuthenticatorTests
51+
TablePlusImporterTests
52+
SequelAceImporterTests
53+
DBeaverImporterTests
54+
ForeignAppImporterRegistryTests
55+
HostKeyStoreTests
56+
KeychainHelperTests
57+
58+
# --- Genuine drift needing per-test investigation (some tests are likely wrong).
59+
StructureChangeManagerUndoTests
60+
DataChangeManagerExtendedTests
61+
DataChangeManagerTests
62+
CoordinatorEditorLoadTests
63+
CoordinatorColumnVisibilityTests
64+
CommandActionsDispatchTests
65+
SidebarViewModelTests
66+
ChatToolSpecCopilotTests
67+
SQLStatementScannerLocatedTests

.github/workflows/build-plugin.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,9 @@ jobs:
425425
426426
if git push; then
427427
echo "Registry updated on attempt $attempt"
428+
curl -sf "https://purge.jsdelivr.net/gh/TableProApp/plugins@main/plugins.json" >/dev/null \
429+
&& echo "Purged jsDelivr cache for plugins.json" \
430+
|| echo "::warning::jsDelivr purge request failed; the cache will refresh on its own shortly"
428431
break
429432
fi
430433

.github/workflows/build.yml

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,57 @@ jobs:
3030
- name: Run SwiftLint
3131
run: swiftlint lint --strict
3232

33+
test:
34+
name: macOS Tests
35+
runs-on: macos-26
36+
timeout-minutes: 40
37+
38+
steps:
39+
- name: Checkout code
40+
uses: actions/checkout@v4
41+
42+
- name: Select Xcode
43+
uses: maxim-lobanov/setup-xcode@v1
44+
with:
45+
xcode-version: '26.4.1'
46+
47+
- name: Install xcbeautify
48+
run: brew list xcbeautify &>/dev/null || brew install xcbeautify
49+
50+
- name: Download static libraries
51+
env:
52+
GH_TOKEN: ${{ github.token }}
53+
run: scripts/download-libs.sh --force
54+
55+
- name: Create Secrets.xcconfig
56+
env:
57+
ANALYTICS_HMAC_SECRET: ${{ secrets.ANALYTICS_HMAC_SECRET }}
58+
run: echo "ANALYTICS_HMAC_SECRET = ${ANALYTICS_HMAC_SECRET}" > Secrets.xcconfig
59+
60+
- name: Run package tests
61+
run: swift test --package-path Packages/TableProCore
62+
63+
- name: Run app tests
64+
run: |
65+
set -o pipefail
66+
SKIP_ARGS=()
67+
while IFS= read -r line; do
68+
suite="${line%%#*}"
69+
suite="$(echo "$suite" | xargs)"
70+
[ -z "$suite" ] && continue
71+
SKIP_ARGS+=("-skip-testing:TableProTests/$suite")
72+
done < .github/macos-test-quarantine.txt
73+
xcodebuild test \
74+
-project "$XCODE_PROJECT" \
75+
-scheme "$XCODE_SCHEME" \
76+
-destination "platform=macOS" \
77+
-only-testing:TableProTests \
78+
"${SKIP_ARGS[@]}" \
79+
-parallel-testing-enabled NO \
80+
-skipPackagePluginValidation \
81+
CODE_SIGNING_ALLOWED=NO \
82+
| xcbeautify --renderer github-actions
83+
3384
build-arm64:
3485
name: Build ARM64
3586
runs-on: macos-26
@@ -265,10 +316,28 @@ jobs:
265316
build/Release/TablePro-*.dmg
266317
build/Release/TablePro-*.zip
267318
319+
registry-readiness:
320+
name: Registry Readiness
321+
runs-on: macos-26
322+
if: startsWith(github.ref, 'refs/tags/v')
323+
timeout-minutes: 5
324+
325+
steps:
326+
- name: Checkout code
327+
uses: actions/checkout@v4
328+
329+
- name: Verify registry has compatible plugin binaries
330+
run: |
331+
MANAGER="TablePro/Core/Plugins/PluginManager.swift"
332+
CURRENT=$(grep -E 'static let currentPluginKitVersion = ' "$MANAGER" | grep -oE '[0-9]+' | head -1)
333+
FLOOR=$(grep -E 'static let minimumCompatiblePluginKitVersion = ' "$MANAGER" | grep -oE '[0-9]+' | head -1)
334+
echo "PluginKit floor=$FLOOR current=$CURRENT"
335+
python3 scripts/check-registry-readiness.py --floor "$FLOOR" --current "$CURRENT"
336+
268337
release:
269338
name: Create GitHub Release
270339
runs-on: macos-26
271-
needs: [lint, build-arm64, build-x86_64]
340+
needs: [lint, test, build-arm64, build-x86_64, registry-readiness]
272341
if: startsWith(github.ref, 'refs/tags/v')
273342
timeout-minutes: 10
274343
permissions:
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Contract Drift
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "Plugins/TableProPluginKit/**"
7+
- "Packages/TableProCore/Sources/TableProPluginKit/**"
8+
- "Packages/TableProCore/Sources/TableProModels/**"
9+
- "TablePro/Models/**"
10+
- "TableProMobile/**"
11+
- "scripts/audit-refactor-health.sh"
12+
- ".github/duplicate-contract-baseline.txt"
13+
- ".github/workflows/contract-drift.yml"
14+
push:
15+
branches: [main]
16+
paths:
17+
- "Plugins/TableProPluginKit/**"
18+
- "Packages/TableProCore/Sources/TableProPluginKit/**"
19+
- "Packages/TableProCore/Sources/TableProModels/**"
20+
- "TablePro/Models/**"
21+
- "TableProMobile/**"
22+
- "scripts/audit-refactor-health.sh"
23+
- ".github/duplicate-contract-baseline.txt"
24+
- ".github/workflows/contract-drift.yml"
25+
workflow_dispatch:
26+
27+
concurrency:
28+
group: contract-drift-${{ github.ref }}
29+
cancel-in-progress: true
30+
31+
jobs:
32+
drift:
33+
name: Shared contract drift
34+
runs-on: ubuntu-latest
35+
timeout-minutes: 5
36+
steps:
37+
- uses: actions/checkout@v4
38+
- name: Fail on new duplicate-contract drift
39+
run: scripts/audit-refactor-health.sh --check

.github/workflows/ios-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ jobs:
5757
uses: actions/cache@v4
5858
with:
5959
path: Libs
60-
# Include the FreeTDS stub header in the cache key so iOS xcframework refreshes
61-
# whenever the C bridge surface (e.g. new symbol declarations) changes.
62-
key: ${{ runner.os }}-libs-${{ hashFiles('Libs/checksums.sha256', 'Plugins/MSSQLDriverPlugin/CFreeTDS/include/sybdb.h') }}
60+
# Include C bridge stub headers in the cache key so the iOS xcframework set
61+
# refreshes whenever a bridge surface (e.g. a new driver's headers) changes.
62+
key: ${{ runner.os }}-libs-${{ hashFiles('Libs/checksums.sha256', 'Plugins/MSSQLDriverPlugin/CFreeTDS/include/sybdb.h', 'TableProMobile/TableProMobile/CBridges/CDuckDB/CDuckDB.h') }}
6363

6464
- name: Download static libraries
6565
env:

.github/workflows/macos-tests.yml

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
name: macOS Tests
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "TablePro/**"
7+
- "Plugins/**"
8+
- "Packages/**"
9+
- "TableProTests/**"
10+
- "TablePro.xcodeproj/**"
11+
- "Libs/**"
12+
- ".github/workflows/macos-tests.yml"
13+
push:
14+
branches: [main]
15+
paths:
16+
- "TablePro/**"
17+
- "Plugins/**"
18+
- "Packages/**"
19+
- "TableProTests/**"
20+
- "TablePro.xcodeproj/**"
21+
- "Libs/**"
22+
- ".github/workflows/macos-tests.yml"
23+
workflow_dispatch:
24+
25+
# Only one run per PR/branch at a time; new pushes cancel pending older ones.
26+
concurrency:
27+
group: macos-tests-${{ github.ref }}
28+
cancel-in-progress: true
29+
30+
env:
31+
XCODE_PROJECT: TablePro.xcodeproj
32+
XCODE_SCHEME: TablePro
33+
TEST_DESTINATION: "platform=macOS"
34+
35+
jobs:
36+
package-tests:
37+
name: TableProCore Package Tests
38+
runs-on: macos-26
39+
timeout-minutes: 20
40+
steps:
41+
- uses: actions/checkout@v4
42+
43+
- name: Select Xcode
44+
uses: maxim-lobanov/setup-xcode@v1
45+
with:
46+
xcode-version: '26.4.1'
47+
48+
- name: Run package tests
49+
run: swift test --package-path Packages/TableProCore
50+
51+
app-tests:
52+
name: macOS App Tests
53+
runs-on: macos-26
54+
timeout-minutes: 40
55+
steps:
56+
- uses: actions/checkout@v4
57+
58+
- name: Select Xcode
59+
uses: maxim-lobanov/setup-xcode@v1
60+
with:
61+
xcode-version: '26.4.1'
62+
63+
- name: Install xcbeautify
64+
run: brew list xcbeautify &>/dev/null || brew install xcbeautify
65+
66+
- name: Cache static libraries
67+
uses: actions/cache@v4
68+
with:
69+
path: Libs
70+
key: ${{ runner.os }}-libs-${{ hashFiles('Libs/checksums.sha256', 'Plugins/MSSQLDriverPlugin/CFreeTDS/include/sybdb.h') }}
71+
72+
- name: Download static libraries
73+
env:
74+
GH_TOKEN: ${{ github.token }}
75+
run: scripts/download-libs.sh
76+
77+
# Secrets.xcconfig is gitignored. Tests do not need analytics keys, so an empty
78+
# value is enough for the project to resolve $(ANALYTICS_HMAC_SECRET).
79+
- name: Create Secrets.xcconfig
80+
env:
81+
ANALYTICS_HMAC_SECRET: ${{ secrets.ANALYTICS_HMAC_SECRET }}
82+
run: echo "ANALYTICS_HMAC_SECRET = ${ANALYTICS_HMAC_SECRET}" > Secrets.xcconfig
83+
84+
- name: Resolve Swift package dependencies
85+
run: |
86+
xcodebuild -resolvePackageDependencies \
87+
-project "$XCODE_PROJECT" \
88+
-scheme "$XCODE_SCHEME" \
89+
-skipPackagePluginValidation
90+
91+
# Quarantined suites (driver-loading, env-coupled, or hanging headless) are listed
92+
# in .github/macos-test-quarantine.txt. Burn that list down over time.
93+
- name: Run unit tests
94+
run: |
95+
set -o pipefail
96+
SKIP_ARGS=()
97+
while IFS= read -r line; do
98+
suite="${line%%#*}"
99+
suite="$(echo "$suite" | xargs)"
100+
[ -z "$suite" ] && continue
101+
SKIP_ARGS+=("-skip-testing:TableProTests/$suite")
102+
done < .github/macos-test-quarantine.txt
103+
xcodebuild test \
104+
-project "$XCODE_PROJECT" \
105+
-scheme "$XCODE_SCHEME" \
106+
-destination "$TEST_DESTINATION" \
107+
-only-testing:TableProTests \
108+
"${SKIP_ARGS[@]}" \
109+
-parallel-testing-enabled NO \
110+
-skipPackagePluginValidation \
111+
-resultBundlePath TestResults.xcresult \
112+
CODE_SIGNING_ALLOWED=NO \
113+
| xcbeautify --renderer github-actions
114+
115+
- name: Upload test results
116+
if: always()
117+
uses: actions/upload-artifact@v4
118+
with:
119+
name: macos-test-results
120+
path: TestResults.xcresult
121+
retention-days: 7
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: PluginKit ABI Gate
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "Plugins/TableProPluginKit/**"
7+
- "scripts/check-pluginkit-abi.sh"
8+
- ".github/workflows/pluginkit-abi.yml"
9+
10+
jobs:
11+
abi-gate:
12+
name: PluginKit ABI Gate
13+
runs-on: macos-26
14+
timeout-minutes: 20
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Select Xcode
23+
uses: maxim-lobanov/setup-xcode@v1
24+
with:
25+
xcode-version: "26.4.1"
26+
27+
- name: Create Secrets.xcconfig
28+
run: touch Secrets.xcconfig
29+
30+
- name: Check PluginKit ABI vs base
31+
env:
32+
BASE_SHA: ${{ github.event.pull_request.base.sha }}
33+
run: scripts/check-pluginkit-abi.sh "$BASE_SHA"

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,3 +156,6 @@ fix-1322-plugin-abi-and-registry-overhaul.diff
156156
# Issue analysis blueprints (local only)
157157
.analysis/
158158
.docs/
159+
160+
# Plans (local only)
161+
/plans/reports

0 commit comments

Comments
 (0)