Skip to content

Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.

fix(view): explain on-the-go board sign-in [N26,H5]

Corey Olsone163ab9249e5
diff --git a/src/cockpit.js b/src/cockpit.js
index 633da712..7e9ff388 100644
--- a/src/cockpit.js
+++ b/src/cockpit.js
@@ -126,7 +126,7 @@ export function cockpitPage(key = '', { snapshot = false, readOnly = false, requ
</section>
<p class="empty" id="project-loading" role="status" hidden>Loading project…</p>
${hostedMarkup('http://127.0.0.1:4890', { looking: Boolean(hostedLocal) && !snapshot, signIn })}
- <div class="share-card" id="share-note" hidden><span class="share-ic" aria-hidden="true"><svg viewBox="0 0 24 24" width="17" height="17" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="13" height="10" rx="1.5"/><path d="M7 18h5M9.5 14v4"/><rect x="17" y="9" width="5" height="10" rx="1"/></svg></span><span class="share-txt"><b>See these boards from any device</b><span>Link them to pullboard.dev with your GitHub account.</span></span><button class="ob-gh share-gh" id="share-start" type="button"><svg viewBox="0 0 16 16" width="15" height="15" aria-hidden="true" fill="currentColor"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/></svg>Sign in with GitHub</button><button class="share-x" id="share-hide" type="button" aria-label="Hide this; bring it back from the projects list" title="Hide this; bring it back from the projects list">&times;</button></div>
+ <div class="share-card" id="share-note" hidden><span class="share-ic" aria-hidden="true"><svg viewBox="0 0 24 24" width="17" height="17" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="13" height="10" rx="1.5"/><path d="M7 18h5M9.5 14v4"/><rect x="17" y="9" width="5" height="10" rx="1"/></svg></span><span class="share-txt"><b>Open your boards on any device</b><span>Sign in to use pullboard.dev while on the go.</span> <a href="https://pullboard.dev/relay/" target="_blank" rel="noopener">How the relay works</a></span><button class="ob-gh share-gh" id="share-start" type="button"><svg viewBox="0 0 16 16" width="15" height="15" aria-hidden="true" fill="currentColor"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/></svg>Sign in with GitHub</button><button class="share-x" id="share-hide" type="button" aria-label="Hide this; bring it back from the projects list" title="Hide this; bring it back from the projects list">&times;</button></div>
<section class="card-panel" id="share-panel" aria-label="Link these boards" hidden>
<p id="share-status" role="status" aria-live="polite"></p>
<button class="ghost" id="share-pair" type="button" hidden>Pair a device</button>
diff --git a/src/view.css b/src/view.css
index 7c9a9516..4631ec2e 100644
--- a/src/view.css
+++ b/src/view.css
@@ -964,6 +964,7 @@ code.inline.long { white-space: break-spaces; overflow-wrap: anywhere; }
.share-card { display: grid; grid-template-columns: 30px minmax(0, 1fr) var(--tap); align-items: start; }
.share-ic { margin-top: 4px; }
.share-txt { grid-column: 2; }
+ .share-txt a { display: block; }
.share-x { grid-column: 3; grid-row: 1; }
.share-gh { grid-column: 2 / 4; justify-self: start; }
}
diff --git a/test/cockpit/open-board.test.js b/test/cockpit/open-board.test.js
index dc022680..2875565d 100644
--- a/test/cockpit/open-board.test.js
+++ b/test/cockpit/open-board.test.js
@@ -441,8 +441,9 @@ test('the link invitation closes, stays closed and comes back [N26,H5]', async t
await chrome.send('Page.navigate', { url: view.link.href });
await chrome.waitFor("data?.project?.root && !document.body.classList.contains('loading')");
await chrome.stable('sharingReady');
- assert.equal(await chrome.stable("document.querySelector('#share-note b')?.textContent"), 'See these boards from any device');
- assert.equal(await chrome.stable("document.querySelector('#share-note .share-txt > span')?.textContent"), 'Link them to pullboard.dev with your GitHub account.');
+ assert.equal(await chrome.stable("document.querySelector('#share-note b')?.textContent"), 'Open your boards on any device');
+ assert.equal(await chrome.stable("document.querySelector('#share-note .share-txt > span')?.textContent"), 'Sign in to use pullboard.dev while on the go.');
+ assert.deepEqual(JSON.parse(await chrome.stable("JSON.stringify((() => { const a = document.querySelector('#share-note .share-txt a'); return a ? [a.textContent, a.href, a.target, a.rel] : null; })())")), ['How the relay works', 'https://pullboard.dev/relay/', '_blank', 'noopener']);
assert.equal(await chrome.stable("document.querySelector('#share-start').textContent.trim()"), 'Sign in with GitHub');
assert.equal(await chrome.stable("Boolean(document.querySelector('#share-start svg') && document.querySelector('#share-note .share-ic svg'))"), true);
assert.equal(await chrome.stable("document.querySelector('#share-hide')?.getAttribute('aria-label')"), 'Hide this; bring it back from the projects list');
@@ -459,7 +460,7 @@ test('the link invitation closes, stays closed and comes back [N26,H5]', async t
assert.equal(await chrome.stable("document.querySelector('#share-note').hidden"), false);
assert.equal(await chrome.stable("document.querySelector('#share-again').hidden"), true);
const backgrounds = new Set();
- for (const width of [1280, 390]) {
+ for (const width of [1280, 390, 375]) {
await chrome.send('Emulation.setDeviceMetricsOverride', { width, height: 900, deviceScaleFactor: 1, mobile: false });
await press(chrome, "document.querySelector('[data-tab=roadmap]')");
await chrome.waitFor("document.querySelector('.roadmap-list') && document.querySelector('.roadmap-panel')");
@@ -469,10 +470,14 @@ test('the link invitation closes, stays closed and comes back [N26,H5]', async t
const card = document.querySelector('#share-note'), rect = card.getBoundingClientRect();
const parts = [...document.querySelectorAll('.roadmap-list, .roadmap-panel')].map(part => part.getBoundingClientRect());
const button = document.querySelector('#share-start');
+ const link = card.querySelector('.share-txt a'), line = card.querySelector('.share-txt > span'), linkRect = link.getBoundingClientRect();
return { left: rect.left, right: rect.right, columnsLeft: Math.min(...parts.map(part => part.left)),
columnsRight: Math.max(...parts.map(part => part.right)), background: getComputedStyle(card).backgroundColor,
githubBackground: getComputedStyle(button).backgroundColor, overflow: document.documentElement.scrollWidth > innerWidth,
buttonFits: button.getBoundingClientRect().right <= rect.right,
+ linkFits: linkRect.left >= rect.left && linkRect.right <= rect.right,
+ linkBelowLine: linkRect.top >= line.getBoundingClientRect().bottom - 1,
+ linkColor: getComputedStyle(link).color, entryColor: getComputedStyle(document.querySelector('#share-again')).color,
closeWidth: document.querySelector('#share-hide').getBoundingClientRect().width,
closeHeight: document.querySelector('#share-hide').getBoundingClientRect().height,
buttonHeight: button.getBoundingClientRect().height };
@@ -482,6 +487,9 @@ test('the link invitation closes, stays closed and comes back [N26,H5]', async t
assert.equal(measured.githubBackground, 'rgb(31, 35, 40)', 'the existing GitHub style stays dark');
assert.equal(measured.overflow, false, `${width}/${theme}: no horizontal overflow`);
assert.equal(measured.buttonFits, true);
+ assert.equal(measured.linkFits, true, `${width}/${theme}: the relay link stays inside the card`);
+ assert.equal(measured.linkColor, measured.entryColor, `${width}/${theme}: the relay link uses the view accent`);
+ if (width < 600) assert.equal(measured.linkBelowLine, true, `${width}/${theme}: the relay link wraps below the quiet line`);
const target = width < 900 ? 44 : 32;
assert.ok(measured.closeWidth >= target && measured.closeHeight >= target && measured.buttonHeight >= target,
`${width}/${theme}: close and sign-in retain the view's existing tap target`);
diff --git a/test/cockpit/relay.test.js b/test/cockpit/relay.test.js
index cfb8d4a6..3e6cc3e9 100644
--- a/test/cockpit/relay.test.js
+++ b/test/cockpit/relay.test.js
@@ -2147,8 +2147,9 @@ process.stdout.write(JSON.stringify({other}));
await chrome.stable("typeof sharingReady === 'undefined' ? null : sharingReady");
assert.equal(await chrome.stable("document.querySelector('#share-note')?.hidden === false"), true,
'the real local view offers one quiet invitation before any board is linked');
- assert.equal(await chrome.stable("document.querySelector('#share-note b')?.textContent"), 'See these boards from any device');
- assert.equal(await chrome.stable("document.querySelector('#share-note .share-txt > span')?.textContent"), 'Link them to pullboard.dev with your GitHub account.');
+ assert.equal(await chrome.stable("document.querySelector('#share-note b')?.textContent"), 'Open your boards on any device');
+ assert.equal(await chrome.stable("document.querySelector('#share-note .share-txt > span')?.textContent"), 'Sign in to use pullboard.dev while on the go.');
+ assert.deepEqual(JSON.parse(await chrome.stable("JSON.stringify((() => { const a = document.querySelector('#share-note .share-txt a'); return a ? [a.textContent, a.href, a.target, a.rel] : null; })())")), ['How the relay works', 'https://pullboard.dev/relay/', '_blank', 'noopener']);
const starts = box.providerCalls.filter(call => call.path === '/login/device/code').length;
await press(chrome, "document.querySelector('#share-start')");
// The real GitHub popup hides this tab; foreground the owned view before measuring its progress.