Repository navigation
iOS parity round 2: Library and debates as evidence tools - #257
Conversation
… app The website's file reader moves to packages/core with pdf.js and mammoth passed in, so the iOS app can run the same code in a DOM component. Its errors and warnings now carry codes the app can translate; the website still shows the same English text. LibraryPage's folder list, search and sort orders move to core/library.ts unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
haptics.ts gives every screen the same feel: a light tap for switches and chips, a selection tick for segmented controls and pickers, success when a tool's result arrives, a warning when a tool's request fails, and a tap when the turn comes back in Crossfire (Sparring already had one). The web preview records them for the screenshot script. toast.tsx shows the website's short messages above the tab bar, with an optional action such as Undo, the mint check on success and a VoiceOver announcement. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… and editing - Import a file (PDF, DOCX, TXT, Markdown, CSV, JSON): the Files picker hands the bytes to the website's reader, which runs with pdf.js and mammoth in an Expo DOM component, with its 8 MB and 120,000-character limits, its notices and its error messages in all three languages. - Folders: chips to filter by folder, New folder, and for the chosen folder a switch for every source in it, Rename (or merge, after asking) and Delete, which moves its sources to General, as on the website. - The Active switch on every row, by swiping right and in the menu, with the website's grounding banner and its rollback when a change fails. - The website's eight sort orders and its search, from packages/core. - The source view shows quality and use, the switch and folder, Copy, Share and Delete, and Edit saves only the fields changed. - Delete acts at once with Undo, which puts the source back in its place; Clear all asks first. Paste a link and Write a note pick a folder too. - Press and hold a source for a preview and Open, Turn on or off, Move to folder, Copy, Share and Delete. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rows on the Debate tab, Prepare, Practice and History open a preview of the document on a long press, with Discuss and Share for cases, attacks, brainstorms and factoids, and Delete for cases and Sparring rounds after the website's History confirmation. History's chat rows preview the chat. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…5-day check - Start new debate and Edit settings share the website's DebateForm: motion, format, your role and instructions, with its limits. The app adds the judge, which the website's prompts already read as "Judge expectations" but its form never shows. Settings the form does not show are kept. - The Debate tab shows the format, role, judge and instructions under the motion, as the website's card does, with Edit settings. - Swipe left on any debate but the current one in the switcher to delete it, after the website's warning that its sources and saved work go too. - After five days without work on the Current Debate, the website's "Still preparing this debate?" asks to Continue, Switch or Start new; closing it counts as Continue. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…DF page cap Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d fix what they showed - The harness answers the Library from made-up sources and folders and writes nothing, imports the PDF, DOCX and PNG in scripts/fixtures through the real reader, and shoots Edit settings, the long new-debate form and the five-day check. Debates read as active, so the check stays out of the other shots. A missing browser no longer leaves its server up. - Rows inside a Link keep their layout: the Link's slot drops a style function, so the pressed dim moves to an inner view. - The web header takes its choices from library-options.ts; importing them from library-header resolved to itself on the web. - A chosen folder hides each row's folder badge; the import error is centred; the debate settings card gives its text the full width. - The guide describes file import, folders, toasts, haptics and debates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ith nothing under it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rows next to an open source show only the folder and its use (the pane shows the rankings), and source meta lines and badges wrap instead of being cut off. The harness scrolls a sheet with whatever scrolls it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The Library reset its folder chip to All folders when the folder list had not reloaded yet, so New folder and Rename lost the selection. The check now runs only when the folder list itself reloads; the harness creates a folder through the prompt and checks it stays chosen. - ToastProvider holds the toast and ToastHost draws it, so the root layout gains two lines instead of reindenting its whole Stack. - A switch taps once: the haptic sits in the controls that lack one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
A row whose work opens the Practice tab has no Link, so it navigates itself; linked rows still navigate only through their Link. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- When the picker gives no size, the file's own size is checked against the 8 MB limit before any of it is read into JavaScript. - The reader pulls 768 KB slices one at a time into one buffer, read natively as base64, so at most one slice is in flight. - A read always ends: a two-minute timeout covers a webview that never loads (the website's "Could not read this file."), a new file cancels the read before it, and closing the sheet stops the reader. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ow's link - A failed write rolls a source back only if no newer tap replaced it, and then to the last value the server accepted. - Other screens reload once the switch queue is idle. - A mixed folder's switch shows on, so one tap turns it all off; the folder menu has the website's Activate and Deactivate, for General too. - The switch sits beside the row's link, so tapping it never opens the source; the harness checks that. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…acy folder names DebateForm saved only format and role, which erased settings.judge set in the iOS app; it now keeps the settings it does not show. The Library filters by the trimmed folder name its chips show. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…/parity-r2-library # Conflicts: # apps/mobile/AGENTS.md # apps/mobile/package.json # apps/mobile/scripts/screenshots.ts # apps/mobile/src/components/chip.tsx # apps/mobile/src/components/icon-paths.ts # package-lock.json
Round 2 of the DebateOwl iOS and iPadOS parity plan. The Library and debates now do what the website does, with native menus, swipes and haptics on top. It runs in Expo Go and needs no backend change. There are no migrations, no Edge Function deploys and no config or secret changes.
What each item does
1. Library file import (PDF, DOCX, TXT, MD, CSV, JSON): done.
packages/core/src/source-file-import.ts. The website and the app run the same code, with the same 8 MB and 120,000-character limits, the 80-page PDF cap and the same messages.expo-document-pickerand checks size and type before reading anything, using the file's own size when the picker gives none. An Expo DOM component (components/source-file-reader.tsx) runs pdf.js and mammoth and pulls the file in 768 KB slices, one at a time, into one buffer.@expo/dom-webview, Expo's default for DOM components, which Expo Go includes.react-native-webviewturned out not to be needed.import-sourceis unchanged.2. Folders and sorting: done.
packages/core/src/library.ts, andLibraryPageuses them. One website fix came with it: the Library now filters by the trimmed folder name its chips show, so a legacy folder saved with spaces matches its chip.3. The Active switch and the grounding banner: done.
4. Edit, Copy, quality, Undo, Clear all: done.
5. Debates: done.
settings.judgeand its prompts read it as "Judge expectations", but its form has no field. Both forms now keep settings they don't show: the website's DebateForm used to drop the judge on save, and a new test (src/test/debate/debate-form.test.tsx) covers it.6. Context menus and haptics: partial.
Link.PreviewandLink.Menu) works on:lib/haptics.ts:keepOpenResult);ToolError);Shared-file edits that might overlap with round 1 are a few lines each, in
tool-form.tsx,open-results.ts,crossfire.tsx,chip.tsx,segmented-control.tsx,form-rows.tsx,_layout.tsx.Verification
npm run verifypassed locally ate6591ca5, after mergingfeat/native-ioswith round 1 (iOS parity round 1: prepare tools match the web #254). This is a local pass, not CI; GitHub Actions is billing-blocked. It ran docs:check with knip, lint, typecheck, 807 unit tests, 30 collaboration tests, 543 edge tests, the build, the service worker test and 47 Playwright smoke tests.npm run -w @debatelab/mobile typecheckpasses.packages/core/src/source-file-import.test.ts, covers the limits, surrogate-safe truncation, the JSON fallback, the PDF page cap and naming the reader that failed.e6591ca5,npx expo export --platform iosbuilds, including the 3 MB DOM bundle, andnpx expo config --jsonis byte-identical to before, so the Expo Go config is unchanged.e6591ca5: 455 are in~/.t3/scratch/ios-parity/r2-shots/, for iPhone, iPad Air and iPad Air landscape, light and dark, English and Hungarian, plus Spanish on iPhone. They cover the Debate tab, switcher, new and edit debate, the five-day check, Library, More menu, folder bar, add link, note and file (PDF, DOCX, error), source view and edit, toasts, Prepare, Practice and History. The run had no page errors and no clipped text. I looked at every screen in every combination and fixed what they showed. Linked rows lost their layout on the web, Hungarian text was cut beside an open source on iPad, and the long-form shots didn't reach the end of the sheet. A New folder step proves a new folder stays chosen.Not verified:
Merge with round 1
feat/native-ios(with #254) is merged in normally ate6591ca5, with no rebase. The locale files merged cleanly. The conflicts kept both rounds:apps/mobile/package.json: both new dependencies,@expo/dom-webviewand@formatjs/intl-listformat.package-lock.json: round 1's lockfile, thennpm installadded round 2's packages.components/icon-paths.ts: both icon sets (no name clashes).components/chip.tsx: round 1's accessibility label and radio state, with round 2's haptics (radio chips tick like a picker).apps/mobile/AGENTS.md: round 2's Library, file import, toast and haptics, debate and row-menu bullets, plus round 1's newer Ask and Generate bullets. The routes line lists both rounds' sheets.scripts/screenshots.ts: only the header's screen list conflicted; it lists both rounds' groups.Notes for review
knipignores@expo/dom-webview, which Expo loads by name.🤖 Generated with Claude Code