@jossuealcala/madre 1.1.3 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/CHANGELOG.en.md +20 -1
  2. package/CHANGELOG.md +20 -1
  3. package/TRADEMARKS.md +6 -2
  4. package/bin/madre.mjs +4 -2
  5. package/docs/REFERENCE.md +3 -3
  6. package/docs/SDK.md +28 -1
  7. package/docs/en/REFERENCE.md +2 -2
  8. package/docs/en/SDK.md +26 -0
  9. package/docs/sdk/hello-module.mjs +38 -3
  10. package/habilidades/explicamelo-facil/HABILIDAD.md +19 -0
  11. package/habilidades/hojas-de-calculo/HABILIDAD.md +18 -0
  12. package/habilidades/mensajes-a-clientes/HABILIDAD.md +19 -0
  13. package/habilidades/publicaciones-para-redes/HABILIDAD.md +19 -0
  14. package/habilidades/resumen-y-pendientes/HABILIDAD.md +18 -0
  15. package/habilidades/tu-pagina-paso-a-paso/HABILIDAD.md +19 -0
  16. package/package.json +4 -3
  17. package/public/activity.js +57 -22
  18. package/public/app.js +3998 -762
  19. package/public/assets/brand/OFL-SpaceGrotesk.txt +93 -0
  20. package/public/assets/brand/SpaceGrotesk-latin-ext.woff2 +0 -0
  21. package/public/assets/brand/SpaceGrotesk-latin.woff2 +0 -0
  22. package/public/assets/brand/madre-app-180.png +0 -0
  23. package/public/assets/brand/madre-app-192.png +0 -0
  24. package/public/assets/brand/madre-app-512.png +0 -0
  25. package/public/assets/brand/madre-app.svg +1 -1
  26. package/public/assets/brand/madre-favicon.svg +1 -1
  27. package/public/attribution.js +28 -27
  28. package/public/auto-open.js +102 -0
  29. package/public/brands.js +9 -6
  30. package/public/changes.js +63 -0
  31. package/public/en.js +1085 -101
  32. package/public/es.js +2395 -1688
  33. package/public/i18n.js +11 -0
  34. package/public/index.html +28 -27
  35. package/public/loader.js +322 -117
  36. package/public/macroverso.js +33 -350
  37. package/public/manual-content.js +37 -7
  38. package/public/manual.js +21 -6
  39. package/public/market-view.js +212 -105
  40. package/public/market.js +10 -2
  41. package/public/mcp-catalog.js +7 -2
  42. package/public/missions.js +169 -0
  43. package/public/news-scenes.js +110 -3
  44. package/public/nostromo-engine.js +935 -654
  45. package/public/notices.js +14 -2
  46. package/public/notifications.js +119 -0
  47. package/public/provider-marks.js +170 -0
  48. package/public/provider-pick.js +147 -0
  49. package/public/resay.js +1 -0
  50. package/public/review-ask.js +16 -13
  51. package/public/routing.js +29 -3
  52. package/public/salas-mac.css +257 -40
  53. package/public/salas-mac.html +5 -5
  54. package/public/salas-mac.js +376 -97
  55. package/public/salas.css +2 -2
  56. package/public/salas.html +2 -2
  57. package/public/salas.js +1 -1
  58. package/public/starters.js +128 -0
  59. package/public/styles.css +2656 -336
  60. package/public/subscription.js +303 -0
  61. package/public/terms-field.js +170 -0
  62. package/public/terms.js +117 -19
  63. package/public/tips.js +41 -7
  64. package/public/tour-chapters.js +35 -35
  65. package/public/tour.js +333 -43
  66. package/public/troubleshooting.js +100 -7
  67. package/public/welcome-scene.js +117 -29
  68. package/public/welcome.js +364 -60
  69. package/src/adapters/claude.mjs +2 -1
  70. package/src/adapters/codex.mjs +2 -1
  71. package/src/adapters/cursor.mjs +9 -6
  72. package/src/adapters/gemini.mjs +4 -0
  73. package/src/adapters/grok.mjs +6 -4
  74. package/src/adapters/madre.mjs +71 -23
  75. package/src/adapters/opencode.mjs +15 -2
  76. package/src/adapters/steps.mjs +176 -0
  77. package/src/app-invite.mjs +90 -0
  78. package/src/billing-key.mjs +8 -0
  79. package/src/billing.mjs +317 -0
  80. package/src/bridge/policy.mjs +1 -1
  81. package/src/capabilities.mjs +17 -11
  82. package/src/chats.mjs +44 -2
  83. package/src/checkpoint.mjs +5 -1
  84. package/src/commands.mjs +5 -2
  85. package/src/directives.mjs +1 -0
  86. package/src/event-store.mjs +15 -0
  87. package/src/extensions.mjs +5 -1
  88. package/src/ficha.mjs +16 -0
  89. package/src/image-studio.mjs +13 -3
  90. package/src/install-metrics.mjs +9 -3
  91. package/src/lease.mjs +1 -1
  92. package/src/looks.mjs +4 -1
  93. package/src/mcp/image-server.mjs +59 -90
  94. package/src/modules/ahp.mjs +2 -1
  95. package/src/modules/github.mjs +6 -2
  96. package/src/modules/image-providers.mjs +281 -0
  97. package/src/modules/image-studio.mjs +100 -19
  98. package/src/modules/index.mjs +7 -1
  99. package/src/modules/intents-observe.mjs +3 -1
  100. package/src/modules/playwright.mjs +33 -4
  101. package/src/modules/reminders.mjs +42 -2
  102. package/src/modules/ripley.mjs +2 -1
  103. package/src/modules/sdk.mjs +6 -1
  104. package/src/opencode-health.mjs +1 -1
  105. package/src/outbound.mjs +80 -6
  106. package/src/quota-sources.mjs +148 -3
  107. package/src/review-ask.mjs +55 -31
  108. package/src/room/changes.mjs +79 -0
  109. package/src/room/economy.mjs +1 -1
  110. package/src/room/guard.mjs +8 -1
  111. package/src/room/prompt.mjs +20 -4
  112. package/src/room.mjs +87 -21
  113. package/src/salas.mjs +30 -3
  114. package/src/server.mjs +545 -59
  115. package/src/setup.mjs +1 -1
  116. package/src/skills.mjs +10 -0
  117. package/src/terms.mjs +23 -5
  118. package/src/tour.mjs +18 -3
  119. package/src/updates.mjs +47 -4
  120. package/src/web-preview.mjs +181 -0
  121. package/src/whats-new.mjs +76 -4
package/public/welcome.js CHANGED
@@ -25,9 +25,10 @@
25
25
 
26
26
  import { t, language } from './i18n.js';
27
27
  import { platformOf, remedyKey } from './remedy.js';
28
- import { MADRE_LOGO as BRAND_LOGO, playOpening } from './loader.js';
28
+ import { MADRE_LOGO as BRAND_LOGO, openingPlayed, playOpening } from './loader.js';
29
29
  import { trazo } from './icons.js';
30
30
  import { createScene } from './welcome-scene.js';
31
+ import { startersFor } from './starters.js';
31
32
 
32
33
  const el = (tag, className = null, text = null) => {
33
34
  const node = document.createElement(tag);
@@ -59,18 +60,25 @@ const STEP_NAMES = {
59
60
  hello: () => t('Hello'), use: () => t('What you want it for'), agents: () => t('Your AIs'), project: () => t('Your projects'),
60
61
  ai: () => t('AI on your computer'), ready: () => t('Your first message'),
61
62
  };
62
- // What MADRE is for to this person (src/tour.mjs, WELCOME_PROFILES): the examples follow it.
63
+ // What MADRE is for to this person (src/tour.mjs, WELCOME_PROFILES): the examples follow it. Eight
64
+ // since 2026-11-10 (the author: «more examples, with MADRE's icons»), each with its Trazo drawing.
63
65
  const PROFILES = [
64
- { id: 'business', title: () => t('My business'), sub: () => t('What I sell, my customers, my social media.') },
65
- { id: 'numbers', title: () => t('Invoices and numbers'), sub: () => t('The spreadsheet, the expenses, what the accountant asks for.') },
66
- { id: 'code', title: () => t('Programming'), sub: () => t('Websites, apps, the usual repository.') },
67
- { id: 'notes', title: () => t('Writing and getting organised'), sub: () => t('Loose notes, to-dos, long texts.') },
68
- { id: 'curious', title: () => t('I just want to see what it does'), sub: () => t('Show me, and then I will decide.') },
66
+ { id: 'business', icon: 'market', title: () => t('My business'), sub: () => t('What I sell, my customers and how they find me.') },
67
+ { id: 'social', icon: 'image', title: () => t('Social media and content'), sub: () => t('Posts, captions, ads and product photos.') },
68
+ { id: 'numbers', icon: 'bars', title: () => t('Accounts and invoices'), sub: () => t('Expenses, invoices and what the accountant asks for.') },
69
+ { id: 'office', icon: 'inbox', title: () => t('My office work'), sub: () => t('Emails, reports, presentations and meetings.') },
70
+ { id: 'study', icon: 'book', title: () => t('Studying and learning'), sub: () => t('Notes, homework and topics I want to understand.') },
71
+ { id: 'notes', icon: 'note', title: () => t('Writing and getting organised'), sub: () => t('Loose ideas, to-dos and long texts.') },
72
+ { id: 'code', icon: 'code', title: () => t('Programming'), sub: () => t('Websites, apps and the repository I always use.') },
73
+ { id: 'curious', icon: 'spark', title: () => t('I just want to see what it does'), sub: () => t('Show me first, then I decide.') },
69
74
  ];
70
75
  // A first message for each, written as a person would ask it, and what to say first to @madre.
71
76
  const IDEAS = {
72
77
  business: () => [t('Write the description of my 5 best-selling products'), t('Make me a simple page with my opening hours and my WhatsApp'), t('Answer the questions my customers always ask me')],
78
+ social: () => [t('Write five posts for this week about what I sell'), t('Give me ideas for a short video that shows my product'), t('Write the description of my Instagram profile')],
73
79
  numbers: () => [t('Sort these invoices by month in a table'), t('Check this sheet and tell me what does not add up'), t('Make the expense summary I send to my accountant')],
80
+ office: () => [t('Turn these notes into a clear report'), t('Write a polite email asking for more time'), t('Make me the outline of a ten-minute presentation')],
81
+ study: () => [t('Explain this topic to me as if I were fifteen'), t('Make me ten questions to check that I understood it'), t('Turn this document into study notes')],
74
82
  code: () => [t('Explain this project to me as if it were my first day'), t('Find out why it does not start'), t('Propose three small fixes and make them in a separate branch')],
75
83
  notes: () => [t('Group my loose notes by topic'), t('Plan my week with what I have pending'), t('Remind me on Friday to check this')],
76
84
  curious: () => [t('Change the colours of the page'), t('Add a task to the list'), t('Tell me what is in this folder')],
@@ -78,11 +86,76 @@ const IDEAS = {
78
86
  };
79
87
  const SUGGESTIONS = {
80
88
  business: () => [t('Name an end-of-month promotion'), t('Write to a customer who has not paid, without sounding rude')],
89
+ social: () => [t('Give me three ideas for posts this week'), t('Write a short, friendly caption for a photo of my product')],
81
90
  numbers: () => [t('How do I sort my invoices so I never lose one?'), t('Make the list of what I ask my accountant every month')],
91
+ office: () => [t('Help me write a polite email to say no'), t('Give me an outline for a short presentation')],
92
+ study: () => [t('Explain photosynthesis in three lines'), t('Give me a trick to remember what I study')],
82
93
  code: () => [t('Explain what a git branch is in two lines'), t('Give me a name for a booking app')],
83
94
  notes: () => [t('Make me a list to organise my week'), t('Give me an idea to start a long text')],
84
95
  curious: () => [t('What can you do for me?'), t('Tell me something fun in one line')],
85
96
  };
97
+ // WHAT CAN I MAKE? (2026-11-11, the author: «give them many ideas of what they can create with MADRE,
98
+ // in clear language»): when the person starts a project from nothing, ideas of what to make, three for
99
+ // each use, theirs first. Picking one names the folder and leaves its first message ready for the last
100
+ // step, so the project is born already knowing what it is for. [icon, what it is, one line, message]
101
+ const CREATE_IDEAS = {
102
+ business: () => [
103
+ ['globe', t('A page for my business'), t('Opening hours, where to find you and a WhatsApp button.'), t('Make me a one-page website for my business with my opening hours, where to find me and a WhatsApp button. Ask me first what you need to know.')],
104
+ ['market', t('A product catalogue'), t('Names, prices and descriptions in one table.'), t('Make me a product catalogue with name, price and description, in a table I can fill in and print.')],
105
+ ['chat', t('Answers for my customers'), t('What they always ask you, ready to copy.'), t('Write the answers to the questions my customers always ask me, short and friendly, ready to paste into WhatsApp.')],
106
+ ],
107
+ social: () => [
108
+ ['calendar', t('A posting calendar'), t('A month of ideas, with the text for each day.'), t('Make me a posting calendar for this month: one idea a day with its caption and hashtags.')],
109
+ ['image', t('Short video scripts'), t('Reels and TikToks of 30 seconds, shot by shot.'), t('Write three scripts for 30-second videos about what I do, shot by shot.')],
110
+ ['appearance', t('My brand kit'), t('Your tone, your colours and phrases that sound like you.'), t('Help me write my brand kit: how I speak, my colours and five phrases that sound like me.')],
111
+ ],
112
+ numbers: () => [
113
+ ['bars', t('An expense tracker'), t('A sheet that adds up by month and category on its own.'), t('Make me an expense sheet that adds up by month and category, and explain how to fill it in.')],
114
+ ['inbox', t('My invoices in order'), t('One folder per month and a table so none gets lost.'), t('Help me put my invoices in order: one folder per month and a table with the date, customer, amount and whether it is paid.')],
115
+ ['trending', t('My monthly budget'), t('What comes in, what goes out and what is left.'), t('Make me a monthly budget: what comes in, what goes out and what is left, with a simple chart.')],
116
+ ],
117
+ office: () => [
118
+ ['compose', t('Email templates'), t('The emails you write most, ready to use.'), t('Write templates for the emails I send most: following up, a reminder, saying no politely and saying thank you.')],
119
+ ['note', t('A weekly report'), t('A format you fill in in five minutes.'), t('Make me a weekly report I can fill in in five minutes: what got done, what is pending and what I need.')],
120
+ ['card', t('A presentation'), t('Clear slides out of your ideas.'), t('Help me make a presentation: ask me the topic and who it is for, and propose ten slides.')],
121
+ ],
122
+ study: () => [
123
+ ['book', t('Notes for a subject'), t('Summaries and outlines, topic by topic.'), t('Help me make study notes for a subject: ask me which one and put it in order topic by topic.')],
124
+ ['checkbox', t('A practice exam'), t('Questions to see whether you understood it.'), t('Make me a practice exam of fifteen questions, with the answers at the end, about a topic I will tell you.')],
125
+ ['calendar', t('A study plan'), t('What to review each day until the exam.'), t('Make me a study plan up to the day of my exam: what to review each day and for how long.')],
126
+ ],
127
+ notes: () => [
128
+ ['note', t('A home for my ideas'), t('What occurs to you, sorted by topic.'), t('Set up a place for my ideas: one file per topic and an index that says what is in each one.')],
129
+ ['list', t('My week, planned'), t('Your to-dos spread over the days.'), t('Help me plan my week: ask me what I have pending and spread it over the days.')],
130
+ ['pencil', t('A long text'), t('A story, an essay or a book, chapter by chapter.'), t('I want to write a long text. Ask me what it is about and propose an outline by chapters.')],
131
+ ],
132
+ code: () => [
133
+ ['code', t('A web app'), t('From scratch, with a plan in steps before any code.'), t('I want to build a web app. Ask me what it should do and propose a plan in steps before writing code.')],
134
+ ['globe', t('A personal page'), t('Your portfolio on a single page.'), t('Make me a one-page portfolio with who I am, what I do and how to contact me.')],
135
+ ['running', t('A script that saves me time'), t('Something that does a repetitive task for you.'), t('Help me write a small script that does a repetitive task for me. Ask me first which one.')],
136
+ ],
137
+ curious: () => [
138
+ ['spark', t('A simple game'), t('A game in the browser, to watch the AIs work.'), t('Make me a simple game that runs in the browser, like guessing a number, and tell me how to open it.')],
139
+ ['checkbox', t('A shopping list'), t('A page for the supermarket that remembers itself.'), t('Make me a shopping list page where I can add and tick off things, and that remembers them.')],
140
+ ['book', t('A recipe book'), t('Your favourite recipes, with ingredients and steps.'), t('Make me a recipe book page: I will tell you my favourite recipes and you put them in order with ingredients and steps.')],
141
+ ],
142
+ };
143
+ // The order the uses are offered in when the person marked none.
144
+ const CREATE_ORDER = ['business', 'social', 'office', 'numbers', 'study', 'notes', 'curious', 'code'];
145
+ // Ideas shown at first: two rows of three; the rest behind «More ideas».
146
+ const CREATE_SHOWN = 6;
147
+ // The folder's name from what the idea makes, in the person's language, without its article: «Una
148
+ // página para mi negocio» → «pagina-para-mi-negocio».
149
+ const slugOf = (words) => String(words).normalize('NFD').replace(/[̀-ͯ]/g, '').toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '').replace(/^(?:una?|el|la|los|las|an?|the)-/, '').slice(0, 48);
150
+ // The practice project (src/salas.mjs, createSampleProject) is a page with a to-do list: the messages
151
+ // for it say what each one will do, so the person knows what to look at. [icon, message, what happens]
152
+ const PRACTICE_MESSAGES = () => [
153
+ ['appearance', t('Change the colours of my task list to green and white'), t('You will see the page change. If you do not like it, Undo puts it back.')],
154
+ ['add', t('Add a button that clears the finished tasks'), t('An AI edits the page and tells you what it changed.')],
155
+ ['database', t('Make the tasks stay when I close the page'), t('Close it and open it again to check that it remembers them.')],
156
+ ['help', t('Explain this project to me in simple words'), t('A first look, without changing anything.')],
157
+ ];
158
+
86
159
  // «Do you already pay for an AI?»: each agent by the plan people know it by.
87
160
  const PLANS = {
88
161
  codex: () => t('You pay for ChatGPT Plus or Pro: here it is called Codex, ChatGPT working in your files.'),
@@ -169,8 +242,12 @@ export function openWelcome({ at = null, then = null, host = {} } = {}) {
169
242
  ready: 0, // agents connected
170
243
  found: null, // the folders that look like projects, and the ones other tools know
171
244
  picked: null, // the ones marked to bring
172
- picker: false, // «another folder or a new one» open
245
+ way: null, // the other way in open: «new» · «browse»
246
+ allFound: false, // every found folder shown, not only the first rows
173
247
  added: [], // the projects added while the welcome was open
248
+ idea: null, // what the new project will make: { name, message }, from «What can I make?»
249
+ allIdeas: false, // every idea shown, not only the first rows
250
+ intents: new Map(), // a project made here → the first message its idea left ready
174
251
  };
175
252
  let leave = null; // what the step on screen stops when another one comes
176
253
  let pollTimer = 0;
@@ -250,7 +327,7 @@ export function openWelcome({ at = null, then = null, host = {} } = {}) {
250
327
  item.append(key);
251
328
  list.append(item);
252
329
  });
253
- railBody.replaceChildren(list, el('p', 'wl-rail-foot', t('It takes about three minutes. What takes long to download keeps downloading while you go on.')));
330
+ railBody.replaceChildren(list, el('p', 'wl-rail-foot', t('It takes about three minutes. If something takes a while to download, go on with the steps: it finishes on its own.')));
254
331
  }
255
332
 
256
333
  // ---- The parts every step is made of.
@@ -268,10 +345,20 @@ export function openWelcome({ at = null, then = null, host = {} } = {}) {
268
345
  box.append(...children.filter(Boolean).map((child) => (typeof child === 'string' ? el('p', null, child) : child)));
269
346
  return box;
270
347
  };
348
+ // What just unfolded is brought into sight with a gentle scroll (2026-11-10, the author: «guide
349
+ // them down as more shows»): only as far as its end, and never past its top.
350
+ const reveal = (node) => requestAnimationFrame(() => {
351
+ if (!node?.isConnected || !content.contains(node)) return;
352
+ const box = content.getBoundingClientRect();
353
+ const own = node.getBoundingClientRect();
354
+ const by = Math.min(own.bottom - box.bottom + 18, own.top - box.top - 12);
355
+ if (by > 4) content.scrollBy({ top: by, behavior: matchMedia('(prefers-reduced-motion: reduce)').matches ? 'auto' : 'smooth' });
356
+ });
271
357
  // A word MADRE uses, explained where it first appears, folded: «what is this?».
272
358
  const what = (question, answer) => {
273
359
  const box = el('details', 'wl-what');
274
360
  box.append(el('summary', null, question), el('p', null, answer));
361
+ box.addEventListener('toggle', () => { if (box.open) reveal(box); });
275
362
  return box;
276
363
  };
277
364
  // «See how to fix it», under what went wrong: the card of Diagnostics for it, for this system.
@@ -349,15 +436,40 @@ export function openWelcome({ at = null, then = null, host = {} } = {}) {
349
436
  const env = s.env ?? {};
350
437
  const hw = facts();
351
438
  const grid = el('div', 'wl-facts');
352
- const fact = (label, value) => { if (!value) return; const box = el('div', 'wl-fact'); box.append(el('small', null, label), el('b', null, value)); grid.append(box); };
353
- fact(t('Where MADRE runs'), placeWords());
354
- fact(t('System'), env.name ?? (env.os === 'macos' ? 'macOS' : env.os === 'linux' ? 'Linux' : env.os ?? null));
355
- fact(t('Processor'), hw.chip ?? (hw.cores ? t('{n} cores', { n: hw.cores }) : null));
356
- fact(t('Memory'), hw.memoryGb ? `${number(hw.memoryGb)} GB` : null);
357
- fact(t('Graphics card'), graphicsWords());
358
- fact(t('Free space'), env.disk ? t('{n} GB free', { n: number(env.disk.freeGb) }) : null);
439
+ // Each thing found says what it means for the person, not only what it is (2026-11-13: a list of
440
+ // parts read as a technician's report).
441
+ const fact = (label, value, means = null) => {
442
+ if (!value) return;
443
+ const box = el('div', 'wl-fact');
444
+ box.append(el('small', null, label), el('b', null, value));
445
+ if (means) box.append(el('span', null, means));
446
+ grid.append(box);
447
+ };
448
+ fact(t('Where MADRE runs'), placeWords(), t('Your files and your chats stay here.'));
449
+ fact(t('System'), env.name ?? (env.os === 'macos' ? 'macOS' : env.os === 'linux' ? 'Linux' : env.os ?? null), t('So MADRE downloads what matches your computer.'));
450
+ fact(t('Processor'), hw.chip ?? (hw.cores ? t('{n} cores', { n: hw.cores }) : null), t('It does the work of your own AI.'));
451
+ fact(t('Memory'), hw.memoryGb ? `${number(hw.memoryGb)} GB` : null, t('The more memory, the bigger and smarter the AI that fits.'));
452
+ fact(t('Graphics card'), graphicsWords(), hw.accelerator === 'apple' ? null : t('With one, your own AI answers faster.'));
453
+ fact(t('Free space'), env.disk ? t('{n} GB free', { n: number(env.disk.freeGb) }) : null, t('An AI of your own takes between 1 and 20 GB.'));
454
+ // A button that reads as one (2026-11-14, the author: «hacer más clickeable»): the chip, the words
455
+ // and an arrow that turns when it opens, on a soft pill instead of grey small print.
456
+ const checkedSummary = () => {
457
+ const summary = el('summary', 'wl-more-key');
458
+ const chip = el('span', 'wl-more-icon');
459
+ chip.innerHTML = trazo('chip'); // trusted: our own SVG string
460
+ const arrow = el('span', 'wl-more-arrow');
461
+ arrow.innerHTML = trazo('chevron'); // trusted: our own SVG string
462
+ summary.append(chip, el('span', null, t('What MADRE checked on your computer')), arrow);
463
+ return summary;
464
+ };
359
465
  const fold = el('details', 'wl-more');
360
- fold.append(el('summary', null, t('See what we found on your computer')), grid, el('p', 'wl-tiny', t('This never leaves your computer. We only use it to know which AI fits.')));
466
+ fold.addEventListener('toggle', () => { if (fold.open) reveal(fold); });
467
+ fold.append(
468
+ checkedSummary(),
469
+ el('p', 'wl-facts-lead', t('MADRE can have an AI of its own that works without internet. To know which one fits your computer, it checked this:')),
470
+ grid,
471
+ el('p', 'wl-tiny', t('None of this leaves your computer.')),
472
+ );
361
473
  return fold;
362
474
  }
363
475
  // What only some places need to know, said in the greeting so nothing surprises later.
@@ -414,17 +526,20 @@ export function openWelcome({ at = null, then = null, host = {} } = {}) {
414
526
  // ---- 2 · WHAT YOU WANT IT FOR: one or several; the examples from here on follow it.
415
527
  function use() {
416
528
  const picture = { id: 'use', data: () => ({ items: PROFILES.map((one) => ({ id: one.id, on: s.profile.has(one.id) })) }) };
417
- const parts = head(t('What do you want it for?'), t('Mark whatever looks like yours. That way the examples we show you are ones that help you, not a programmer\'s.'), picture, s.profile.size ? t('This picks the examples you will see.') : t('Mark one or several.'));
418
- const grid = el('div', 'wl-tiles');
529
+ const parts = head(t('What would you like MADRE to help you with?'), t('Choose one or more. That way MADRE shows you examples of what you do.'), picture, s.profile.size ? t('Your examples will be about this.') : t('Choose one or more.'));
530
+ const grid = el('div', 'wl-tiles wl-uses');
419
531
  for (const one of PROFILES) {
420
532
  const tile = button('wl-tile', null, () => {
421
533
  if (s.profile.has(one.id)) s.profile.delete(one.id); else s.profile.add(one.id);
422
534
  tile.setAttribute('aria-pressed', String(s.profile.has(one.id)));
423
- scene.say(s.profile.size ? t('This picks the examples you will see.') : t('Mark one or several.'));
535
+ scene.say(s.profile.size ? t('Your examples will be about this.') : t('Choose one or more.'));
424
536
  paintUseKeys();
425
537
  });
426
538
  tile.setAttribute('aria-pressed', String(s.profile.has(one.id)));
427
- tile.append(el('b', null, one.title()), el('small', null, one.sub()));
539
+ const mark = el('span', 'wl-tile-icon');
540
+ mark.setAttribute('aria-hidden', 'true');
541
+ mark.innerHTML = trazo(one.icon); // trusted: our own SVG string
542
+ tile.append(mark, el('b', null, one.title()), el('small', null, one.sub()));
428
543
  grid.append(tile);
429
544
  }
430
545
  parts.push(grid);
@@ -434,7 +549,7 @@ export function openWelcome({ at = null, then = null, host = {} } = {}) {
434
549
  }
435
550
  function paintUseKeys() {
436
551
  footer({
437
- next: s.profile.size ? t('Continue') : t('Continue without marking'),
552
+ next: s.profile.size ? t('Continue') : t('Continue without choosing'),
438
553
  onNext: async () => {
439
554
  await save({ profile: [...s.profile] });
440
555
  go(s.step + 1, s.profile.size ? 'done' : 'skip');
@@ -502,6 +617,116 @@ export function openWelcome({ at = null, then = null, host = {} } = {}) {
502
617
  const n = s.picked?.size ?? 0;
503
618
  return n ? t('{n} on their way. They stay where they are; MADRE only learns where to find them.', { n }) : t('Mark the folders you want to bring.');
504
619
  };
620
+ // Found folders shown at first: three rows of three; the rest behind «See all».
621
+ const FOUND_SHOWN = 9;
622
+ // WHAT IS ALREADY IN HOME, by name (2026-11-11, the author: «it says you already have 2 projects,
623
+ // but not which; someone coming back does not see them»): each one with where it lives, and the ones
624
+ // brought in this welcome marked as new. Shown, never offered again to mark.
625
+ const HOME_SHOWN = 8;
626
+ function homeList(had) {
627
+ const rooms = [...had];
628
+ for (const one of s.added) if (!rooms.some((room) => room.root === one.root || room.name === one.name)) rooms.push(one);
629
+ if (!rooms.length) return null;
630
+ const isNew = (room) => s.added.some((one) => one.root === room.root || one.name === room.name);
631
+ const box = el('div', 'wl-inhome');
632
+ const fresh = rooms.filter(isNew).length;
633
+ const title = rooms.length === 1 ? t('Already in Home: 1 project') : t('Already in Home: {n} projects', { n: rooms.length });
634
+ const words = fresh ? (fresh === 1 ? t('1 of them was added just now.') : t('{n} of them were added just now.', { n: fresh })) : t('Add another one, or continue.');
635
+ const top = el('p', 'wl-inhome-head');
636
+ top.append(el('b', null, title), el('span', null, words));
637
+ const list = el('ul', 'wl-inhome-list');
638
+ for (const room of rooms.slice(0, HOME_SHOWN)) {
639
+ const item = el('li', `wl-inhome-item${isNew(room) ? ' new' : ''}`);
640
+ const mark = el('span', 'wl-inhome-icon');
641
+ mark.setAttribute('aria-hidden', 'true');
642
+ mark.innerHTML = trazo('folder'); // trusted: our own SVG string
643
+ const where = room.root ? homeWord(room.root) : '';
644
+ const text = el('span', 'wl-inhome-words');
645
+ text.append(el('b', null, room.name), el('small', null, where));
646
+ item.append(mark, text);
647
+ if (isNew(room)) item.append(el('span', 'wl-inhome-tag', t('New')));
648
+ item.title = [room.name, where].filter(Boolean).join('\n');
649
+ list.append(item);
650
+ }
651
+ box.append(top, list);
652
+ if (rooms.length > HOME_SHOWN) box.append(el('small', 'wl-inhome-more', t('And {n} more, in Home.', { n: rooms.length - HOME_SHOWN })));
653
+ return box;
654
+ }
655
+ // WHAT CAN I MAKE?, under the new project's name: ideas for the person's uses first, then the rest.
656
+ let paintIdeas = () => {};
657
+ function createIdeas(nameInput) {
658
+ const box = el('div', 'wl-make');
659
+ const order = [...new Set([...s.profile].filter((one) => CREATE_IDEAS[one]).concat(CREATE_ORDER))];
660
+ const all = order.flatMap((use) => CREATE_IDEAS[use]().map(([icon, title, sub, message]) => ({ use, icon, title, sub, message, name: slugOf(title) })));
661
+ paintIdeas = () => {
662
+ const shown = s.allIdeas ? all : all.slice(0, CREATE_SHOWN);
663
+ const grid = el('div', 'wl-make-grid');
664
+ for (const idea of shown) {
665
+ const on = s.idea?.message === idea.message;
666
+ const key = button('wl-make-idea', null, () => {
667
+ s.idea = on ? null : { name: idea.name, message: idea.message, title: idea.title };
668
+ if (nameInput) {
669
+ nameInput.value = s.idea ? s.idea.name : '';
670
+ nameInput.dispatchEvent(new Event('change', { bubbles: true }));
671
+ }
672
+ paintIdeas();
673
+ // On to the name and the key that makes it (2026-11-11, the author: «after picking an idea it
674
+ // no longer takes them down to the name»): brought into sight, never past the idea chosen.
675
+ if (s.idea && nameInput) reveal(nameInput.closest('.sm-new-project') ?? nameInput);
676
+ });
677
+ key.setAttribute('aria-pressed', String(on));
678
+ const mark = el('span', 'wl-make-icon');
679
+ mark.setAttribute('aria-hidden', 'true');
680
+ mark.innerHTML = trazo(idea.icon); // trusted: our own SVG string
681
+ const words = el('span', 'wl-make-words');
682
+ words.append(el('b', null, idea.title), el('small', null, idea.sub));
683
+ key.append(mark, words);
684
+ grid.append(key);
685
+ }
686
+ const head = el('div', 'wl-make-head');
687
+ head.append(el('b', null, t('Not sure what to make? Pick an idea')), el('small', null, t('It names the folder for you, and MADRE opens the project with its first message already written. You can change anything.')));
688
+ const parts = [head, grid];
689
+ if (all.length > CREATE_SHOWN) parts.push(button('wl-btn ghost small wl-make-more', s.allIdeas ? t('Fewer ideas') : t('More ideas ({n})', { n: all.length - CREATE_SHOWN }), () => { s.allIdeas = !s.allIdeas; paintIdeas(); }));
690
+ if (s.idea) {
691
+ const first = el('div', 'wl-make-first');
692
+ first.append(el('small', null, t('Its first message, ready for you to send:')), el('p', null, `«${s.idea.message}»`));
693
+ parts.push(first);
694
+ }
695
+ box.replaceChildren(...parts);
696
+ };
697
+ paintIdeas();
698
+ return box;
699
+ }
700
+ // THE PRACTICE ONE, said before it is made: what it is, what can be asked of it, and one key.
701
+ function practicePanel() {
702
+ const box = el('div', 'wl-practice');
703
+ const head = el('div', 'wl-make-head');
704
+ head.append(el('b', null, t('A to-do list to practise on')), el('small', null, t('MADRE makes a folder with a small page: a list where you write tasks and tick them off. It is there so you can ask your AIs for changes and watch them happen. Nothing of yours is touched, and Undo puts back any change.')));
705
+ const list = el('ul', 'wl-practice-list');
706
+ for (const [icon, message, what] of PRACTICE_MESSAGES()) {
707
+ const item = el('li');
708
+ const mark = el('span', 'wl-make-icon');
709
+ mark.setAttribute('aria-hidden', 'true');
710
+ mark.innerHTML = trazo(icon); // trusted: our own SVG string
711
+ const words = el('span', 'wl-make-words');
712
+ words.append(el('b', null, `«${message}»`), el('small', null, what));
713
+ item.append(mark, words);
714
+ list.append(item);
715
+ }
716
+ const said = el('p', 'wl-tiny', '');
717
+ const make = button('wl-btn primary', t('Create the practice project'), async () => {
718
+ make.disabled = true;
719
+ make.textContent = t('Creating…');
720
+ const answer = await post('/api/salas/new', { sample: true, language: language() });
721
+ if (!answer.ok) { said.textContent = answer.body?.error ?? t('The project to try MADRE could not be made.'); make.disabled = false; make.textContent = t('Create the practice project'); return; }
722
+ s.added = [...s.added, ...(answer.body.added ?? [])];
723
+ s.way = null;
724
+ await host.refresh?.();
725
+ if (stepId() === 'project') go(s.step + 1, 'done');
726
+ });
727
+ box.append(head, el('p', 'wl-section', t('Things you will be able to ask it')), list, make, said);
728
+ return box;
729
+ }
505
730
  function project() {
506
731
  const had = host.projects?.() ?? [];
507
732
  if (!s.found && !s.finding) { s.finding = true; void loadFound(); }
@@ -509,16 +734,19 @@ export function openWelcome({ at = null, then = null, host = {} } = {}) {
509
734
  const looking = !s.found;
510
735
  const known = found.some((one) => one.from?.length);
511
736
  const picture = { id: 'project', data: () => ({ count: s.picked?.size ?? 0 }) };
512
- const lead = looking ? t('Looking for your folders…') : !found.length ? t('Choose a folder you work in, or make a new one.')
513
- : known ? t('You already opened these folders with other tools. We marked the ones you used most recently; untick the ones you do not want.')
737
+ const lead = looking ? t('Looking for your folders…') : !found.length ? t('Make a new project, or choose a folder you already work in.')
738
+ : known ? t('These are folders you already opened with other tools; the newest come marked. They stay where they are: MADRE only learns where to find them.')
514
739
  : t('These folders look like projects. Mark the ones you want to bring.');
515
740
  const parts = head(t('Bring what you already have'), lead, picture, projectCaption());
516
- parts.push(what(t('What is a project?'), t('Each folder you bring is a project: your shop, this year\'s invoices, your website. Each one keeps its own conversations and what has been decided, without mixing with the others. Bringing it does not move it or change anything in it.')));
517
- if (had.length) parts.push(note('ok', had.length === 1 ? t('You already have a project in Home: {name}. Add another one, or continue.', { name: had[0].name }) : t('You already have {n} projects in Home. Add another one, or continue.', { n: had.length })));
741
+ const inHome = homeList(had);
742
+ if (inHome) parts.push(inHome);
518
743
  if (s.env?.place === 'wsl') parts.push(note('warn', t('Keep your projects inside Linux (your folder in /home). A Windows folder (/mnt/c/…) makes MADRE slower and protects your files less.'), fix('wsl-windows-folder')));
519
744
  if (found.length) {
745
+ // Three columns of small cards (2026-11-10, the author: «less scrolling»): the name, where it
746
+ // is and when, and the tools it was opened with, each on one line.
520
747
  const list = el('div', 'wl-found');
521
- for (const one of found) {
748
+ const shown = s.allFound ? found : found.slice(0, FOUND_SHOWN);
749
+ for (const one of shown) {
522
750
  const on = s.picked?.has(one.path);
523
751
  const row = button('wl-found-row', null, () => {
524
752
  if (s.picked.has(one.path)) s.picked.delete(one.path); else s.picked.add(one.path);
@@ -531,50 +759,83 @@ export function openWelcome({ at = null, then = null, host = {} } = {}) {
531
759
  const box = el('span', 'wl-box');
532
760
  box.innerHTML = TICK; // trusted: our own SVG string
533
761
  const words = el('span', 'wl-found-words');
534
- words.append(el('b', null, one.name), el('small', null, [homeWord(one.path), ago(one.when)].filter(Boolean).join(' · ')));
535
- const from = el('span', 'wl-from');
536
- if (one.from?.length) for (const tool of one.from) from.append(el('span', null, t('You opened it with {tool}', { tool: TOOL_NAMES[tool] ?? tool })));
537
- else from.append(el('span', null, t('Looks like a project')));
538
- row.append(box, words, from);
762
+ const where = [homeWord(one.path), ago(one.when)].filter(Boolean).join(' · ');
763
+ const tools = one.from?.length ? t('Opened with {tools}', { tools: new Intl.ListFormat(language(), { type: 'conjunction' }).format(one.from.map((tool) => TOOL_NAMES[tool] ?? tool)) }) : t('Looks like a project');
764
+ words.append(el('b', null, one.name), el('small', null, where), el('small', 'wl-from', tools));
765
+ row.title = [one.name, where, tools].join('\n');
766
+ row.append(box, words);
539
767
  list.append(row);
540
768
  }
541
769
  parts.push(list);
770
+ if (found.length > FOUND_SHOWN) {
771
+ const more = button('wl-btn ghost small wl-found-more', s.allFound ? t('Show fewer') : t('See all {n}', { n: found.length }), () => { s.allFound = !s.allFound; project(); });
772
+ parts.push(more);
773
+ }
542
774
  }
543
- // Other ways in: any folder or a new one (Home's own picker), or a project made to practise in.
775
+ // Other ways in (2026-11-10, the author: «simple: create or bring a project»): a new one by its
776
+ // name, any other folder, or one made to practise in. The folders found above are not offered
777
+ // again in a tab of their own.
544
778
  const others = el('div', 'wl-otherways');
545
- const browse = button('wl-tile', null, () => { s.picker = !s.picker; project(); });
546
- browse.setAttribute('aria-pressed', String(s.picker));
547
- browse.append(el('b', null, t('Another folder, or a new one')), el('small', null, t('Look on your computer, or make an empty folder with a name.')));
779
+ const way = (id, icon, title, sub, onPick) => {
780
+ const tile = button('wl-tile', null, onPick);
781
+ tile.setAttribute('aria-pressed', String(s.way === id));
782
+ const mark = el('span', 'wl-tile-icon');
783
+ mark.setAttribute('aria-hidden', 'true');
784
+ mark.innerHTML = trazo(icon); // trusted: our own SVG string
785
+ const said = el('small', null, sub);
786
+ tile.append(mark, el('b', null, title), said);
787
+ return { tile, said };
788
+ };
789
+ const pick = (id) => { s.way = s.way === id ? null : id; project(); };
790
+ const fresh = way('new', 'add', t('Create a new one'), t('An empty folder with the name you choose.'), () => pick('new'));
791
+ const browse = way('browse', 'folder', t('Choose another folder'), t('Any folder on your computer.'), () => pick('browse'));
548
792
  // No project at hand (2026-11-01): one made to try MADRE, a page with a list of tasks and a README
549
793
  // with what to ask. «I do not know what I would do with MADRE» is answered by having something.
550
- const sample = button('wl-tile', null, async () => {
551
- sample.disabled = true;
552
- const answer = await post('/api/salas/new', { sample: true, language: language() });
553
- if (!answer.ok) { sampleSaid.textContent = answer.body?.error ?? t('The project to try MADRE could not be made.'); sample.disabled = false; return; }
554
- s.added = [...s.added, ...(answer.body.added ?? [])];
555
- await host.refresh?.();
556
- if (stepId() === 'project') go(s.step + 1, 'done');
557
- });
558
- const sampleSaid = el('small', null, t('A page with a list of tasks, to ask your AIs for changes without fear of breaking anything.'));
559
- sample.append(el('b', null, t('A practice one')), sampleSaid);
560
- others.append(browse, sample);
561
- parts.push(el('p', 'wl-section', found.length ? t('Would you rather start another way?') : t('Or start another way')), others);
562
- if (s.picker) {
794
+ // Since 2026-11-11 it first says what it makes and what can be asked of it, then one key makes it.
795
+ const sample = way('sample', 'spark', t('A practice one'), t('A page with a list of tasks, to ask your AIs for changes without fear of breaking anything.'), () => pick('sample'));
796
+ others.append(fresh.tile, browse.tile, sample.tile);
797
+ parts.push(el('p', 'wl-section', found.length ? t('Or start another way') : t('How do you want to start?')), others);
798
+ let opened = null;
799
+ let focusName = false;
800
+ if (s.way === 'new' || s.way === 'browse') {
563
801
  const picker = host.projectPicker?.({
802
+ sources: [s.way],
564
803
  // A project made new here does not drop the folders already chosen (QA 1.1.0, NUE-08): they
565
- // are added too, and the found ones stay marked.
804
+ // are added too, and the found ones stay marked. The idea picked for it goes with it.
566
805
  onAdded: (added) => {
806
+ if (s.way === 'new' && s.idea && added?.[0]?.root) s.intents.set(added[0].root, s.idea.message);
567
807
  s.added = [...s.added, ...(added ?? [])];
568
- s.picker = false;
808
+ s.way = null;
809
+ s.idea = null;
569
810
  s.found = null;
570
811
  if (stepId() === 'project') project();
571
812
  },
572
813
  });
573
- if (picker) parts.push(picker.node);
814
+ if (picker) {
815
+ opened = picker.node;
816
+ if (s.way === 'new') {
817
+ // The ideas come first and the name under them: picking one writes the name, and the key
818
+ // that makes the project is right below. Both are brought into sight together.
819
+ const name = opened.querySelector('.sm-new-name input');
820
+ if (name && s.idea && !name.value) name.value = s.idea.name;
821
+ // Writing a name of one's own lets go of the idea's: the folder is theirs.
822
+ name?.addEventListener('input', () => { if (s.idea && name.value !== s.idea.name) { s.idea = null; paintIdeas(); } });
823
+ const flow = el('div', 'wl-newflow');
824
+ flow.append(createIdeas(name), opened);
825
+ opened = flow;
826
+ focusName = true;
827
+ }
828
+ parts.push(opened);
829
+ }
574
830
  }
575
- if (s.added.length) parts.push(note('ok', s.added.length === 1 ? t('{name} was added to Home.', { name: s.added[0].name }) : t('{n} projects were added to Home.', { n: s.added.length })));
831
+ if (s.way === 'sample') parts.push(practicePanel());
832
+ parts.push(what(t('What is a project?'), t('Each folder you bring is a project: your shop, this year\'s invoices, your website. Each one keeps its own conversations and what has been decided, without mixing with the others. Bringing it does not move it or change anything in it.')));
833
+ const top = content.scrollTop;
576
834
  content.replaceChildren(...parts);
835
+ content.scrollTop = top;
577
836
  paintProjectKeys();
837
+ if (opened) { reveal(opened); if (focusName) opened.querySelector('input[type="text"]')?.focus({ preventScroll: true }); }
838
+ else if (s.way === 'sample') reveal(content.querySelector('.wl-practice'));
578
839
  }
579
840
  function paintProjectKeys() {
580
841
  const n = s.picked?.size ?? 0;
@@ -622,6 +883,8 @@ export function openWelcome({ at = null, then = null, host = {} } = {}) {
622
883
  // Back to this computer's Ollama after pointing at another one.
623
884
  if ((value === 'here' || value === 'other') && s.ollama?.host && !localHost(s.ollama.host)) void post('/api/local-ai/host', { host: null }).then(() => readOllama({ probe: true })).then(() => paintAi());
624
885
  paintAi();
886
+ // What the choice opened, brought into sight.
887
+ reveal(aiBody?.lastElementChild);
625
888
  };
626
889
  const options = [];
627
890
  const recommended = fit()?.recommended?.run ?? null;
@@ -642,7 +905,7 @@ export function openWelcome({ at = null, then = null, host = {} } = {}) {
642
905
  const grid = el('div', 'wl-models');
643
906
  const best = fit()?.recommended?.run?.id;
644
907
  for (const model of fitting()) {
645
- const key = button('wl-model', null, () => { s.model = model; paintAi(); });
908
+ const key = button('wl-model', null, () => { s.model = model; paintAi(); reveal(aiBody?.lastElementChild); });
646
909
  key.setAttribute('aria-pressed', String(offered()?.id === model.id));
647
910
  key.append(el('b', null, model.label), el('small', null, t('{size} GB to download', { size: number(model.sizeGb ?? 0) })), el('span', 'wl-model-fit', model.id === best ? t('The one we recommend') : model.run === 'slow' ? t('Fits, answering slowly') : t('Fits without slowing it down')));
648
911
  grid.append(key);
@@ -669,7 +932,11 @@ export function openWelcome({ at = null, then = null, host = {} } = {}) {
669
932
  coordinator.append(host.mark?.('bishop', 34) ?? el('span'), words);
670
933
  aiBody = el('div', 'wl-ai');
671
934
  content.replaceChildren(...head(t('An AI that lives on your computer'), lead, { id: 'ai', data: aiPicture }, aiCaption()), coordinator, aiBody);
935
+ // Already there when the step opens (2026-11-11, the author: «it opens scrolled to the bottom»):
936
+ // the step starts at its top, on the choices; only a talk that arrives later is brought into sight.
937
+ if (aiReady()) s.talkShown = true;
672
938
  paintAi();
939
+ content.scrollTop = 0;
673
940
  // While Ollama is not there yet, MADRE looks every few seconds: «I did it» is a courtesy.
674
941
  clearInterval(pollTimer);
675
942
  pollTimer = setInterval(() => {
@@ -688,7 +955,12 @@ export function openWelcome({ at = null, then = null, host = {} } = {}) {
688
955
  if (s.choice === 'windows' || s.choice === 'remote') blocks.push(addressFlow());
689
956
  // Once its model is there, a first talk with it, wherever it runs.
690
957
  if (s.choice !== 'skip' && aiReady()) blocks.push(talkFlow());
958
+ const top = content.scrollTop;
691
959
  aiBody.replaceChildren(...blocks);
960
+ content.scrollTop = top;
961
+ // The first time the talk with it shows, it is brought into sight.
962
+ const talk = aiBody.querySelector('.wl-talk-card');
963
+ if (talk && !s.talkShown) { s.talkShown = true; reveal(talk); }
692
964
  // With the AI there, its memory comes on its own: nothing to press.
693
965
  if ((s.choice === 'here' || s.choice === 'other') && aiReady() && !hasModel(EMBED_MODEL) && !s.pulls.has(EMBED_MODEL) && !pulling()) void startPull(EMBED_MODEL);
694
966
  const going = Boolean(pulling()) || s.queue.length > 0;
@@ -1006,7 +1278,23 @@ export function openWelcome({ at = null, then = null, host = {} } = {}) {
1006
1278
  const added = s.added.map((one) => rooms.find((room) => room.root === one.root || room.name === one.name)).filter(Boolean);
1007
1279
  const room = added[0] ?? rooms[0] ?? null;
1008
1280
  const sample = s.added.some((one) => one.sample && (room?.root === one.root || room?.name === one.name));
1009
- const ideas = (IDEAS[sample ? 'curious' : profileOf() ?? 'none'] ?? IDEAS.none)();
1281
+ // Ideas for what is in that folder (2026-11-10, the author: «for the project the person chose»):
1282
+ // its sheets, documents, pages or code by name; an empty one is a project being born, and gets
1283
+ // ideas to make something, by what MADRE is for to this person. The practice one has its own.
1284
+ const inside = room && !sample ? await getJson(`/api/salas/peek?room=${encodeURIComponent(room.id)}`) : null;
1285
+ if (stepId() !== 'ready') return;
1286
+ const born = Array.isArray(inside?.entries) && !inside.entries.some((entry) => !String(entry.name).startsWith('.'));
1287
+ // MESSAGES FOR THE PROJECT (2026-11-11, the author: «the ideas at the end lack logic; say the
1288
+ // messages they can send to their project»): the practice one says what each message will do to
1289
+ // its page; one made here from an idea opens with that idea's message first; the rest, messages
1290
+ // for what is in the folder.
1291
+ const intent = room ? s.intents.get(room.root) ?? null : null;
1292
+ let ideas = sample
1293
+ ? PRACTICE_MESSAGES().map(([icon, text, what]) => ({ icon, text, what, open: false }))
1294
+ : Array.isArray(inside?.entries)
1295
+ ? startersFor({ entries: inside.entries, profile: [...s.profile], project: room.name, t, count: 4 })
1296
+ : (IDEAS[profileOf() ?? 'none'] ?? IDEAS.none)().map((text) => ({ icon: 'compose', text, open: false }));
1297
+ if (intent) ideas = [{ icon: 'spark', text: intent, what: t('The idea you chose when you made it.'), open: false }, ...ideas.filter((one) => one.text !== intent)].slice(0, 4);
1010
1298
  const pull = pulling();
1011
1299
  const aiWords = aiReady() && !pull
1012
1300
  ? (s.talk?.messages?.length > 1 ? t('Ready, and you have already met') : `${s.ollama.chatModel ?? chatModels()[0].name}${localHost(s.ollama.host) ? '' : ` · ${t('on another computer')}`}`)
@@ -1030,9 +1318,9 @@ export function openWelcome({ at = null, then = null, host = {} } = {}) {
1030
1318
  }
1031
1319
  const parts = [];
1032
1320
  const lead = room && connected.length
1033
- ? t('We open {name}. Tap an idea and it stays written so you only send it, or write your own.', { name: room.name })
1321
+ ? t('Everything is ready. Next, {name} opens, and you can start with one of these messages or write your own.', { name: room.name })
1034
1322
  : t('Here is what is ready. Anything you left for later has its button.');
1035
- parts.push(...head(t('Where do we start?'), lead, { id: 'ready', data: () => ({ text: ideas[0] }) }, room && connected.length ? t('Your first message, almost written.') : t('Almost there.')), summary);
1323
+ parts.push(...head(t('Where do we start?'), lead, { id: 'ready', data: () => ({ text: ideas[0]?.text ?? '', note: Boolean(room && connected.length) }) }, room && connected.length ? t('Your first message, almost written.') : t('Almost there.')), summary);
1036
1324
  // The AI arrived while the person was elsewhere: say so, and offer the hello.
1037
1325
  if (aiReady() && !pull && !(s.talk?.messages?.length > 1)) {
1038
1326
  const arrived = el('div', 'wl-arrived');
@@ -1059,9 +1347,23 @@ export function openWelcome({ at = null, then = null, host = {} } = {}) {
1059
1347
  // opened a project. Since 1.1 with the first message already written (`#escribe=`): the person only
1060
1348
  // sends it. Without a project or an agent, Home as before, whose first-time cards walk them there.
1061
1349
  if (room && connected.length) {
1062
- parts.push(el('p', 'wl-section', t('Ideas for {name}', { name: room.name })));
1350
+ parts.push(el('p', 'wl-section', born && !intent ? t('Messages to get {name} going', { name: room.name }) : t('Messages you can send to {name}', { name: room.name })));
1351
+ parts.push(el('p', 'wl-ideas-lead', sample
1352
+ ? t('{name} is a page with a to-do list. Pick a message: it opens written in the project, and you decide when to send it.', { name: room.name })
1353
+ : t('Pick one: it opens written in {name}, and you decide when to send it. Your AIs read the folder before they answer.', { name: room.name })));
1063
1354
  const list = el('div', 'wl-ideas');
1064
- for (const idea of ideas) { const key = button('wl-idea', idea, () => void enter(idea, key)); list.append(key); }
1355
+ for (const idea of ideas) {
1356
+ // One that ends open is for the person to finish: it opens written up to there.
1357
+ const key = button('wl-idea', null, () => void enter(idea.text, key));
1358
+ const mark = el('span', 'wl-idea-icon');
1359
+ mark.setAttribute('aria-hidden', 'true');
1360
+ mark.innerHTML = trazo(idea.icon); // trusted: our own SVG string
1361
+ const words = el('span', 'wl-idea-text');
1362
+ words.append(el('b', null, idea.open ? `${idea.text.trim()}…` : idea.text));
1363
+ if (idea.what) words.append(el('small', null, idea.what));
1364
+ key.append(mark, words);
1365
+ list.append(key);
1366
+ }
1065
1367
  parts.push(list);
1066
1368
  content.replaceChildren(...parts);
1067
1369
  const home = button('wl-btn ghost', t('Go to Home'), () => finish());
@@ -1186,7 +1488,9 @@ export function openWelcome({ at = null, then = null, host = {} } = {}) {
1186
1488
  if (!s.progress.at) void save({ at: WELCOME_STEPS[s.step] });
1187
1489
  // The opening plays on the first step; after it the rail's logo is already drawn, and stays still.
1188
1490
  dialog.classList.remove('waiting');
1189
- if (WELCOME_STEPS[s.step] === 'hello') void playOpening(dialog, { skipLabel: t('Skip') }).then((played) => { if (played) brand.classList.add('still'); });
1491
+ // Played already as the license was accepted (terms.js): not twice in a row.
1492
+ if (WELCOME_STEPS[s.step] === 'hello' && openingPlayed()) brand.classList.add('still');
1493
+ else if (WELCOME_STEPS[s.step] === 'hello') void playOpening(dialog, { skipLabel: t('Skip') }).then((played) => { if (played) brand.classList.add('still'); });
1190
1494
  });
1191
1495
  return current;
1192
1496
  }