Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tests/browser/layout.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { until, withPage } from './chrome.mjs';
const instrumentation = `<script>
window.testTerms=[];window.testSizes=[];window.testActions=[];window.testSockets=[];
const demoFetch=window.fetch;
window.fetch=function(input,init){const route=String(input?.url??input).split('?')[0];if(route.endsWith('/actions'))testActions.push(Date.now());const answer=demoFetch.call(this,input,init);if(!route.endsWith('/providers')||!localStorage.getItem('testBreakCard'))return answer;return answer.then((r)=>r.json()).then((body)=>{const shell=body.providers.find((p)=>p.id==='shell');body.providers.push({...shell,id:'terminal-ai-chat',tool:'Terminal AI Chat',vendor:'Odd Essentials'});return new Response(JSON.stringify(body),{status:200,headers:{'Content-Type':'application/json'}});});};
window.fetch=function(input,init){const route=String(input?.url??input).split('?')[0];if(route.endsWith('/actions'))testActions.push(Date.now());if(route.endsWith('/providers/optional'))return Promise.resolve(new Response(JSON.stringify({cards:[{id:'terminal-ai-chat',vendor:'Odd Essentials',tool:'Terminal AI Chat',added:false}]}),{status:200,headers:{'Content-Type':'application/json'}}));const answer=demoFetch.call(this,input,init);if(!route.endsWith('/providers')||!localStorage.getItem('testBreakCard'))return answer;return answer.then((r)=>r.json()).then((body)=>{const shell=body.providers.find((p)=>p.id==='shell');body.providers.push({...shell,id:'terminal-ai-chat',tool:'Terminal AI Chat',vendor:'Odd Essentials'});return new Response(JSON.stringify(body),{status:200,headers:{'Content-Type':'application/json'}});});};
const RealTerminal=window.Terminal;
window.Terminal=class extends RealTerminal {
constructor(...args){super(...args);testTerms.push(this);}
Expand Down Expand Up @@ -155,6 +155,8 @@ const checks = await withPage({ name: 'layout', instrumentation }, async ({ orig
[true, 'false', true, true, true, true, false, false, false]);
await click('#cards-open');
await until('the cards menu opens', () => evaluate('document.querySelector("#cards-menu").matches(":popover-open")'));
await until('the optional cards are listed', () => evaluate('Boolean(document.querySelector("#cards-more input[value=\'terminal-ai-chat\']"))'));
assert.equal(await evaluate('document.querySelector("#cards-more input[value=\'terminal-ai-chat\']").parentElement.textContent'), 'Odd Essentials');
await click('#cards-shown input[value="xai"]');
assert.deepEqual(await cardIds(), allCards.filter((id) => id !== 'xai'));
assert.equal(await evaluate('document.querySelector("#cards-open").textContent'), 'Cards · 1 hidden');
Expand Down
2 changes: 1 addition & 1 deletion tests/browser/yard.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1801,7 +1801,7 @@ test('the Customize dialog tells installed from drawn, per Yard, and returns foc
]);
assert.equal(await b.evaluate("document.querySelector('#yard-world-note').textContent"),'Broken could not load. Showing the original character.');
assert.deepEqual(await b.evaluate("['world','anthropic','shell','companion'].map(s=>(n=>n.hidden?null:n.textContent)(document.querySelector('#yard-customize-list [data-slot='+s+'] .yard-customize-note')))"),
[null,'Shows on your Claude Code sessions in this Yard.','Shows on your Shell sessions in this Yard, and in gold on Terminal AI Chat’s.','Shows beside sessions with helpers in this Yard.']);
[null,'Shows on your Claude Code sessions in this Yard.','Shows on your Shell sessions in this Yard.','Shows beside sessions with helpers in this Yard.']);
await b.evaluate("document.documentElement.dataset.skin='grove'");
await b.wait(`${row('anthropic')}.dataset.state==='original' && ${row('openai')}.dataset.state==='original'`);
assert.equal(await b.evaluate("document.querySelector('#yard-customize-sub').textContent"),await b.evaluate("document.querySelector('#yard-title').textContent+' only. Other Yards keep their own.'"));
Expand Down
2 changes: 1 addition & 1 deletion web/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2657,7 +2657,7 @@ function renderMoreCards() {
input.type = 'checkbox';
input.name = 'optional-card';
input.value = card.id;
const label = el('label', 'choice', input, el('span', '', card.tool));
const label = el('label', 'choice', input, el('span', '', card.vendor));
label.title = `${card.vendor} ${card.tool}`;
return label;
}));
Expand Down
2 changes: 1 addition & 1 deletion web/yard/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export function initYard(controller) {
parts.name.textContent = slotName(slot);
parts.status.textContent = status.text;
if (slot !== 'world') parts.note.textContent = slot === 'companion' ? 'Shows beside sessions with helpers in this Yard.'
: 'Shows on your ' + slotName(slot) + ' sessions in this Yard' + (slot === 'shell' ? ', and in gold on Terminal AI Chat’s.' : '.');
: 'Shows on your ' + slotName(slot) + ' sessions in this Yard.';
parts.row.dataset.state = status.state;
parts.replace.disabled = busy;
parts.restore.disabled = busy || !installed;
Expand Down
Loading