chore(cleanup): remove orphaned modules, hooks, structs, and cfg(server) stubs #128

Merged
David merged 2 commits from chore/mapps-141-remove-dead-code into main 2026-06-13 15:44:15 +02:00
Owner

Strip dead code left behind after the account-management pivot (69ec755) and later base-image/token-persistence changes. The SPA carries no orphaned auth/login machinery, the tree compiles with no dead exports, and the empty cfg(server) re-exports are gone so they can no longer block a server link.

Removed: the entire hooks::google_oauth module; the unused use_fetch/use_paginated_fetch hooks plus FetchState/PaginatedData; the dead OIDC flow helpers password_login, mfa_verify, issuer_get, issuer_post, issuer_post_authed_no_body, issuer_post_authed_empty (with LoginOutcome/MfaVerifyOk and the now-orphaned LoginBody/LoginTokenBundle); use_require_role and use_logout from hooks::auth; nine dead auth DTO structs and the dead AuthState re-export from the crate root + prelude; dead TenantUsage/ModuleConfig, the calendar availability/time-off request DTOs, pagination::FilterParams (and its tests), and version::version_string.

The fetch.rs _doc_anchor_keep_module_grouping no-op is replaced with an explanatory comment, and the billing _force_use suppressor is dropped (its AppError import is genuinely live, so the import stays).

The empty auth/{middleware,routes,service}.rs and tickets/{automation,routes,service}.rs stub files re-exported non-existent symbols behind #[cfg(feature = "server")]; since mokosh-apps never enables the server feature (axum/sqlx are not client deps) the server halves live in mokosh-server, so the stub files and their re-export lines are deleted rather than filled.

error.rs's server_impl block cannot be relocated from this client-only repo (that is mokosh-server's concern), so it is documented in place per the shared-copy convention. ContactStatus's stray std::str::FromStr is replaced with the module's inherent from_str(&str) -> Option<Self> convention.

has_any_role was flagged as dead at the audit commit (bfd0b31) but PMS-247's team page started calling it the next day; the method is removed and its single call site inlined to the has_role(..) || has_role(..) disjunction it was sugar for, preserving behavior.

#MAPPS-141

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

Strip dead code left behind after the account-management pivot (69ec755) and later base-image/token-persistence changes. The SPA carries no orphaned auth/login machinery, the tree compiles with no dead exports, and the empty cfg(server) re-exports are gone so they can no longer block a server link. Removed: the entire `hooks::google_oauth` module; the unused `use_fetch`/`use_paginated_fetch` hooks plus `FetchState`/`PaginatedData`; the dead OIDC flow helpers `password_login`, `mfa_verify`, `issuer_get`, `issuer_post`, `issuer_post_authed_no_body`, `issuer_post_authed_empty` (with `LoginOutcome`/`MfaVerifyOk` and the now-orphaned `LoginBody`/`LoginTokenBundle`); `use_require_role` and `use_logout` from `hooks::auth`; nine dead auth DTO structs and the dead `AuthState` re-export from the crate root + prelude; dead `TenantUsage`/`ModuleConfig`, the calendar availability/time-off request DTOs, `pagination::FilterParams` (and its tests), and `version::version_string`. The `fetch.rs` `_doc_anchor_keep_module_grouping` no-op is replaced with an explanatory comment, and the billing `_force_use` suppressor is dropped (its `AppError` import is genuinely live, so the import stays). The empty `auth/{middleware,routes,service}.rs` and `tickets/{automation,routes,service}.rs` stub files re-exported non-existent symbols behind `#[cfg(feature = "server")]`; since mokosh-apps never enables the `server` feature (axum/sqlx are not client deps) the server halves live in mokosh-server, so the stub files and their re-export lines are deleted rather than filled. `error.rs`'s `server_impl` block cannot be relocated from this client-only repo (that is mokosh-server's concern), so it is documented in place per the shared-copy convention. `ContactStatus`'s stray `std::str::FromStr` is replaced with the module's inherent `from_str(&str) -> Option<Self>` convention. `has_any_role` was flagged as dead at the audit commit (bfd0b31) but PMS-247's team page started calling it the next day; the method is removed and its single call site inlined to the `has_role(..) || has_role(..)` disjunction it was sugar for, preserving behavior. #MAPPS-141 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
chore(cleanup): remove orphaned modules, hooks, structs, and cfg(server) stubs
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 2m0s
694eb4701a
Strip dead code left behind after the account-management pivot (69ec755) and later base-image/token-persistence changes. The SPA carries no orphaned auth/login machinery, the tree compiles with no dead exports, and the empty cfg(server) re-exports are gone so they can no longer block a server link.

Removed: the entire `hooks::google_oauth` module; the unused `use_fetch`/`use_paginated_fetch` hooks plus `FetchState`/`PaginatedData`; the dead OIDC flow helpers `password_login`, `mfa_verify`, `issuer_get`, `issuer_post`, `issuer_post_authed_no_body`, `issuer_post_authed_empty` (with `LoginOutcome`/`MfaVerifyOk` and the now-orphaned `LoginBody`/`LoginTokenBundle`); `use_require_role` and `use_logout` from `hooks::auth`; nine dead auth DTO structs and the dead `AuthState` re-export from the crate root + prelude; dead `TenantUsage`/`ModuleConfig`, the calendar availability/time-off request DTOs, `pagination::FilterParams` (and its tests), and `version::version_string`.

The `fetch.rs` `_doc_anchor_keep_module_grouping` no-op is replaced with an explanatory comment, and the billing `_force_use` suppressor is dropped (its `AppError` import is genuinely live, so the import stays).

The empty `auth/{middleware,routes,service}.rs` and `tickets/{automation,routes,service}.rs` stub files re-exported non-existent symbols behind `#[cfg(feature = "server")]`; since mokosh-apps never enables the `server` feature (axum/sqlx are not client deps) the server halves live in mokosh-server, so the stub files and their re-export lines are deleted rather than filled.

`error.rs`'s `server_impl` block cannot be relocated from this client-only repo (that is mokosh-server's concern), so it is documented in place per the shared-copy convention. `ContactStatus`'s stray `std::str::FromStr` is replaced with the module's inherent `from_str(&str) -> Option<Self>` convention.

`has_any_role` was flagged as dead at the audit commit (bfd0b31) but PMS-247's team page started calling it the next day; the method is removed and its single call site inlined to the `has_role(..) || has_role(..)` disjunction it was sugar for, preserving behavior.

#MAPPS-141

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Merge remote-tracking branch 'origin/main' into chore/mapps-141-remove-dead-code
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 2m5s
Create release / Create release from merged PR (pull_request) Has been skipped
8c718bf4e6
# Conflicts:
#	src/hooks/auth.rs
#	src/hooks/google_oauth.rs
#	src/modules/auth/models.rs
David merged commit 4634e2d2aa into main 2026-06-13 15:44:15 +02:00
David deleted branch chore/mapps-141-remove-dead-code 2026-06-13 15:44:15 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
psa-systems/mokosh-apps!128
No description provided.