Skip to content

BIOS-25037: Add iOS-specific ordering for "Data from app" fields#23

Merged
bradtgmurray merged 2 commits into
beeperfrom
wellington/BIOS-25037
Feb 5, 2026
Merged

BIOS-25037: Add iOS-specific ordering for "Data from app" fields#23
bradtgmurray merged 2 commits into
beeperfrom
wellington/BIOS-25037

Conversation

@wjuniorgit

@wjuniorgit wjuniorgit commented Feb 5, 2026

Copy link
Copy Markdown
Member

Order iOS Data from app fields in rageshake for easier triage

  • buildReportBody gathers dataKeys from p.Data.
  • It calls orderDataFromAppKeys(p.AppName, dataKeys).
  • For iOS apps (app ends with -ios): emit keys from iosDataFromAppPreferredKeys first, then sort and append remaining keys.
  • For non-iOS apps: just sort all keys (same as before).
  • printDataKeys prints in that final order.

@coderabbitai

coderabbitai Bot commented Feb 5, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Adds package-internal logic in submit.go to detect iOS bug-report apps (app name ends with "-ios") and reorder "data from app" keys using a predefined preferred key list, placing remaining keys lexicographically after the preferred ones.

Changes

Cohort / File(s) Summary
iOS Data Key Ordering
submit.go
Adds iosDataFromAppPreferredKeys and helpers isIOSBugReportApp(appName) and orderDataFromAppKeys(appName, keys). Replaces direct sorting of data keys with orderDataFromAppKeys in buildReportBody and buildGenericIssueRequest. Event-data sorting unchanged. No exported API changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding iOS-specific ordering for Data from app fields, which is the primary objective of the PR.
Linked Issues check ✅ Passed The PR implements key field reordering (Version, Build, Contacts Permission, Network type, OS, Device) through iosDataFromAppPreferredKeys for iOS bug reports to address the support team's triage needs identified in BIOS-25037.
Out of Scope Changes check ✅ Passed All changes are focused on reordering Data from app fields for iOS bug reports; no unrelated modifications to other functionality are present.
Description check ✅ Passed The pull request description clearly relates to the changeset, describing the ordering mechanism for iOS 'Data from app' fields and how it handles both iOS and non-iOS apps.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch wellington/BIOS-25037

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

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@submit.go`:
- Around line 131-165: Move "network_type" into the high-priority section of the
iosDataFromAppPreferredKeys slice so it appears near the top of reported fields
(e.g., place it immediately after "device" or within the first group of keys);
edit the iosDataFromAppPreferredKeys variable to reorder the entries accordingly
so "network_type" surfaces early in iOS reports.
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between de5ea69 and 1b01eb7.

📒 Files selected for processing (1)
  • submit.go
🔇 Additional comments (3)
submit.go (3)

1045-1045: Nice: data keys now flow through the iOS‑aware ordering.

This cleanly centralizes the ordering logic and keeps non‑iOS behavior deterministic.


1098-1125: Ordering logic is deterministic and stable.

Good separation of preferred keys vs. tail sort.


1127-1130: No action needed. The function correctly identifies all iOS apps in the system. The actual app names in the appToTeamID map are "beeper-ios" and "beeper-a8c-ios", both of which end with "-ios". No variants like "-ios-beta" or "-ios-dev" exist in the codebase, so the HasSuffix check is appropriate for the actual requirements.

Likely an incorrect or invalid review comment.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Comment thread submit.go
@adamvy

adamvy commented Feb 5, 2026

Copy link
Copy Markdown

Should we be doing this in rageshake? O rshould we just rename keys on the client so that they sort the way we want? Adding app specific things here feels odd

@wjuniorgit

wjuniorgit commented Feb 5, 2026

Copy link
Copy Markdown
Member Author

Should we be doing this in rageshake? O rshould we just rename keys on the client so that they sort the way we want? Adding app specific things here feels odd

@adamvy Unless I missed something, I did that in client but the order was not respected. We are calling a default sort function here.

@bradtgmurray

Copy link
Copy Markdown

I feel like it would be really nice to make this more generic, but I don't think this is necessarily the time we need to do that.

@bradtgmurray bradtgmurray merged commit 018df84 into beeper Feb 5, 2026
3 checks passed
@bradtgmurray bradtgmurray deleted the wellington/BIOS-25037 branch February 5, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants