Skip to content

Native iOS app: Flowchart - #133

Merged
Programcode merged 6 commits into
feat/native-iosfrom
native-ios/04c-flowchart
Oct 14, 2026
Merged

Programcode merged 6 commits into
feat/native-iosfrom
native-ios/04c-flowchart

Conversation

@Programcode

Copy link
Copy Markdown
Owner

The Flowchart in the app, built as Adam chose: option A, the website's argument map in mock 08's phone look. Stacked on #131. GitHub retargets this PR to feat/native-ios when #131 merges.

The same data as the website. The app reads and writes the website's React Flow { nodes, edges } JSON in flowcharts: thesis, argument, attack, rebuttal and dropped cards, plus support, attack and rebuttal links. A map made on the phone opens on the website, and the other way round.

  • packages/core/src/flowchart.ts holds the shared reader and editor. Each edit copies only what it changes, so fields the app doesn't know survive.
  • A new link is the same edge the website's onConnect + addEdge would make. Duplicate links and self-links are refused.
  • src/test/flowchart/flowchart-document.test.ts checks that a map shaped like the website's survives add, link, edit and delete unchanged.

The screen:

  • It opens the Current Debate's newest map, or the website's starter map, translated.
  • Flow shows columns by role: your case, their attacks, your rebuttals. They snap sideways on iPhone and all fit on iPad.
  • Map is an indented tree: supports, attacked by, rebutted by. Unanswered attacks are flagged.
  • Tapping a card opens the claim sheet: Link claim, Edit, Change type, Delete, plus a Links list with remove. "+" adds a card.
  • The "…" menu has Save, Save as, Saved Flowcharts (a switcher), Export (PDF of the map tree, or copy the outline) and Delete map.
  • Edits stay in memory per account, debate and map until saved.
  • In one-off mode a map saves with no debate, as on the website.
  • Saved flowcharts in Prepare's list open by id.

Different from the website:

  • Save on an opened map updates that row; Save as inserts a new one, which is what the website's Save does.
  • New cards go on the website's auto-layout row for their type, not at random.
  • There's no PNG export: a canvas picture doesn't suit a phone, so the PDF shows the map tree instead.
  • The website's starter map stays in FlowchartPage.tsx. Core mirrors it, and the test covers its shape.

Checks, run locally on Node 22, because GitHub Actions starts no jobs on this account (billing):

  • npm run verify exits 0: 294 Vitest, 333 Deno, 30 Chromium smoke.
  • 400 screenshots signed in to staging, with 10 Flowchart screens per combination of iPhone or iPad, light or dark, English or Hungarian.

Live on the staging seed Pro account, with 4c-test- titles. Through the app:

  1. Created a map and saved it in the website's shape, with every node and edge readable by the website.
  2. Reloaded it, edited it and re-saved it over the same row; every other node and edge stayed byte-equal.
  3. Deleted it. Rows: 0 before, 0 after.

Not proven: native form sheets, toolbar symbols, snap scrolling, a real PDF and share sheet on a phone. Adam checks these at the milestone.

🤖 Generated with Claude Code

Programcode and others added 3 commits October 9, 2026 15:47
The app shows the website's Flowchart without React Flow, so the map's
node and edge JSON gets a plain helper in packages/core: the website's
starter map, edge kinds read from the label or stroke the website writes,
cards grouped by role and as a tree, and add, edit, link and delete that
copy every node and edge they touch, so fields React Flow added survive.

The test edits a website-shaped map and checks that everything the app did
not edit comes back unchanged, and that a link is the same edge the
website's onConnect makes through React Flow's addEdge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Prepare's Flowchart now opens the website's argument map in mock A's
phone look instead of the "on its way" screen. It opens the Current
Debate's newest saved map, or the website's starter map, and shows it as
role columns (your case, their attacks, your rebuttals) or as a tree from
the thesis. A card opens a sheet to link it, edit it, change its type or
delete it; "+" adds a card; "..." saves, saves as, switches maps, exports
and deletes.

Maps are the same flowcharts rows the website saves, with the same React
Flow JSON, so a map made on the phone opens on the website. Save over an
opened map updates its row, which the website never does; Save as is the
website's Save. Edits stay in session memory per account and debate
until saved, as the website does not warn before replacing its canvas.
One-off maps are saved with no debate, as on the website. Export is a PDF
of the tree with the website's file name, or the tree copied as text.

The form sheet, one-off notice and keepIfSame come unchanged from #129.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The screenshot script now shoots Flow, Map, a card's sheet and its link
picker, adding a card, the saved maps, the "..." menu, Export and one-off
mode, from two made-up saved maps in the website's React Flow shape. It
answers flowcharts reads with them (none for one-off work, which shows
the starter map) and answers writes locally, so nothing is saved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@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 14, 2026 11:48am UTC
debatelab-staging Ready Ready Preview Oct 14, 2026 11:48am UTC

Copilot AI balanced review requested due to automatic review settings October 9, 2026 16:16

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: 614a4477-6172-495b-a3dc-066283ae9ef7

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

Approved mock A against the app (Flow, Map, claim sheet), and two app screens:

Mock A vs app

Map, iPhone dark hu

Claim sheet, iPhone light en

Programcode and others added 2 commits October 9, 2026 17:08
- Each held map gets a session handle that survives a save moving it to a
  new key, and the Add Card and claim sheets find their map by it, so an
  open form keeps the map and its unsaved text.
- Saved Flowcharts lets only the latest tap open a map, and its rows wait
  while one loads.
- Save as follows the new row only while the map it started from is still
  the one on screen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
@Programcode
Programcode changed the base branch from native-ios/04b-brainstorm-factoids to feat/native-ios October 9, 2026 17:11
A save finishing after the student started a new map wrote the new row
onto the fresh starter map, because both used the unsaved map's key.
Save, Add Card and the claim sheet's edits now find their map by handle
when they run, so they change only the map they started from.

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

Copy link
Copy Markdown
Owner Author

Head 68d1e6d (Codex r1 fixes d05fda7 + 68d1e6d, merge of Brainstorm/Factoids 1590c70). GitHub Actions jobs fail in 2 s with no logs: the account is out of Actions minutes, so CI did not run. Local results at this head: npm run verify green (297 vitest, 30 desktop smoke), mobile typecheck, eslint apps/mobile and knip pass; screenshot harness iphone-light-en on staging produced 55 shots including all 11 Flowchart states, PDF HTML and copy-as-text. A local pass is not a CI pass. Codex r2 is running.

@Programcode

Copy link
Copy Markdown
Owner Author

Codex review r2 at 68d1e6d (gpt-6.1-sol, high): no findings. Checked save/edit identity, overlapping selections, account and debate ownership, user_id filters, round-trip field preservation, sheet roots, locale parity. r1's three Medium race findings stay fixed. Merging into feat/native-ios.

@Programcode
Programcode merged commit cae063b into feat/native-ios Oct 14, 2026
8 of 18 checks passed
@Programcode
Programcode deleted the native-ios/04c-flowchart branch October 14, 2026 11:52

This branch was successfully deployed

2 active deployments
Preview – debate-navigator — 68d1e6d1 Deployed Oct 14, 2026 by vercel[bot]
Preview – debatelab-staging — 68d1e6d1 Deployed Oct 14, 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