Skip to content

chore(mobile): remove dead-code shared/ModuleErrorBoundary (206 LOC)#2739

Merged
Skords-01 merged 2 commits into
mainfrom
devin/1778713150-mobile-rm-module-error-boundary
May 14, 2026
Merged

chore(mobile): remove dead-code shared/ModuleErrorBoundary (206 LOC)#2739
Skords-01 merged 2 commits into
mainfrom
devin/1778713150-mobile-rm-module-error-boundary

Conversation

@Skords-01
Copy link
Copy Markdown
Owner

@Skords-01 Skords-01 commented May 13, 2026

Summary

Видаляю dead-code файл apps/mobile/src/modules/shared/ModuleErrorBoundary.tsx (206 LOC) — закриваю audit item P2.1 з docs/audits/2026-05-13-mobile-reliability-ux-roast.md. Pre-flight grep підтвердив 0 імпортерів та 0 dynamic-import / require.context патернів у apps/mobile/**; усі consumer-и користуються канонічним @/core/ModuleErrorBoundary. Єдиним живим per-module боундарі залишається apps/mobile/src/core/ModuleErrorBoundary.tsx.

Documentation sync:

  • docs/audits/2026-05-13-mobile-reliability-ux-roast.md — P2.1 ✅ Closed, прибрано з Outstanding-таблиці, оновлено TL;DR pain Dashboard: Add time-based greeting, summary cards and quick action buttons to hero #4 + top-level Last validated.
  • docs/tech-debt/mobile.md — додано dead-file note до Last validated.
  • docs/audits/README.md — counter 3/12 → 4/12, Outstanding 9 → 8, Last validated.

Parent session: https://app.devin.ai/sessions/cf40d7a65c784939be2fae8b897ce59e
Audit-док + item: docs/audits/2026-05-13-mobile-reliability-ux-roast.md §P2.1

Governing Skill

  • Primary skill: .agents/skills/sergeant-start-here/SKILL.md.agents/skills/sergeant-mobile-expo/SKILL.md.
  • Secondary skill (if truly needed): n/a.

Playbook

  • Primary playbook: n/a (one-file dead-code mini-PR, формат прямо у §P2.1 audit-доку).
  • Why this playbook: dead-code deletion з cross-grep pre-flight — стандартний шаблон.
  • If no playbook matched, why: scope занадто малий під dedicated playbook.

Verification

$ grep -rn "modules/shared/ModuleErrorBoundary\|shared/ModuleErrorBoundary" apps/mobile   # → 0
$ grep -rn 'require\.context\|import(".*ModuleErrorBoundary' apps/mobile                  # → 0
$ pnpm --filter @sergeant/mobile typecheck                                                 # → exit 0
$ pnpm typecheck                                                                            # → 17/17 successful
$ pnpm --filter @sergeant/mobile test                                                      # → 120 suites / 896 tests passed
$ pnpm test                                                                                 # → 17/17 successful
$ pnpm dead-code:files                                                                      # → 4 pre-existing hits in apps/web/src/core (поза scope)
$ pnpm format:check                                                                         # → 1 pre-existing warn у docs/architecture/platforms.md
$ pnpm lint                                                                                 # → 9 pre-existing fail у no-ellipsis-dots тестах eslint-plugin

Pre-existing CI noise verified by stashing my diff and rerunning on origin/main — ті самі fails там же, my-diff не їх причина.

Additional checks:

  • Local smoke / manual validation completed
  • Surface-specific checks completed

Docs and Governance

  • I updated docs that changed with the behavior, contract, workflow, or rollout.
  • I checked whether AGENTS.md needed an update.
  • I checked whether a playbook or skill needed an update.
  • I checked whether governance docs or review docs needed an update.

Updated docs:

  • docs/audits/2026-05-13-mobile-reliability-ux-roast.md — P2.1 ✅ Closed, removed from Outstanding table, Last validated bumped.
  • docs/tech-debt/mobile.md — Last validated bumped + dead-file note.
  • docs/audits/README.md — counter 3/12 → 4/12, Outstanding 9 → 8, Last validated bumped.

Risk and Rollout

  • User-visible risk: нульовий — dead-code файл (0 importer-ів).
  • Rollout / deploy order: merge до main, нічого додатково.
  • Backout plan: git revert <merge-commit>.

Hard Rule #15

  • I read AGENTS.md before coding.
  • Internal docs I touched are in Ukrainian.
  • I did not use --no-verify.

Audit-freeze (until 2026-06-02)

  • This PR does not add new top-level audit/initiative/playbook/ADR files.

Reviewer Notes

Anti-scope strictly enforced: інші audit-айтеми з тієї ж прожарки (P0/P1/P2.2-P2.5) не торкав, інші audit-документи не торкав. Cross-repo grep показав 2 illustrative-only refs у packages/eslint-plugin-sergeant-design/ (comment example + synthetic path-fixture using path.resolve, не fs.exists) — навмисно залишив незмінними щоб тримати scope тісним; опційний follow-up.

Note: PR created via GitHub REST API after git_pr action=create failed repeatedly with Bad credentials despite the GitHub token having valid repo, workflow scopes. Blocker reported to platform.

Acceptance checklist

  • Зміна реалізована за описом.
  • pnpm lint && pnpm typecheck && pnpm test локально проходять у частині my-diff (pre-existing failures документовані вище).
  • Audit-док оновлено — P2.1 ✅ Closed + перенесено у §Прогрес виконання + видалено з Outstanding-таблиці.
  • Dependent docs (docs/audits/README.md counter + Last validated, docs/tech-debt/mobile.md) — синхронізовано.
  • Conventional Commit з explicit scope (mobile); branch devin/1778713150-mobile-rm-module-error-boundary.
  • PR відкрито з parent session, audit-док + item ID, чек-лістом acceptance.
  • CI має пройти (буде перевірено після створення PR; до 3 спроб виправлення).

Summary by cubic

Removed dead code apps/mobile/src/modules/shared/ModuleErrorBoundary.tsx (206 LOC) and consolidated on the core boundary. Closes audit P2.1 and syncs related docs/counters.

  • Refactors
    • Deleted apps/mobile/src/modules/shared/ModuleErrorBoundary.tsx after grep confirmed 0 importers and no dynamic imports.
    • All consumers use @/core/ModuleErrorBoundary; the only live boundary is apps/mobile/src/core/ModuleErrorBoundary.tsx.
    • Docs updated: closed P2.1 in docs/audits/2026-05-13-mobile-reliability-ux-roast.md; bumped docs/audits/README.md counters (3/12 → 4/12; Outstanding 9 → 8); added note in docs/tech-debt/mobile.md. Cross-repo illustrative refs in eslint-plugin-sergeant-design left as-is.

Written for commit ad9e845. Summary will update on new commits.

Summary by CodeRabbit

  • Chores
    • Removed unused error boundary utility from mobile application codebase
    • Updated audit and tech-debt documentation to reflect completion of code cleanup initiative

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sergeant Ready Ready Preview, Comment May 14, 2026 5:05pm

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 13, 2026

Warning

Rate limit exceeded

@Skords-01 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 47 minutes and 25 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 4abaaec7-945b-47d6-874f-94fa03fc87f7

📥 Commits

Reviewing files that changed from the base of the PR and between 3ed677e and ad9e845.

📒 Files selected for processing (1)
  • apps/mobile/src/modules/shared/ModuleErrorBoundary.tsx
📝 Walkthrough

Walkthrough

This PR removes the unused ModuleErrorBoundary React Native error-boundary component and updates mobile audit documentation to mark the dead-code closure (P2.1) as completed with verification details.

Changes

Dead Code Removal and Audit Closure

Layer / File(s) Summary
ModuleErrorBoundary removal
apps/mobile/src/modules/shared/ModuleErrorBoundary.tsx
Complete deletion of unused error boundary implementation (206 lines) containing ModuleErrorBoundaryProps, ModuleErrorBoundary class, and withModuleErrorBoundary HOC.
Audit closure documentation
docs/audits/2026-05-13-mobile-reliability-ux-roast.md, docs/audits/README.md, docs/tech-debt/mobile.md
Updated audit tracking to mark P2.1 dead-code item as closed, including grep verification results, counter updates (3/12 → 4/12 implemented, 9 → 8 outstanding), and follow-up notes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • Skords-01/Sergeant#1209: Removes or updates ModuleErrorBoundary.test.tsx expectations for the deleted component.
  • Skords-01/Sergeant#448: References the removed ModuleErrorBoundary HOC in finyk/_layout.tsx that wraps the Finyk stack layout.
  • Skords-01/Sergeant#1590: Concurrently updates docs/audits/README.md audit counters and bookkeeping.

Suggested labels

size/S

Poem

🐰 A boundary once guarded the mobile app's fate,
But unused it lingered—no errors to gate.
Now swept into audit closures so clean,
Dead code retired with grep-scanned routine,
Progress marches on: 3 to 4, count complete! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and specifically describes the main change: removing the dead-code ModuleErrorBoundary file from the mobile module, including the line count (206 LOC).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch devin/1778713150-mobile-rm-module-error-boundary

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/tech-debt/mobile.md`:
- Around line 3-10: The blockquote header in docs/tech-debt/mobile.md contains
an extra blank line breaking the contiguous `>` sequence and triggering
markdownlint MD028; edit the quoted header block so every separator line begins
with `>` with no intervening blank line (i.e., collapse the blank line between
the two `>` paragraphs into a `>` line) while preserving the text about
ModuleErrorBoundary, useRoutineReminders.ts, and the file-size inventory so the
blockquote remains contiguous.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f2ce524f-0078-4ecd-99fa-82e3c91efa26

📥 Commits

Reviewing files that changed from the base of the PR and between b328fbc and 3ed677e.

📒 Files selected for processing (4)
  • apps/mobile/src/modules/shared/ModuleErrorBoundary.tsx
  • docs/audits/2026-05-13-mobile-reliability-ux-roast.md
  • docs/audits/README.md
  • docs/tech-debt/mobile.md
💤 Files with no reviewable changes (1)
  • apps/mobile/src/modules/shared/ModuleErrorBoundary.tsx

Comment thread docs/tech-debt/mobile.md
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 14, 2026

⏱️ CI Pipeline Duration Report

Based on the last 50 successful runs on the default branch.

Overall Pipeline

Metric Value
p50 6m 26s
p95 7m 55s
p99 9m 3s
Current run 27m 17s
vs p95 +244.6%

Trend (last 20 runs): ▃▃▁▂▃▃▃▂▃▃▂▂▄▃▃▆▅▄█▆

Per-Job Breakdown

Job p50 p95 p99 Current vs p95
Accessibility (axe-core) 2m 5s 2m 21s 2m 23s 0s -100.0%
Commit messages (commitlint) 0s 0s 0s 34s N/A
Critical-flow E2E (Playwright) 1m 36s 1m 44s 1m 44s 4m 58s +186.5%
Migration lint (AGENTS rule 0s 0s 0s 13s N/A
Pipeline duration (p95 trend) 26s 27s 27s
Secret scan (gitleaks) 8s 11s 11s 10s -9.1%
Smoke E2E (Playwright) 1m 26s 1m 40s 1m 40s
Test coverage (vitest) 2m 4s 2m 33s 2m 33s 1m 15s -51.0%
Workflow lint (actionlint) 7s 7s 7s 8s +14.3%
check 4m 12s 4m 54s 5m 6s 1m 23s -71.8%
tsconfig strict guard (PR-1.A) 5s 14s 14s 8s -42.9%

⚠️ Warning: Current run (27m 17s) exceeds p95 + 20% threshold (9m 30s). Consider reviewing slow jobs.

Removes `apps/mobile/src/modules/shared/ModuleErrorBoundary.tsx` — pre-flight grep:
- `grep -rn "modules/shared/ModuleErrorBoundary\|shared/ModuleErrorBoundary" apps/mobile` → 0
- `grep -rn 'require\.context\|import(".*ModuleErrorBoundary' apps/mobile` → 0

All 5 consumers import `@/core/ModuleErrorBoundary` instead — the single live
per-module boundary remains `apps/mobile/src/core/ModuleErrorBoundary.tsx`.

Cross-repo grep surfaced 2 illustrative refs in eslint-plugin-sergeant-design
(comment example + synthetic path-fixture using `path.resolve`, not `fs.exists`) —
not load-bearing, left untouched to keep scope tight.

Closes audit item P2.1 in docs/audits/2026-05-13-mobile-reliability-ux-roast.md;
syncs docs/tech-debt/mobile.md + docs/audits/README.md counters (3/12 → 4/12, 9 → 8).

Co-Authored-By: Андрій Виграв <dmytro.s.stakhov@gmail.com>
@Skords-01 Skords-01 force-pushed the devin/1778713150-mobile-rm-module-error-boundary branch from 3c932c6 to b1aa97e Compare May 14, 2026 15:01
@github-actions github-actions Bot added size/M and removed size/L labels May 14, 2026
@Skords-01 Skords-01 merged commit a554a6d into main May 14, 2026
32 of 45 checks passed
@Skords-01 Skords-01 deleted the devin/1778713150-mobile-rm-module-error-boundary branch May 14, 2026 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant