AI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary
Python ai-promptsai-skillblueskyclaudeclaude-codeclawhubdeep-researchhackernewsinstagramopenclawpolymarketrecencyredditresearchsocial-mediatiktoktrendstwitterweb-searchyoutube
fix(nux): embed the welcome pitch in the setup modal (the visible surface) (#750)
Matt Van Hornf5bbc03aabf9
diff --git a/AGENTS.md b/AGENTS.mdindex 9dcbb741..3311fcf1 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -43,7 +43,7 @@ Python 3.12+ required. Use `uv` for the env; the venv lives at `.venv/`.- Do not reduce `fail_under` in `pyproject.toml` (`[tool.coverage.report]`) without documenting why in the PR. The coverage gate is a floor meant to rise over time, not to be relaxed when new code is under-tested.- Every `lib/*.py` call to `log.source_log(...)` must pass `tty_only=False`. The default is `True`, which silently drops every line when stderr isn't a TTY (Claude Code, Codex, CI, captured output) — turning source observability into invisible failure. Enforced by `tests/test_source_log_visibility.py`.- **CLI-gated optional sources** (Digg via `digg-pp-cli`, YouTube via `yt-dlp`) activate only when `shutil.which` resolves the binary on the **agent subprocess PATH** — not merely when the file exists on disk. First-run setup installs Digg through `@mvanhorn/printing-press-library` (default `$HOME/.local/bin`); Hermes/OpenClaw gateways often need that directory on PATH. Setup must distinguish PATH-visible installs from off-PATH binaries and must not claim "now active" unless the engine gate would pass. See `docs/solutions/integration-issues/digg-cli-agent-path-setup-wizard.md`.-- **First-run onboarding is consent-driven, model-led, and host-split.** The setup subprocess does only mechanical work (cookie reads, tool installs, GitHub device-auth, and emitting the engine-owned welcome via `--welcome`) — it cannot prompt, so consent lives in `SKILL.md` Step 0. Two flows are engine-deterministic rather than model-authored: the welcome is printed by `last30days.py --welcome` (Step 1 relays it verbatim, so it can't be skipped or drift), and the GitHub device code is surfaced by a two-command split — `setup --github-start` returns the code fast (foreground, copies to clipboard) and `setup --github-poll` waits for authorization (`setup --github` still chains both for back-compat). Step 0 has TWO branches: a **Claude Code Modal Flow** (the restored v3.0.0 `AskUserQuestion`-driven NUX — welcome, Auto/Manual/Skip, cookie consent, ScrapeCreators offer, `INCLUDE_SOURCES` opt-in, first-topic picker) for hosts with modals, and a **Non-Modal Prose Flow** for hosts without (OpenClaw, Codex, Cursor, Gemini CLI). Both ask before reading cookies, surface the macOS Full Disk Access fix on permission-denied, and offer the ScrapeCreators GitHub signup (10,000 free calls) on every first run. A successful `setup --github` persists `SCRAPECREATORS_API_KEY` automatically (via `setup_wizard.write_api_key`, 0o600) and masks the key in stdout. Do NOT collapse the modal flow back into a bare silent `setup` call or flatten it to prose-only — the guided modals are the feature (they eroded once and were restored). The onboarding contract is locked by `tests/test_onboarding_contract.py`. The Step 5 source opt-in is two tiers: **Recommended** (TikTok + Instagram, on with the key) and **Everything** (also Threads, Pinterest, and YouTube/TikTok/Instagram comments via `INCLUDE_SOURCES`). Threads, Pinterest, and YouTube comments are opt-in (gated on `INCLUDE_SOURCES`), not auto-on with the key — they appear only in the Step 5 Everything option, never in the welcome or the Step 4 offer.+- **First-run onboarding is consent-driven, model-led, and host-split.** The setup subprocess does only mechanical work (cookie reads, tool installs, GitHub device-auth, and emitting the engine-owned welcome via `--welcome`) — it cannot prompt, so consent lives in `SKILL.md` Step 0. Two flows avoid model-authored prose that Claude Code folds or the model skips: in the **Modal Flow** the welcome pitch is embedded in the setup modal's question (the AskUserQuestion modal is the only always-fully-visible surface — a separate welcome message or `--welcome` Bash run gets buried behind "ctrl+o to expand"); the **Non-Modal Prose Flow** still uses `last30days.py --welcome` (relayed verbatim) since it has no modal. The GitHub device code is surfaced by a two-command split — `setup --github-start` returns the code fast (foreground, copies to clipboard) and `setup --github-poll` waits for authorization (`setup --github` still chains both for back-compat). Step 0 has TWO branches: a **Claude Code Modal Flow** (the restored v3.0.0 `AskUserQuestion`-driven NUX — welcome, Auto/Manual/Skip, cookie consent, ScrapeCreators offer, `INCLUDE_SOURCES` opt-in, first-topic picker) for hosts with modals, and a **Non-Modal Prose Flow** for hosts without (OpenClaw, Codex, Cursor, Gemini CLI). Both ask before reading cookies, surface the macOS Full Disk Access fix on permission-denied, and offer the ScrapeCreators GitHub signup (10,000 free calls) on every first run. A successful `setup --github` persists `SCRAPECREATORS_API_KEY` automatically (via `setup_wizard.write_api_key`, 0o600) and masks the key in stdout. Do NOT collapse the modal flow back into a bare silent `setup` call or flatten it to prose-only — the guided modals are the feature (they eroded once and were restored). The onboarding contract is locked by `tests/test_onboarding_contract.py`. The Step 5 source opt-in is two tiers: **Recommended** (TikTok + Instagram, on with the key) and **Everything** (also Threads, Pinterest, and YouTube/TikTok/Instagram comments via `INCLUDE_SOURCES`). Threads, Pinterest, and YouTube comments are opt-in (gated on `INCLUDE_SOURCES`), not auto-on with the key — they appear only in the Step 5 Everything option, never in the welcome or the Step 4 offer.## Security hygiene- Never commit real API keys, browser cookies, auth tokens, app passwords, access tokens, or `.env` contents.diff --git a/skills/last30days/SKILL.md b/skills/last30days/SKILL.mdindex c501fb4c..d0f4dc66 100644--- a/skills/last30days/SKILL.md+++ b/skills/last30days/SKILL.md@@ -417,19 +417,21 @@ When both `LAST30DAYS_API_KEY` and `LAST30DAYS_API_BASE` are set, the engine run### Claude Code Modal Flow-**Follow these steps IN ORDER. Do NOT skip ahead to research. The sequence is: (1) welcome text → (2) setup modal → (3) run setup if chosen → (4) ScrapeCreators offer modal → (5) source opt-in modal → (6) first-topic picker. Start at step 1.**+**Follow these steps IN ORDER. Do NOT skip ahead to research. The sequence is: (1) welcome (built into the setup modal) → (2) setup modal → (3) run setup if chosen → (4) ScrapeCreators offer modal → (5) source opt-in modal → (6) first-topic picker. Start at step 1.**-**Step 1 - Welcome (REQUIRED FIRST — do not skip).** Run the engine's welcome command and show its output to the user VERBATIM as a normal chat message (not blockquoted) BEFORE calling any AskUserQuestion modal. Do NOT summarize, reformat, shorten, or rewrite it - reproduce it exactly. Skipping the welcome and jumping straight to the setup modal is a bug. Show it ONCE.+**Step 1 - Welcome.** The welcome pitch is delivered INSIDE the Step 2 setup modal, NOT as a separate message. Claude Code folds Bash/tool output behind "ctrl+o to expand", so a separate welcome message - or a `--welcome` command run - gets buried and the user never sees it. The AskUserQuestion modal is the only always-fully-visible surface, so the pitch lives in its question text. Do NOT run a separate `--welcome` command in this modal flow, and do NOT try to print the welcome as a chat message before the modal; go straight to Step 2. (The `--welcome` command still exists for the Non-Modal Prose Flow below, where there is no modal.)-Run: `"${LAST30DAYS_PYTHON:-python3}" skills/last30days/scripts/last30days.py --welcome` (relative to the skill root) and print its stdout verbatim. The welcome text is engine-owned (single source of truth) so it cannot drift or be accidentally skipped; your job is only to relay it.+**Step 2 - Welcome + setup choice (one modal).** Call AskUserQuestion with EXACTLY this question and these options. Reproduce the question verbatim, including the welcome pitch on the first lines:-**Step 2 - Setup choice.** After the welcome message from Step 1 has been shown, call AskUserQuestion with ONLY this question and these options (do not repeat the welcome text inside the modal):+Question:+"Welcome to /last30days! I research any topic across Reddit, X, YouTube, TikTok, Digg, arXiv, Techmeme, HN, Polymarket & more - pulling what people actually said in the last 30 days.++How would you like to set up?"-Question: "How would you like to set up?"Options:-- "Auto setup (~30 seconds) - scans browser cookies for X + installs yt-dlp (YouTube), Digg, arXiv, and Techmeme CLIs"-- "Manual setup - show me what to configure"-- "Skip for now - Reddit (with comments), HN, Polymarket, GitHub (if `gh` installed), Web"+- "Auto setup (~30s)" - description: "Scan browser cookies for X + install yt-dlp (YouTube), Digg, arXiv, Techmeme. Reddit/HN/Polymarket/GitHub/Web work out of the box. Add TikTok + Instagram after via ScrapeCreators (10k free calls)."+- "Manual setup" - description: "Show me each source and credential to configure by hand."+- "Skip for now" - description: "Just the free no-setup sources: Reddit (with comments), HN, Polymarket, GitHub, Web."**Step 3 - Run setup based on the choice.**@@ -438,13 +440,13 @@ Options:**If the user picks Auto setup:**Get cookie consent first. Check if `BROWSER_CONSENT=true` already exists in `~/.config/last30days/.env`; if so, skip the consent prompt and run `setup --allow-browser-cookies` directly. Otherwise **call AskUserQuestion:**-Question: "Auto setup will scan your browser for x.com cookies to authenticate X search - I check Chrome first (a one-time macOS Keychain prompt may appear; click Always Allow), then Firefox and Safari. Cookies are read live, not saved to disk. OK to proceed?"-Options:-- "Yes, scan my cookies for X" - run `"${LAST30DAYS_PYTHON:-python3}" skills/last30days/scripts/last30days.py setup --allow-browser-cookies` (relative to the skill root). Append `BROWSER_CONSENT=true` to `.env` after setup completes.-- "Skip X, just set up YouTube + Digg" - run `FROM_BROWSER=off "${LAST30DAYS_PYTHON:-python3}" skills/last30days/scripts/last30days.py setup`. Skips all cookie reads; still installs yt-dlp and Digg.-- "I have an xAI API key instead" - ask them to paste it, write `XAI_API_KEY` to `.env`, then run `FROM_BROWSER=off "${LAST30DAYS_PYTHON:-python3}" skills/last30days/scripts/last30days.py setup` (installs yt-dlp + Digg, no cookie read).+Question: "Auto setup installs the free CLIs either way - yt-dlp (YouTube), Digg, arXiv, and Techmeme. The only thing that needs your OK is reading your browser's x.com cookies to authenticate X/Twitter search: I check Chrome first (a one-time macOS Keychain prompt may appear; click Always Allow), then Firefox and Safari. Cookies are read live, never saved to disk. Include X?"+Options (give each option the description shown):+- "Yes - X cookies + all CLIs" - description: "Read x.com cookies for X/Twitter search AND install yt-dlp (YouTube), Digg, arXiv, and Techmeme." Run `"${LAST30DAYS_PYTHON:-python3}" skills/last30days/scripts/last30days.py setup --allow-browser-cookies` (relative to the skill root). Append `BROWSER_CONSENT=true` to `.env` after setup completes.+- "Skip X - just the CLIs" - description: "No cookie reads. Still installs yt-dlp (YouTube), Digg, arXiv, and Techmeme." Run `FROM_BROWSER=off "${LAST30DAYS_PYTHON:-python3}" skills/last30days/scripts/last30days.py setup`.+- "xAI API key for X instead" - description: "Use an api.x.ai key for X search (no cookie read), plus install yt-dlp (YouTube), Digg, arXiv, and Techmeme." Ask them to paste it, write `XAI_API_KEY` to `.env`, then run `FROM_BROWSER=off "${LAST30DAYS_PYTHON:-python3}" skills/last30days/scripts/last30days.py setup`.-The consented `setup --allow-browser-cookies` run extracts cookies (Chrome/Chromium family first via the Keychain with no Full Disk Access, then Firefox and Safari as fallbacks; the winning browser is pinned for future runs only when it is Firefox or Safari, so Chrome never re-triggers the Keychain prompt on later runs) and best-effort installs yt-dlp (YouTube) and the free, keyless Digg CLI (`digg-pp-cli` via `@mvanhorn/printing-press-library install digg --cli-only`; Digg activates only when the binary is on the **agent subprocess PATH**, typically `$HOME/.local/bin`; setup reports honestly if installed off-PATH; recommend-only if `npx` is unavailable). Show the user what was found and installed - including whether Digg landed on PATH (active) or off-PATH (installed but not yet active).+The consented `setup --allow-browser-cookies` run extracts cookies (Chrome/Chromium family first via the Keychain with no Full Disk Access, then Firefox and Safari as fallbacks; the winning browser is pinned for future runs only when it is Firefox or Safari, so Chrome never re-triggers the Keychain prompt on later runs) and best-effort installs yt-dlp (YouTube), the free keyless Digg CLI (`digg-pp-cli` via `@mvanhorn/printing-press-library install digg --cli-only`; Digg activates only when the binary is on the **agent subprocess PATH**, typically `$HOME/.local/bin`; setup reports honestly if installed off-PATH; recommend-only if `npx` is unavailable), plus the free keyless arXiv and Techmeme CLIs. Show the user what was found and installed - including whether Digg landed on PATH (active) or off-PATH (installed but not yet active).**macOS Full Disk Access remediation (Safari fallback only).** Chrome and Firefox need no Full Disk Access; only the Safari fallback does. After the `setup` run, inspect its stderr. If it contains `Permission denied reading Cookies.binarycookies` and the platform is macOS, the OS blocked the Safari read - surface the fix instead of swallowing it: `macOS blocked the Safari cookie read. If your x.com login is in Chrome, you don't need this. To use Safari: System Settings > Privacy & Security > Full Disk Access > enable your terminal (or the Claude app), then I can retry.` Offer ONE retry of the `setup` command. If the user skips, continue.@@ -457,7 +459,7 @@ Before the modal, run `which gh` via Bash silently; store as gh_available.**Call AskUserQuestion:**Question: "Want to add TikTok and Instagram? Your key also keeps Reddit and YouTube working when they hit rate limits. (We don't get a cut.)"Options:-- "ScrapeCreators via GitHub (recommended - most free calls)" - description: "Opens GitHub, you paste a short code (~20-30s). Grants the full 10,000 free calls - more than the web signup." (Recommend this over the web option because the GitHub path grants more free calls.) This is a **two-command flow** - `--github-start` returns the code fast (foreground), then `--github-poll` waits for you to authorize. The code comes back in the command output, so it can't be missed:+- "ScrapeCreators via GitHub (recommended - most free calls)" - description: "Opens GitHub - we copy your code to your clipboard automatically, so you just paste it (Cmd+V), ~20-30s. Grants the full 10,000 free calls - more than the web signup." (Recommend this over the web option because the GitHub path grants more free calls.) This is a **two-command flow** - `--github-start` returns the code fast (foreground), then `--github-poll` waits for you to authorize. The code comes back in the command output, so it can't be missed:1. **Run `--github-start` in the FOREGROUND** (it returns in ~1-2s, it does NOT block-poll): `"${LAST30DAYS_PYTHON:-python3}" skills/last30days/scripts/last30days.py setup --github-start`. It submits the device flow, copies the code to the clipboard, opens the browser, and returns a JSON blob plus a plain `Your GitHub code: XXXX-XXXX` line on stdout.- If the returned `status == "already_registered"` (a key was already saved): tell the user "You're already set up - your existing ScrapeCreators key is active" and STOP (do not run poll).- If `status == "error"`: show the message and offer the web option below.@@ -508,8 +510,8 @@ For hosts without interactive modal prompts (OpenClaw, Codex, Cursor, Gemini CLI**2. Permission preflight.** Run `"${LAST30DAYS_PYTHON:-python3}" "${SKILL_DIR}/scripts/last30days.py" --preflight` using the directory of the `SKILL.md` you loaded, then summarize the human-readable result before setup: config source, project config trust/ignore state, planned browser-cookie mode, planned writes, optional commands, and active/ignored endpoint overrides. This is safe: it does not read browser-cookie values, does not write setup/config/report files, and does not run research. For Codex desktop and other folder-mode hosts, if hidden `.claude/last30days.env` project config is shown as ignored, tell the user it remains ignored unless `LAST30DAYS_TRUST_PROJECT_CONFIG=1` is set from the process environment or global config. Do not block normal research on missing optional commands; describe them as optional coverage.**3. Cookie consent (ask BEFORE reading anything).** First check if `BROWSER_CONSENT=true` already exists in `~/.config/last30days/.env` (e.g. granted in a prior Claude Code session); if so, skip this prompt and run `setup --allow-browser-cookies` directly. Otherwise ask. Example: `I can read your browser cookies to unlock X/Twitter and other logged-in sources - I check Chrome first (a one-time macOS Keychain prompt may appear; click Always Allow), then Firefox and Safari. Want me to? (yes / no)` **Wait for the answer.**- - On **yes** → run `"${LAST30DAYS_PYTHON:-python3}" skills/last30days/scripts/last30days.py setup --allow-browser-cookies` (and append `BROWSER_CONSENT=true` to `.env` after it completes). Extracts cookies (Chrome/Chromium family first via the Keychain with no Full Disk Access, then Firefox and Safari; only a Firefox/Safari winner is pinned for later runs, so Chrome never re-prompts) and best-effort installs yt-dlp (YouTube) and the free, keyless Digg CLI (`digg-pp-cli` via `@mvanhorn/printing-press-library install digg --cli-only`; activates only when on the agent subprocess PATH, typically `$HOME/.local/bin`; reports honestly if off-PATH; recommend-only if `npx` is unavailable).- - On **no** → run `FROM_BROWSER=off "${LAST30DAYS_PYTHON:-python3}" skills/last30days/scripts/last30days.py setup`. Skips all cookie reads; still installs yt-dlp and Digg, still writes `SETUP_COMPLETE`.+ - On **yes** → run `"${LAST30DAYS_PYTHON:-python3}" skills/last30days/scripts/last30days.py setup --allow-browser-cookies` (and append `BROWSER_CONSENT=true` to `.env` after it completes). Extracts cookies (Chrome/Chromium family first via the Keychain with no Full Disk Access, then Firefox and Safari; only a Firefox/Safari winner is pinned for later runs, so Chrome never re-prompts) and best-effort installs yt-dlp (YouTube), the free keyless Digg CLI (`digg-pp-cli` via `@mvanhorn/printing-press-library install digg --cli-only`; activates only when on the agent subprocess PATH, typically `$HOME/.local/bin`; reports honestly if off-PATH; recommend-only if `npx` is unavailable), plus the free keyless arXiv and Techmeme CLIs.+ - On **no** → run `FROM_BROWSER=off "${LAST30DAYS_PYTHON:-python3}" skills/last30days/scripts/last30days.py setup`. Skips all cookie reads; still installs yt-dlp (YouTube), Digg, arXiv, and Techmeme, still writes `SETUP_COMPLETE`.**4. Full Disk Access remediation (macOS only).** After `setup`, inspect stderr. If it contains `Permission denied reading Cookies.binarycookies` on macOS, surface: `macOS blocked the cookie read. To enable X/Twitter: System Settings > Privacy & Security > Full Disk Access > enable your terminal (or the Claude app), then I can retry.` Offer ONE retry. If skipped, continue.diff --git a/skills/last30days/scripts/lib/setup_wizard.py b/skills/last30days/scripts/lib/setup_wizard.pyindex 50c0671d..9d7b7fe4 100644--- a/skills/last30days/scripts/lib/setup_wizard.py+++ b/skills/last30days/scripts/lib/setup_wizard.py@@ -29,9 +29,9 @@ def is_first_run(config: Dict[str, Any]) -> bool:return not config.get("SETUP_COMPLETE")-_WELCOME_TEXT = """Welcome to /last30days!+_WELCOME_TEXT = """Welcome to /last30days! I research any topic across Reddit, X, YouTube, TikTok, Digg, arXiv, Techmeme, HN, Polymarket & more - what people actually said in the last 30 days. Let's get you set up (~30s).-I research any topic across Reddit, X, YouTube, and more - synthesizing what people are actually saying right now.+I synthesize what people are actually saying right now across social, news, and market sources.Auto setup gives you the core sources free in about 30 seconds:- X/Twitter - reads your browser cookies to authenticate (read live each run, never saved to disk). I check Chrome first (fastest - a one-time macOS Keychain prompt may appear; click Always Allow), then Firefox and Safari.diff --git a/tests/test_onboarding_contract.py b/tests/test_onboarding_contract.pyindex 8ebc208b..6177a848 100644--- a/tests/test_onboarding_contract.py+++ b/tests/test_onboarding_contract.py@@ -55,9 +55,9 @@ class TestOnboardingContract(unittest.TestCase):def test_modal_flow_stage_order(self):"""Welcome -> setup modal -> cookie consent -> SC offer -> opt-in -> picker."""anchors = [- "Step 1 - Welcome (REQUIRED FIRST",+ "Welcome to /last30days!", # welcome pitch, embedded in the setup modal"How would you like to set up?",- "scan your browser", # cookie-consent modal+ "your browser's x.com cookies", # cookie-consent modal"Want to add TikTok and Instagram?", # SC offer"Which ScrapeCreators sources do you want on?", # source opt-in"What do you want to research first?", # topic picker@@ -70,8 +70,24 @@ class TestOnboardingContract(unittest.TestCase):def test_modal_uses_askuserquestion(self):self.assertIn("AskUserQuestion", self.modal)+ def test_cookie_consent_names_all_installed_clis(self):+ """The cookie-consent modal must not frame X cookies as instead-of the CLIs,+ and must name arXiv + Techmeme (not just 'YouTube + Digg') since auto-setup+ installs all four regardless of the cookie choice."""+ consent = self.modal[self.modal.find("your browser's x.com cookies"):]+ consent = consent[: consent.find("Full Disk Access")] # bound to the consent modal+ for cli in ("yt-dlp", "Digg", "arXiv", "Techmeme"):+ self.assertIn(cli, consent, cli)+ # The "skip X" option still installs the CLIs (not framed as X-or-CLIs).+ self.assertIn("Skip X - just the CLIs", consent)++ def test_github_option_advertises_auto_clipboard(self):+ """The recommended GitHub option tells the user the code is auto-copied to+ their clipboard, so they just paste it."""+ self.assertIn("clipboard automatically", self.modal)+def test_modal_cookie_consent_before_setup(self):- consent = self.modal.find("scan your browser")+ consent = self.modal.find("your browser's x.com cookies")setup = self.modal.find("last30days.py setup")self.assertGreater(consent, -1, "no cookie-consent modal in modal flow")self.assertGreater(setup, -1, "no setup invocation in modal flow")@@ -129,7 +145,7 @@ class TestOnboardingContract(unittest.TestCase):self.assertIn("Digg", self.prose)self.assertIn("Digg", self.manual)# The Auto-setup modal option names every installed CLI, not just two.- self.assertIn("yt-dlp (YouTube), Digg, arXiv, and Techmeme CLIs", self.modal)+ self.assertIn("yt-dlp (YouTube), Digg, arXiv, Techmeme", self.modal)# --- Credit count = 10,000, no conflicting numbers in onboarding ---@@ -181,11 +197,17 @@ class TestOnboardingContract(unittest.TestCase):"""Full Disk Access is framed as Safari-only, not the default path."""self.assertNotIn("scan your browser (Firefox/Safari)", self.modal)- def test_welcome_relayed_from_engine(self):- """The modal relays the engine-owned welcome verbatim (single source of- truth) rather than inlining it, so it can't be skipped or drift."""- self.assertIn("last30days.py --welcome", self.modal)- self.assertIn("VERBATIM", self.modal)+ def test_welcome_embedded_in_modal(self):+ """The welcome pitch lives INSIDE the setup modal (the only always-visible+ surface), not as a separate message/command that Claude Code folds away.+ The engine --welcome command is kept for the non-modal prose flow."""+ # Pitch is in the modal question.+ self.assertIn("Welcome to /last30days!", self.modal)+ self.assertIn("How would you like to set up?", self.modal)+ # The modal flow explicitly does NOT run a separate --welcome command.+ self.assertIn("Do NOT run a separate `--welcome`", self.modal)+ # The non-modal flow still uses the engine welcome command.+ self.assertIn("last30days.py --welcome", self.prose)def test_stocktwits_surfaced_as_conditional(self):"""StockTwits is advertised in the engine welcome as a ticker/crypto-gated@@ -213,14 +235,13 @@ class TestOnboardingContract(unittest.TestCase):# --- Welcome must render before the modal (U1) ---- def test_welcome_is_required_before_modal(self):- """Step 1 mandates the welcome message before any modal; the old-- 'IMMEDIATELY call AskUserQuestion' wording (which induced skipping the- welcome) is gone.- """- self.assertIn("REQUIRED FIRST", self.modal)- self.assertIn("BEFORE calling any AskUserQuestion", self.modal)+ def test_welcome_pitch_is_in_the_modal_question(self):+ """The welcome pitch names the core sources inside the modal question, so+ the user sees it without expanding folded tool output. The old skip-prone+ 'IMMEDIATELY call AskUserQuestion' wording stays gone."""+ # Pitch names the core sources right in the modal.+ for source in ("Reddit", "X,", "YouTube", "TikTok"):+ self.assertIn(source, self.modal, source)self.assertNotIn("Then IMMEDIATELY call AskUserQuestion", self.modal)# --- Device code surfaced with a clipboard-paste hint (U3) ---