docs(android): give ReportHandler its own page - #68
Merged
Merged
Conversation
The API was covered in two places — a long section inside Manual reporting → Bug reporting, and most of the Privacy → Report page — which buried an API that applies to every report, not just manually filed ones, and meant two copies drifting apart. Moved to docs/sdk/android/report-handler.mdx, a top-level entry in the Android nav next to Manual reporting. Bug reporting keeps the heading and points at it; the privacy page keeps its scrubbing angle and defers the contract. Two things the previous text did not say, both taken from BugseeIssueReportingCoordinator: - Non-terminating callbacks run on the MAIN thread. The examples had callers doing file I/O there with a 30 s budget. The page now says so and shows the background-thread form, which works because the pipeline waits for completionCallback. - The terminating path differs in every respect worth knowing: background thread, a few seconds' cap, completionCallback no longer gating anything, scheduled work lost, and the timeout option not applying. Also documented that a throwing handler is caught and logged so the report still ships. Dropped the "3 attachments × 3 MB" quota rather than carrying it over. Those are 6.x numbers from AttachmentsHelper, which no longer exists at that path; the only cap in the 7.x source is a soft 1000-attachment ceiling in IssueReport, which is what the page now states. If a size limit is enforced server-side, it should be documented with a source. Retargeted the #attachments anchor references on docs/index.md and within bug-reporting.mdx, which the move would otherwise have broken. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Change-Id: Iaabe9d35aec2bfc19dc94c868dfa057a632fff50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
setReportHandlerwas covered in two places — a long section inside Manual reporting → Bug reporting, and most of the Privacy → Report page. That buried an API which applies to every report, not just manually filed ones, and left two copies to drift apart.What moved
New top-level Android page: Report handler, placed in the nav directly after the Manual reporting category — top level rather than inside it, because the handler runs for crashes, handled errors, silent uploads and bug reports alike.
## Customize reports with ReportHandlerheading (so existing links still land) and now points at the new page.docs/index.mdrelinked.Two things the old text never said
Both from
BugseeIssueReportingCoordinator, and both affect whether a handler is correct:Non-terminating callbacks run on the main thread (
invokeHandlerAsync→runOnMainThread). The existing examples had readers callingopenStream()and writing a config snapshot right there — file I/O on the UI thread, with a 30-second budget behind it. The page now states the thread and shows the background-thread form, which works precisely because the pipeline waits forcompletionCallback.The terminating path differs in every respect worth knowing. It runs on an already-alive background thread, is capped at a few seconds (
TERMINATING_HANDLER_CAP_MILLIS),completionCallbackno longer gates anything, work scheduled for later is lost with the process, andReportHandlerCallbackTimeoutdoes not apply. The examples now branch onisTerminatingfirst.Also newly documented: a handler that throws is caught and logged, and the pipeline advances so the report still ships.
The attachment quota
I dropped the "3 attachments × 3 MB" line rather than carrying it into the canonical page. Those are 6.x figures from
AttachmentsHelper, which no longer exists at that path in 7.x. The only cap I can find in the 7.x source is a soft 1000-attachment ceiling inIssueReport.createAndAddAttachment, which logs a warning and returns an attachment that is not added to the report — that is what the page now documents, along with advice to keep attachments small.I could not find a size limit in the SDK or in the appserver config. If one is enforced server-side, it should go back in with a source — flagging rather than guessing, since the old number may simply have been stale. The same claim still appears in
migration.mdx; I left it there because that page is describing the 6.x→7.x transition, but it is worth a second look.Verification
npx cspell— 294 files, 0 issues.npm run build— zero broken links and zero broken anchors. The move initially broke two#attachmentsreferences (one on the home page, one insidebug-reporting.mdx); both are retargeted, and the rebuild is clean. Worth noting this repo setsonBrokenAnchors: 'warn', so those would not have failed CI — I checked the warning output.#attachmentsanchor and that "Report handler" appears in the Android sidebar.🤖 Generated with Claude Code