Skip to content

Conversation

@peter-sanderson
Copy link
Contributor

@peter-sanderson peter-sanderson commented Nov 25, 2025

Adds a test for changeRelayUrl + some refactoring around it.

This is followup on #23401

πŸ”πŸ–₯️ Suite native android test results: View in Currents

πŸ”πŸ–₯️ Suite web test results: View in Currents

πŸ”πŸ–₯️ Suite desktop test results: View in Currents

Base automatically changed from refactor-dependency-injection-in-evolu to develop November 26, 2025 09:56
@peter-sanderson peter-sanderson changed the base branch from develop to extra-dependencies-factory November 26, 2025 17:56
@peter-sanderson peter-sanderson changed the title chore: WIP change relay tests chore: change relay test Nov 26, 2025
@peter-sanderson peter-sanderson self-assigned this Nov 26, 2025
);

if (!originalIsSuiteSyncEnabled) {
dispatch((_, getState) => initSuiteSyncNative({ getState }));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was forgotten, there is nothing to init anymore

"@suite-native/sentry": "workspace:*",
"@suite-native/settings": "workspace:*",
"@suite-native/storage": "workspace:*",
"@suite-native/suite-sync": "workspace:*",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

☝️ important, this shall not be needed at all, all shall use suite-sync from common and call everything against interface

dispatch: Dispatch;
};

export const createSuiteSyncCompositionRoot = (
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is important concept.

We can have modules (suite-sync) that can (shall?) handle their composition in isolatation. So the main app is not polluted by 1000 servicies from it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes , logicaly "vztyčna plocha" should be minimal - the interaction between this "suit sync module" and the rest of the app.

Logically then, anything that doesn't need to be called from outside shouldn't be there. However, it doesn't solve our problem with that Big Extradependencies that needs to know about these.

Copy link
Contributor Author

@peter-sanderson peter-sanderson Nov 26, 2025

Choose a reason for hiding this comment

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

Yea, it does not solve problem with Big ExtraDependencies, because they are the problem. They are not composition root, they are the Service-Locator.

They create inherent circular dependency.

If you have object that contain EVERYTHING and you want to use it as type SOMEWHERE, that SOMEWHERE is already referenced in EVERTHING, because it is fucking EVERYHING 🀣

@peter-sanderson peter-sanderson marked this pull request as ready for review November 26, 2025 19:21
@peter-sanderson peter-sanderson requested a review from a team as a code owner November 26, 2025 19:21
@peter-sanderson peter-sanderson force-pushed the extra-dependencies-factory branch from c7220c2 to 376f13c Compare November 26, 2025 20:32
@peter-sanderson peter-sanderson force-pushed the extra-dependencies-factory branch from 376f13c to fd3b9b1 Compare November 26, 2025 20:37
@peter-sanderson peter-sanderson force-pushed the extra-dependencies-factory branch from fd3b9b1 to 1299cb2 Compare November 26, 2025 20:48
Base automatically changed from extra-dependencies-factory to develop November 27, 2025 21:00
const [isLoading, setIsLoading] = useState(false);

const dispatch = useDispatch();
const { suiteSync } = useServices();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is how to use dependencies/servicies in component. This can be improved, this is very simple solution.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ideally components shall have defined dependencies as well, but it is probably not very doable in React

}

return acc;
}, [] as SuiteSyncOwner[]);
Copy link
Contributor

Choose a reason for hiding this comment

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

this would be appropriate as a memoizedSelector

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

Base automatically changed from upgrade-evolu2 to develop November 29, 2025 09:46
@trezor-bot
Copy link
Contributor

trezor-bot bot commented Nov 29, 2025

βœ… Previously successful run of [Test] PR Suite Web e2e tests workflow has been found.
⏭️ Skipping tests for this run.
πŸ’‘ If you are unsure about your latest changes, please rerun the workflow manually. (Use the Re-run all jobs option)

@trezor-bot
Copy link
Contributor

trezor-bot bot commented Nov 30, 2025

βœ… Previously successful run of [Test] PR Suite Desktop e2e tests workflow has been found.
⏭️ Skipping tests for this run.
πŸ’‘ If you are unsure about your latest changes, please rerun the workflow manually. (Use the Re-run all jobs option)

@peter-sanderson peter-sanderson force-pushed the relay-tests branch 2 times, most recently from 719fb1f to 037d37c Compare November 30, 2025 08:44
vojtatranta and others added 3 commits November 30, 2025 22:22
feat(suite): add option to pass extra dependencies factory to store and as extra thunk parameter and use it freely also from react context

chore: change Relay Test

# Conflicts:
#	suite-native/suite-sync/package.json
#	suite/suite-sync/package.json
#	yarn.lock
Copy link
Contributor

@Lemonexe Lemonexe left a comment

Choose a reason for hiding this comment

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

LGTM

@peter-sanderson peter-sanderson merged commit 20bc0cd into develop Dec 1, 2025
37 checks passed
@peter-sanderson peter-sanderson deleted the relay-tests branch December 1, 2025 10:38
@github-project-automation github-project-automation bot moved this to -no status in Evolu - Suite Sync Dec 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: -no status

Development

Successfully merging this pull request may close these issues.

5 participants