Skip to content

Refactor Logon and Logoff Services#104

Merged
pheller merged 1 commit into
ProdigyReloaded:mainfrom
pheller:refactor-logon-logoff
Sep 30, 2025
Merged

Refactor Logon and Logoff Services#104
pheller merged 1 commit into
ProdigyReloaded:mainfrom
pheller:refactor-logon-logoff

Conversation

@pheller

@pheller pheller commented Sep 17, 2025

Copy link
Copy Markdown
Member
  • They were becoming very difficult to reason through and the use of the with construct felt forced.
  • Introduced a railway oriented approach to the processing pipeline - and_then will handle either invoking succeeding pipeline steps - perhaps adding to the pipeline context, or just pass errors through, letting the final step construct an appropriate response

@pheller pheller force-pushed the refactor-logon-logoff branch from da6539d to 8c8c7b8 Compare September 17, 2025 05:01
@pheller pheller marked this pull request as ready for review September 17, 2025 05:03
@pheller pheller requested review from Copilot and rrcook September 17, 2025 05:03

Copilot AI 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.

Pull Request Overview

This PR refactors the Logon and Logoff services to use a railway-oriented programming approach, replacing the previous with construct with an and_then pipeline pattern for better code clarity and error handling.

  • Introduces railway-oriented programming with and_then combinators for linear processing pipelines
  • Breaks down complex monolithic functions into smaller, focused pipeline stages
  • Consolidates error handling and response building logic

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
apps/server/lib/prodigy/server/service/logon.ex Complete refactor using railway pattern with pipeline stages for parsing, validation, authentication, and session management
apps/server/lib/prodigy/server/service/logoff.ex Refactored to use railway pattern with improved error handling and cleaner separation of concerns

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread apps/server/lib/prodigy/server/service/logon.ex Outdated
Comment thread apps/server/lib/prodigy/server/service/logoff.ex Outdated
Comment thread apps/server/lib/prodigy/server/service/logon.ex Outdated
@pheller pheller force-pushed the refactor-logon-logoff branch from 8c8c7b8 to f29e69a Compare September 17, 2025 05:10
- They were becoming very difficult to reason through and the use of the with construct felt forced.
- Introduced a railway oriented approach to the processing pipeline - and_then will handle either invoking succeeding pipeline steps - perhaps adding to the pipeline context, or just pass errors through, letting the final step construct an appropriate response
@pheller pheller force-pushed the refactor-logon-logoff branch from f29e69a to 848486b Compare September 30, 2025 04:16
@pheller pheller merged commit 7ca99bb into ProdigyReloaded:main Sep 30, 2025
1 check passed
@pheller pheller deleted the refactor-logon-logoff branch October 12, 2025 23:54
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