Skip to content

Device lab: File it on GitHub copies the report first, so it reaches the form - #131

Merged
juancguerrerodev merged 2 commits into
mainfrom
dbejarano820/130-file-report-clipboard
Nov 27, 2026
Merged

juancguerrerodev merged 2 commits into
mainfrom
dbejarano820/130-file-report-clipboard

Conversation

@dbejarano820

Copy link
Copy Markdown
Contributor

What and why

Closes #130

On an iPhone with the GitHub app, File it on GitHub opened the app, which drops the link's query, so the report never reached the form. Now File it on GitHub always copies the exact report first, with the same plain local copy that Copy uses, and then the system opens the link with its default handler: the GitHub app when installed, otherwise the browser. This works the same way on Android and iOS. The screen says the report is copied, to paste it into the Report field if the form opens empty, and to pick Device report if the GitHub app shows a list of forms. A report too long for a link is handled the same way and gets the same hint.

  • fileReport() in apps/mobile/src/device-lab-view.ts decides what happens. It copies reportText(), then opens issueLink(). If the copy fails, a filled-in form still opens, but an empty one doesn't, because there would be nothing to paste. It returns the notice to show. The screen only wires it to copyReport (HermitVault.copyPlain) and openReportForm (Linking.openURL).
  • Copy, in both locales: a new HM-SET-10.fileCopied, and updates to longCopied (the Device report hint), shareBody (it now says the report is copied and opens in the GitHub app or the browser) and openFailed (it said "the browser", and now it can be the app too).

Vision fit

The Device lab's reports leave the phone only when the person files them. This makes sure that the filing they chose actually works, whichever app opens the link, without adding a server or a dependency.

Non-negotiables

  • This keeps every non-negotiable in AGENTS.md as it is.
  • Or it changes one, and this is the accepted RFC: #

Checklist

  • It closes one issue, linked above, or it's a small fix (a typo, a broken link, a wrong comment). A feature has an accepted proposal.
  • I wrote the failing test first. It fails without this change and passes with it.
  • These pass: pnpm check:privacy, pnpm typecheck, pnpm lint, pnpm test and node scripts/guard/check.mjs --patterns scripts/guard/patterns.txt.
  • No new network call, telemetry, analytics, ads or crash reporting. (A new request in an app adapter is explained below, with its host, skill and risk.)
  • No new dependency, or the reason for each one is below.
  • Every UI string is in packages/copy, in es-419 and en, with matching keys and placeholders, and no em or en dashes.
  • Tests, fixtures and screenshots use made-up data only.

Test first: the new tests in apps/mobile/src/device-lab-view.test.ts failed before the change because device-lab-view.ts had no fileReport export (SyntaxError: The requested module './device-lab-view.ts' does not provide an export named 'fileReport'). After the change, that file passes 14 of 14, and apps/mobile passes 299 of 299. The tests check, for an Android and an iPhone report: the copy comes before the open, the copied text is exactly reportText() and the opened URL is exactly issueLink().url; the too-long path copies and opens the empty form; a failed copy still opens a filled-in form but not an empty one; a failed open says so; and both locales have the new words, naming Report and Device report, with no dashes.

Model path

  • This doesn't touch the model path: packages/model, agent, skills or eval, the prompt, the router, tool descriptions, normalizers, examples or the model file.
  • It does. The eval numbers from before and after are below, run as docs/evals.md says. No held-out case was tuned on.

Screenshots

  • No UI change.
  • UI change. Each changed screen is below, in both themes and both languages, with made-up data.

To come: the Device lab report screen after File it on GitHub (the new notice and the updated share text). None were taken yet.

Light Deep sea
es-419 to come to come
en to come to come

New dependencies and network calls

n/a. No new dependency. No new or changed request: the same github.com link opens through Linking.openURL as before, and the copy is the existing local-only HermitVault.copyPlain.

AI agents

  • No AI agent wrote any part of this.
  • An AI agent helped. Which one, and what it did: Claude Code (Claude Opus 5.5) wrote the test, the change and the copy, and ran the gates listed above.
  • I read and ran everything in this pull request, and I can explain it.

…#127)

On iOS, expo-file-system resumes only from the base64 resume data NSURLSession
produces on a pause, and .part does not exist until the file is complete, so
every stopped download started again from zero.

- download-resume.ts (pure, tested): which path each platform takes, the record
  kept next to .part, and when to fall back to a clean restart.
- The download screen pauses the running download on iOS when the app goes to
  the background or the connection drops; the pause saves the resume data in
  <name>.part.resume, and the next attempt resumes from it. A missing, stale or
  rejected record means one clean restart.
- partialModel and the model update read the saved bytes on iOS.
- Android keeps its byte offset path. The SHA-256 check is unchanged.

Signed-off-by: Daniel Bejarano <dbejarano820@gmail.com>
…the form (#130)

On an iPhone with the GitHub app, the github.com link opens in the app,
which drops the query, so the report never reached the form. File it on
GitHub now copies the exact report with the plain local copy every time,
then lets the system open the link with its default handler (the GitHub
app or the browser), on Android and iOS. The screen says the report is
copied, to paste it into the Report field if the form opens empty, and
to pick Device report if the app shows a list. The too-long path says
the same. The decision lives in fileReport() in device-lab-view.ts,
tested under node --test.

Signed-off-by: Daniel Bejarano <dbejarano820@gmail.com>
@juancguerrerodev
juancguerrerodev marked this pull request as ready for review November 27, 2026 19:45
@juancguerrerodev
juancguerrerodev self-requested a review as a code owner November 27, 2026 19:45
@juancguerrerodev
juancguerrerodev force-pushed the dbejarano820/130-file-report-clipboard branch from aea778e to c942881 Compare November 27, 2026 19:45
@juancguerrerodev
juancguerrerodev merged commit c942881 into main Nov 27, 2026
4 checks passed
@juancguerrerodev
juancguerrerodev deleted the dbejarano820/130-file-report-clipboard branch November 27, 2026 19:50
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.

Device lab: File it on GitHub opens the GitHub app's template list, without the report

2 participants