← Commit history

Publish 0.3.8

John Lauer ·4c889dbd3b · ·parent 90fc299
3 files changed +36−12
install.sh+34−10
@@ -44,19 +44,43 @@ if [ -f "$WB" ] && ! grep -q __hdAbSeed "$WB"; then import sys wb = sys.argv[1] html = open(wb).read()-SCRIPT = ('<script>(function(){try{var r=indexedDB.open("vscode-web-state-db-global",1);'+# RACE FIX (John 2026-08-25, caught in a real browser against a virgin profile).+# The previous version ran ONCE at page load and opened the DB pinned at version 1.+# On a virgin profile VS Code has not created the ItemTable object store yet, so+# `d.transaction("ItemTable")` THREW, every write died inside an empty catch, and the+# guard key was never written. Then VS Code booted and wrote its own pinnedViewlets2+# over everything. Observed live: window.__hdAbSeed set (the script ran) but+# adom.activityBarSeeded ABSENT and Search / SCM / Debug all showing.+#+# Three changes, each fixing one part of that:+#   1. open with NO version, so we never create or upgrade a wrong-shaped DB, and+#      poll until the store actually exists instead of assuming it does.+#   2. WAIT for VS Code to write its own viewlet list, then MODIFY it. Writing first+#      and being overwritten was the whole bug; the seed has to go second, not first.+#   3. one readwrite transaction for read+modify+write, and the guard is set only on+#      that transaction's oncomplete, so the marker can never claim a write that did+#      not land.+# Takes effect on the NEXT load, because VS Code reads this state at startup. That is+# what the two post-load re-assertions in ah's cascade are for in the current session.+SCRIPT = ('<script>(function(){var n=0;var iv=setInterval(function(){n++;'+ 'if(n>60){clearInterval(iv);return}'+ 'var r;try{r=indexedDB.open("vscode-web-state-db-global")}catch(_){return}'  'r.onsuccess=function(e){var d=e.target.result;'- 'try{var t=d.transaction("ItemTable","readwrite");t.objectStore("ItemTable").put(JSON.stringify(["*"]),"http.linkProtectionTrustedDomains")}catch(_){}'- 'try{var t1=d.transaction("ItemTable","readonly");var os1=t1.objectStore("ItemTable");'- 'var sg=os1.get("adom.activityBarSeeded");sg.onsuccess=function(){if(sg.result)return;'- 'var pg=os1.get("workbench.activity.pinnedViewlets2");pg.onsuccess=function(){'- 'var arr=[];try{if(pg.result)arr=JSON.parse(pg.result)}catch(_){}'+ 'if(!d.objectStoreNames.contains("ItemTable"))return;'+ 'try{var t=d.transaction("ItemTable","readwrite");var os=t.objectStore("ItemTable");'+ 'os.put(JSON.stringify(["*"]),"http.linkProtectionTrustedDomains");'+ 'var sg=os.get("adom.activityBarSeeded");'+ 'sg.onsuccess=function(){if(sg.result){clearInterval(iv);return}'+ 'var pg=os.get("workbench.activity.pinnedViewlets2");'+ 'pg.onsuccess=function(){var arr=[];try{if(pg.result)arr=JSON.parse(pg.result)}catch(_){}'+ 'if(!arr.length)return;'  'var ids=["workbench.view.search","workbench.view.scm","workbench.view.debug"];'  'ids.forEach(function(id){var f=null;for(var i=0;i<arr.length;i++){if(arr[i].id===id)f=arr[i]}'- 'if(f){f.pinned=false}else{arr.push({id:id,pinned:false,visible:false})}});'- 'try{var t2=d.transaction("ItemTable","readwrite");var o2=t2.objectStore("ItemTable");'- 'o2.put(JSON.stringify(arr),"workbench.activity.pinnedViewlets2");o2.put("1","adom.activityBarSeeded")}catch(_){}}}}catch(_){}};'- 'window.__hdTrustedDomains=1;window.__hdAbSeed=1}catch(_){}})();</script>'+ 'if(f){f.pinned=false;f.visible=false}else{arr.push({id:id,pinned:false,visible:false})}});'+ 'os.put(JSON.stringify(arr),"workbench.activity.pinnedViewlets2");'+ 'os.put("1","adom.activityBarSeeded");'+ 't.oncomplete=function(){clearInterval(iv)}}}}catch(_){}};'+ 'window.__hdTrustedDomains=1;window.__hdAbSeed=1},500)})();</script>'  # Collapse the primary sidebar ONCE per profile so the golden image opens clean  # (no Explorer panel). Guarded by a localStorage marker so it won't fight the  # user if they later open it. Sidebar visibility is workspace-scoped (not a
package.json+1−1
@@ -4,7 +4,7 @@   "type": "bootstrap",   "title": "Adom Hydrogen (Windows / WSL2)",   "brief": "The Windows (WSL2) platform layer for Hydrogen.",-  "version": "0.3.7",+  "version": "0.3.8",   "description": "The Windows platform layer for Hydrogen, where the workspace runs in a WSL2 Ubuntu distro. Depends on adom/hydrogen-bootstrap (the platform-generic layer, which bundles the generic hydrogen-* skills) and adds everything specific to the WSL2 runtime: the WSL2/networking/lifecycle hydrogen-* skills (BUNDLED here by design, John+Kyle 2026-07-16) and the WSL2 code-server workbench seed. Sibling adom/hydrogen-mac-bootstrap carries the parallel mac skills. This is the package the golden WSL2 image installs.",   "org": "adom",   "platform": "linux",
page.json+1−1
@@ -4,7 +4,7 @@   "slug": "hydrogen-windows-bootstrap",   "title": "Adom Hydrogen (Windows / WSL2)",   "brief": "The Windows (WSL2) platform layer for Hydrogen.",-  "version": "0.3.7",+  "version": "0.3.8",   "author": {     "name": "John Lauer",     "email": "[email protected]"