Skip to content

poc: implement cross-platform robot factory architecture#4461

Draft
tddang-linagora wants to merge 1 commit intopatrol/webfrom
poc/patrol-web-cross-platform-arch
Draft

poc: implement cross-platform robot factory architecture#4461
tddang-linagora wants to merge 1 commit intopatrol/webfrom
poc/patrol-web-cross-platform-arch

Conversation

@tddang-linagora
Copy link
Copy Markdown
Collaborator

Docs

Introduces Abstract Factory + conditional export infrastructure from ADR-0081. Platform selection resolved at compile time via dart.library.html — no if/else in any logic class.

New structure:

  • factories/: RobotFactory, Mobile/WebRobotFactory, conditional provider
  • robots/abstract/: AbstractLogin/Thread/ComposerRobot interfaces
  • robots/mobile/: thin wrappers over existing robots
  • robots/web/: WebComposerRobot overrides addContent for web

Migrates all scenarios/tests to new BaseTestScenario(super.$, super.robots) API. SendEmailScenario is the reference implementation using abstract robots.

Introduces Abstract Factory + conditional export infrastructure from
ADR-0081. Platform selection resolved at compile time via dart.library.html
— no if/else in any logic class.

New structure:
- factories/: RobotFactory, Mobile/WebRobotFactory, conditional provider
- robots/abstract/: AbstractLogin/Thread/ComposerRobot interfaces
- robots/mobile/: thin wrappers over existing robots
- robots/web/: WebComposerRobot overrides addContent for web

Migrates all scenarios/tests to new BaseTestScenario(super.$, super.robots)
API. SendEmailScenario is the reference implementation using abstract robots.
Copy link
Copy Markdown

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Gates Passed
3 Quality Gates Passed

See analysis details in CodeScene

Quality Gate Profile: The Bare Minimum
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 17, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 35ee573a-56e9-4816-ac7d-c350898e34ce

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch poc/patrol-web-cross-platform-arch

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.

void runPatrolTest({
required String description,
required BaseScenario Function(PatrolIntegrationTester $) scenarioBuilder,
List<TestTags> tags = const [],
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.

we should keep, but for other use not for mobile/web seperately

@github-actions
Copy link
Copy Markdown

This PR has been deployed to https://linagora.github.io/tmail-flutter/4461.

@hoangdat hoangdat mentioned this pull request Apr 17, 2026
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