Skip to content

Native iOS app: Brainstorm and Factoids - #131

Merged
Programcode merged 6 commits into
feat/native-iosfrom
native-ios/04b-brainstorm-factoids
Oct 9, 2026
Merged

Programcode merged 6 commits into
feat/native-iosfrom
native-ios/04b-brainstorm-factoids

Conversation

@Programcode

Copy link
Copy Markdown
Owner

Brainstorm and Factoids in the app, built from PR #130's document components and helpers. Targets feat/native-ios.

Brainstorm

  • The form has the website's fields and defaults: motion, side (default both), output (default Top 5) and existing ideas.
  • It goes through the website's motion gate and keeps the last form per account.
  • Results save to brainstorms with the motion as the title and the chosen side.
  • The document shows a framing card, then the Top 5 / map / buckets as numbered collapsible ideas, then next steps, warnings and researched sources. When the model needs more information, it shows only the questions, as the website does.
  • Discuss and Export are pinned. Undo auto-saved and Delete are in the "…" menu.

Factoids

  • The form has the website's fields. Like the website, it has no motion gate.
  • Results save as neutral with the claim as the title.
  • The document shows the verification bar and important notes. Each verified factoid shows its key figure, context, limitations, source chip and how to use it.
  • A source chip opens the debate's Library copy if there is one. Otherwise it opens the URL, which is re-checked as a safe web URL, in the in-app browser.
  • "Save to Library" saves into the Current Debate's Factoids folder, as the website's bookmark does.
  • Search suggestions reopen the form with that query.

Shared with #130

  • Results use Native iOS app: Prepare tab, Generate, case document, Attack and Export #130's request helper, notices and session memory. Source rankings and autosave stop when the request is cancelled.
  • The PDFs use the website's file names (BrainstormResults.pdf, ResearchFactoids.pdf) and its sections, with model text escaped.
  • "Copy as text" follows the website's Word export, because neither tool has a clipboard button on the website.
  • The Brainstorm transform and factoid selection moved to @debatelab/core. The website imports them back and behaves as before.

Different from the brief, on purpose

  • Factoids don't appear on the Debate tab. They save as neutral and the website's side rule hides neutral work, so they open from the Prepare list.
  • A brainstorm offers only Discuss as the next step, as on the website.

Checks. These ran locally on Node 22, because GitHub Actions starts no jobs on this account (billing).

  • npm run verify exits 0: 289 Vitest tests, 333 Deno tests and 30 Chromium smoke tests.
  • Each commit typechecks on its own.
  • 320 screenshots, signed in to staging, cover iPhone and iPad, light and dark, English and Hungarian.

Live on the staging seed Pro account. One Brainstorm took 47.5 s and one Factoids 45.5 s. Both saved, opened, exported to PDF HTML and copied text. The factoid bookmark was saved. Both results were deleted through the app's menu, along with the 11 sources the run created. The counts afterwards match the counts before.

Not proven. The live run ran on the commit just before #130's last fix, which only added the cancel signal; that last step is covered by the typecheck. A real PDF file, the native menus and the in-app browser on a phone are for Adam's milestone test.

🤖 Generated with Claude Code

Programcode and others added 3 commits October 9, 2026 14:21
The app sends Brainstorm and Factoids the way the website does, so the pure
parts of brainstorm and factoids in src/lib/ai/client.ts now live in
packages/core: the brainstorm response transform, the factoids request
defaults and the verified-factoid selection. The website imports them back
and behaves as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both tools work as on the website: a native form with its fields and
defaults, the website's progress messages while the request runs, and the
result as a document in 4a's style with Discuss and Export pinned and Undo
auto-saved sources and Delete in the "..." menu.

Brainstorm goes through the motion gate and saves to brainstorms with the
chosen side. Factoids follows the Current Debate, as the website's page
does, and saves with side neutral. Each factoid can be kept in the
debate's Factoids folder, and a search suggestion reopens the form with
that query. The PDFs use the website's file names and sections, and
"Copy as text" follows its Word export. Both tabs and saved rows open the
real screens now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The screenshot script now shoots both tools' forms, their progress, the
documents open and collapsed, and the Export menu, from a fixed brainstorm
and fixed factoids inside the page. It renders each PDF's HTML and writes
the copied text next to the screenshots. Nothing calls a model or saves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 9, 2026 14:34
@vercel

vercel Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
debate-navigator Ready Ready Preview Oct 9, 2026 5:05pm UTC
debatelab-staging Ready Ready Preview Oct 9, 2026 5:05pm UTC

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository YAML (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Free
  • Run ID: 8e5d6366-28a5-4bb6-89c0-5de6a22ce765

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Essentials by visiting https://app.coderabbit.ai/settings/billing.


Comment @coderabbitai help to get the list of available commands.

@Programcode

Copy link
Copy Markdown
Owner Author

Web export, signed in to staging, with fixed fake outputs:

Brainstorm, iPhone light en

Factoids, iPhone dark hu

Programcode and others added 3 commits October 9, 2026 16:28
Brings in #129. Conflicts kept both sides: the Debate tab and Prepare import
the shared OneOffNotice next to prepareToolHref, the screenshot script shoots
Brainstorm and Factoids and then the one-off tools, and the app guide keeps the
Brainstorm and Factoids paragraph beside #129's one-off text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both forms show it through WorkingIn since #129. The screenshot script now
opens each from Prepare in one-off mode and waits for the notice, and the app
guide names them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A brainstorm whose nextSteps held an object passed the transform, was saved,
and then crashed its document and the export. The shared transform now keeps
only text in its string lists, and the app reads every brainstorm, fresh or
saved, through the transform and BrainstormOutputSchema. Saved factoids rows
go through FactoidsOutputSchema too, so a broken old row shows the incomplete
notice instead of crashing.

Each factoid's save button now tells VoiceOver which claim it saves, with the
website's factoidsResults.saveClaimToLibrary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Programcode

Copy link
Copy Markdown
Owner Author

Codex review (gpt-6.1-sol)

  • r1 at 6ae55d0:
    • Medium. Malformed Brainstorm list entries were saved, then crashed the document and the export. Fixed in a5705dc: the shared transform now keeps only text in its string lists. Every brainstorm, fresh or saved, goes through the transform and BrainstormOutputSchema, and saved factoids go through FactoidsOutputSchema. A test uses the exact malformed payload.
    • Low. Every factoid bookmark had the same VoiceOver label. Fixed in a5705dc: the label is factoidsResults.saveClaimToLibrary, which includes the claim.
  • Between r1 and r2, ce9e7ab merged feat/native-ios after Native iOS app: fixes from the first phone test #129, and ab989cc checks the one-off notice on both forms.
  • r2 at a5705dc: no findings. Probes covered malformed lists, saved Factoids validation, six Brainstorm variants against the earlier website transform, request filtering and export escaping.

Local checks at a5705dc. GitHub Actions starts no jobs because of billing, so these ran locally: npm run verify exit 0 (291 Vitest, 333 Deno, 30 Chromium smoke tests); the mobile typecheck and eslint are clean.

Merging into feat/native-ios. The branch stays until #133, which is stacked on it, is retargeted.

🤖 Generated with Claude Code

@Programcode
Programcode merged commit 03f0e54 into feat/native-ios Oct 9, 2026
8 of 18 checks passed
@Programcode
Programcode deleted the native-ios/04b-brainstorm-factoids branch October 14, 2026 11:46
Programcode added a commit that referenced this pull request Oct 14, 2026
Brings in feat/native-ios after #129 and #131's fixes. sheet.tsx,
keep-if-same.ts and one-off-notice.tsx were the same on both sides, so
the Flowchart now uses the shared files. Conflicts: apps/mobile/AGENTS.md
keeps the Flowchart entry and the base's one-off wording, with the
Flowchart added to where OneOffNotice shows; the screenshot script runs
both the Flowchart and the one-off tool shots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

2 active deployments
Preview – debatelab-staging — a5705dcb Deployed Oct 9, 2026 by vercel[bot]
Preview – debate-navigator — a5705dcb Deployed Oct 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants