Skip to content

docs(code-review): extract simplicity audit from #3530#4505

Merged
realmeylisdev merged 2 commits into
mainfrom
docs/extract-simplicity-audit
May 18, 2026
Merged

docs(code-review): extract simplicity audit from #3530#4505
realmeylisdev merged 2 commits into
mainfrom
docs/extract-simplicity-audit

Conversation

@realmeylisdev
Copy link
Copy Markdown
Contributor

@realmeylisdev realmeylisdev commented May 18, 2026

Description

Extracts docs/code-review/issues-simplicity.md from @omartinma's #3530 docs draft into a small standalone PR against main. Per the ratification thread on #4339, this is the source-of-truth artifact the maintainability epic references for debt repayment and decomposition expectations; landing it now unblocks the rest of the #4339 child-issue work without forcing the full #3530 docs draft to merge.

Content initially copied verbatim from #3530 head docs/repo-recommendations. Per review feedback on the initial commit, the following corrections were applied so the doc can ship as a source-of-truth artifact on main:

Numbers remain the April 2026 audit baseline; follow-up PRs can update them as decomposition lands.

Out of scope for this PR (intentional):

Related Issue: Relates to #4339, supersedes one file from #3530.

Out of Scope

The other 13 audit docs in #3530 (see above). They belong under #4335 / #4336 / #4337.

Verification

  • diff against the source file in docs: code review #3530 head ref: differs only by the four review-driven corrections listed above.
  • Docs-only change; no code paths touched, no test impact.

Type of Change

  • 📝 Documentation

Checklist

  • PR targets main.
  • Original author credited via Co-authored-by trailer.
  • No unrelated changes included.

Per the #4339 ratification thread, extracting the simplicity-audit
artifact into a small standalone PR so it can land against `main`
rather than waiting on the full #3530 docs draft. The other audit
docs in #3530 (architecture, performance, error-handling, testing,
etc.) belong under their respective epics (#4335 / #4336 / #4337)
and will be extracted by those owners.

Content copied verbatim from #3530 head `docs/repo-recommendations`
to preserve attribution and keep this PR a pure extraction (no
content edits). Numbers reflect the audit baseline at PR-open time;
follow-up PRs can update them as decomposition lands.

Co-authored-by: Oscar Martin <martinm.oscar@gmail.com>
Copy link
Copy Markdown
Member

@NotThatKindOfDrLiz NotThatKindOfDrLiz left a comment

Choose a reason for hiding this comment

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

Requesting changes because this is being positioned as a source-of-truth debt artifact on main, but it currently lands with known inaccuracies. The main blockers are stale issue status references and contradictory baseline numbers inside the document itself. Please refresh those facts in this PR, then this should be fine to merge.

Comment thread docs/code-review/issues-simplicity.md Outdated

**Effort**: High. Each oversized file requires a domain-specific decomposition strategy. Priority targets: `video_event_service` (self-documented 9-concern split), `share_video_menu` (move business logic into `ShareSheetBloc`), `auth_service` (extract key management, session lifecycle, profile ops).

**GitHub ticket**: [#3594](https://github.com/divinevideo/divine-mobile/issues/3594)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

#3594 is already closed, and the same problem appears again later with #3595, #3596, and #3598. If this doc is meant to be the current simplicity debt artifact on main, it should not present already-completed work as still-outstanding remediation. Please refresh these ticket statuses or reframe the sections so they are clearly historical baseline items rather than active debt tickets.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

If this doc is meant to be the current simplicity debt artifact on main, it should not present already-completed work as still-outstanding remediation. Please refresh these ticket statuses or reframe the sections so they are clearly historical baseline items rather than active debt tickets.

Done in 565d804 — went with both framings together:

Comment thread docs/code-review/issues-simplicity.md Outdated
### `main.dart` is a 1,801-line entry point with 7+ responsibilities
**Problem**: `main.dart` bundles startup orchestration, service initialization, deep link handling, provider wiring, logging configuration, and UI widgets into a single file. Each concern is tightly coupled to the rest, making the startup sequence hard to understand, test, or modify independently.

**Evidence**: `mobile/lib/main.dart` (1,801 lines, 84 imports) contains:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This section says main.dart is 1,801 lines, but the oversized-files evidence above lists main.dart as 1,784 lines. Please reconcile these counts so the audit does not contradict itself.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This section says main.dart is 1,801 lines, but the oversized-files evidence above lists main.dart as 1,784 lines. Please reconcile these counts so the audit does not contradict itself.

Done in 565d804 — reconciled to 1,784 in the intro paragraph and the section heading, since that's the value in the granular Evidence list. No 1,801 references remain in the doc.

Comment thread docs/code-review/issues-simplicity.md Outdated

**Done well**: The new `lib/notifications/` feature demonstrates the correct BLoC-based architecture. The replacement is built; it just needs to fully replace the old implementation.

**Impact**: Medium. Two notification systems running simultaneously; confusion about which is canonical; ~1,500 LOC ready for removal once the new system is fully verified.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This says ~1,500 LOC is ready for removal, while the effort line below says ~1,000 LOC removed. Please pick one baseline or explain why the two numbers differ.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This says ~1,500 LOC is ready for removal, while the effort line below says ~1,000 LOC removed. Please pick one baseline or explain why the two numbers differ.

Done in 565d804 — both numbers were measuring different things and I disambiguated them rather than dropping either. Impact now reads "~1,500 LOC of dual-system code in total (old screen + provider + wiring)" and Effort reads "~1,000 LOC net deletion after wiring updates" — so the relationship between total scope and net delete is explicit on the page.

Addresses blocking review on #4505:

- Add April 2026 snapshot preamble pointing readers at epic #4339
  for live status, since the audit baseline is intentionally pinned.
- Annotate the four closed tickets (#3594, #3595, #3596, #3598) with
  their closure dates and successor references where applicable, so
  the doc does not present completed work as outstanding remediation.
- Reconcile main.dart count to 1,784 (matches the granular Evidence
  value) in both the intro paragraph and the section heading.
- Disambiguate the notification LOC numbers: ~1,500 is total dual-system
  scope, ~1,000 is net deletion after wiring updates.
Copy link
Copy Markdown
Member

@NotThatKindOfDrLiz NotThatKindOfDrLiz left a comment

Choose a reason for hiding this comment

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

Re-reviewed the updated doc and prior feedback. The blocking factual issues are addressed: closed-ticket status is now framed correctly as a snapshot with live-status pointers, the main.dart line count is reconciled internally, and the notification LOC numbers are disambiguated. Approving.

@realmeylisdev realmeylisdev merged commit 9782a4d into main May 18, 2026
10 checks passed
@realmeylisdev realmeylisdev deleted the docs/extract-simplicity-audit branch May 18, 2026 14:33
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.

2 participants