← Commit history

Publish 0.2.6

John Lauer ·802d27b184 ·4d ago ·parent b5293ae
4 files changed +10−5
bin/hydrogen-widget-antigravity-usage+1−1
@@ -60,4 +60,4 @@ def data():     return {'plan': plan, 'account': account, 'items': items}  RENDER = r"""(d.error?`<span class="err">${d.error}</span>`:(d.items||[]).slice(0,2).map(b=>bar(b.label,b.pct,b.severity)).join(''))"""-lib.serve('Antigravity usage', data, RENDER, 180000, mark=marks.MARKS['antigravity'], default_view='nums')+lib.serve('Antigravity usage', data, RENDER, 180000, mark=marks.MARKS['antigravity'], default_view='big:week')
bin/hydrogen-widget-lib.py+7−2
@@ -121,7 +121,12 @@ function renderItems(items,id){const [kind,arg]=String(id).split(':');const at=( function render(d0){const d=d0&&d0.stale?d0.stale:d0;const el=document.getElementById('w');const wrap=document.getElementById('wrap');   el.classList.toggle('stale',!!(d0&&d0.stale));let tip=(d0&&d0.stale)?String(d0.error||''):'';   if(d0&&d0.view&&d0.view!==curView){curView=d0.view;try{localStorage.setItem('hw.view',curView);}catch(e){}}-  if(d&&Array.isArray(d.items)&&d.items.length){const vs=viewsFor(d.items);let k=vs.findIndex(v=>v.id===curView);if(k<0){k=vs.findIndex(v=>v.id===DEF_VIEW);if(k<0&&DEF_VIEW==='nums')k=vs.findIndex(v=>v.id==='big:0');if(k<0)k=0;curView=vs[k].id;}+  if(d&&Array.isArray(d.items)&&d.items.length){const vs=viewsFor(d.items);+    /* A default may name a limit by its label ('big:week'): the week sits at a different place in+       each widget (Claude 5h first, Codex and Antigravity week first). John 2026-10-18: every usage+       widget opens on its week as one big number. */+    const byLabel=(id)=>{const m=/^(big|ring):([^0-9].*)$/.exec(String(id));if(!m)return id;const i=d.items.findIndex(it=>it.label===m[2]);return m[1]+':'+(i<0?0:i);};+    curView=byLabel(curView);let k=vs.findIndex(v=>v.id===curView);if(k<0){k=vs.findIndex(v=>v.id===byLabel(DEF_VIEW));if(k<0&&DEF_VIEW==='nums')k=vs.findIndex(v=>v.id==='big:0');if(k<0)k=0;curView=vs[k].id;}     el.classList.toggle('hz',curView!=='rows');el.innerHTML=renderItems(d.items,curView);     tip=(tip?tip+'. ':'')+'%(title)s: '+vs[k].name+'. Click for the next view ('+(k+1)+' of '+vs.length+').';}   else{el.classList.remove('hz');el.innerHTML=%(render_js)s;tip=(d0&&d0.error?String(d0.error)+'. ':'')+'Click to check again now.';}@@ -344,7 +349,7 @@ def serve(title, data_fn, render_js, refresh_ms=60000, mark=None, align_ms=0, de     # the next tries come at 5, 15, 45, 90 s, then minutes, capped at 15; back to normal on the     # next success. The last good numbers live on disk so a restart shows them at once, dimmed.     st = _load_state(title)-    # The view a fresh install opens on: the widget's choice (Claude and Codex: every limit as a+    # The view a fresh install opens on: the widget's choice (every usage widget: the week as one big number, John 2026-10-18; was every limit as a     # big number in a row, John 2026-10-01; Codex was "the week only" from 2026-09-19), until the     # user clicks to another one, which is remembered on disk and wins from then on.     cache = {'t': 0, 'v': {'error': 'starting'}, 'wait': refresh_ms/1000, 'good': None, 'fails': 0, 'view': str(st.get('view') or default_view)}
package.json+1−1
@@ -4,7 +4,7 @@   "type": "app",   "title": "Google Antigravity",   "brief": "Google Antigravity in Adom Hydrogen: the editor extension, the agy CLI and a dock dashboard that installs both into your container.",-  "version": "0.2.5",+  "version": "0.2.6",   "description": "Try Google Antigravity inside your Adom workspace. The dock dashboard installs the Google Antigravity VS Code extension into Hydrogen's editor and the agy command line into your WSL2 or Lima container, opens the panel, and reports what is installed and signed in.",   "org": "adom",   "needs_sudo": false,
page.json+1−1
@@ -4,7 +4,7 @@   "type": "app",   "title": "Google Antigravity",   "brief": "Google Antigravity in Adom Hydrogen: the editor extension, the agy CLI and a dock dashboard that installs both into your container.",-  "version": "0.2.5",+  "version": "0.2.6",   "hero": {     "type": "image",     "path": "screenshots/hero.png"