Skip to main content

max / makenotwork

Point the SyncKit tab refresh at its own panel Both files reloaded the tab by clicking `#tab-synckit`, the project dashboard's tab button. Step 3 described that strip, so the button is gone and every self-refresh in the SyncKit tab has been a no-op since: regenerate a key, delete an app, set a slug or link a project and the table never updates. Same class as the two step-1 regressions, and it raised no error either. The panel says where it lives, the way the content tab does, and synckit-billing.js goes through the one function that knows. A partial that says nothing reloads the page, which is what the user-level SyncKit tab gets: it is registered and rendered but nothing in the tree links to it.
Co-Authored-By
Claude Opus 5 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-08-19 17:05 UTC
Signed with PGP, not checked
Commit: 1a298122d155813a32d5fbce886ef67b1a4107b8
Parent: cf4473b
5 files changed, +25 insertions, -3 deletions
@@ -137,8 +137,8 @@
137 137 }
138 138
139 139 function refreshTab() {
140 - var tab = document.getElementById('tab-synckit');
141 - if (tab) tab.click();
140 + // synckit-tabs.js owns where the tab lives; both files load globally.
141 + if (window.reloadSyncKitTab) window.reloadSyncKitTab();
142 142 }
143 143
144 144 function wirePanel(panel) {
@@ -19,7 +19,20 @@
19 19 };
20 20
21 21 function netError() { showToast('Network error. Please check your connection and try again.'); }
22 - function reloadTab() { document.getElementById('tab-synckit').click(); }
22 +
23 + // Re-fetch the tab this panel is showing in. It used to click `#tab-synckit`,
24 + // which was the project dashboard's tab button until that strip was described
25 + // (`6b24f2df` step 3) and every panel became its own region. The tab partial
26 + // says where it lives; a partial that says nothing reloads the page, which is
27 + // what the user-level SyncKit tab gets since nothing links to it.
28 + function reloadTab() {
29 + var el = document.getElementById('synckit-tab-cfg');
30 + var url = el ? el.dataset.reloadUrl : '';
31 + var target = el ? el.dataset.reloadTarget : '';
32 + if (url && target) { htmx.ajax('GET', url, target); return; }
33 + location.reload();
34 + }
35 + window.reloadSyncKitTab = reloadTab;
23 36
24 37 // A "Copy" button that copies `text` and briefly flips its label. Built via
25 38 // addEventListener so the secret key never lands in an inline onclick string.
@@ -497,6 +497,9 @@
497 497 pub struct ProjectSyncKitTabTemplate {
498 498 pub apps: Vec<SyncAppRow>,
499 499 pub project_id: String,
500 + /// Where a self-refresh re-fetches this panel from. The tab's JS used to
501 + /// click `#tab-synckit`; the strip is described now and the button is gone.
502 + pub project_slug: String,
500 503 }
501 504
502 505 /// A linked repo with its collaborators, for the Code tab.
@@ -99,4 +99,9 @@
99 99 </div>
100 100
101 101 <div id="tab-project-synckit-cfg" hidden data-project-id="{{ project_id }}"></div>
102 + {# Where a self-refresh lands. The strip is described (`6b24f2df` step 3), so
103 + this panel is its own region rather than the one pane every tab shared. #}
104 + <div id="synckit-tab-cfg" hidden
105 + data-reload-url="/dashboard/project/{{ project_slug }}/tabs/synckit"
106 + data-reload-target="#project-synckit"></div>
102 107 <script src="/static/tab-project-synckit.js?v=0623"></script>
@@ -818,5 +818,6 @@
818 818 Ok(ProjectSyncKitTabTemplate {
819 819 apps,
820 820 project_id: db_project.id.to_string(),
821 + project_slug: db_project.slug.to_string(),
821 822 })
822 823 }