Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport SW API changes without service worker #2137

Merged
merged 19 commits into from
Jul 8, 2024
Merged

Conversation

corrideat
Copy link
Member

No description provided.

frontend/main.js Outdated Show resolved Hide resolved
frontend/main.js Outdated Show resolved Hide resolved
frontend/main.js Outdated Show resolved Hide resolved
frontend/main.js Outdated Show resolved Hide resolved
@corrideat corrideat force-pushed the feat/sw-support branch 2 times, most recently from b1b751c to 5fbb5c2 Compare July 3, 2024 18:28
Copy link

cypress bot commented Jul 3, 2024

Passing run #2603 ↗︎

0 114 8 0 Flakiness 0

Details:

Merge 8653614 into 1b05955...
Project: group-income Commit: c950130405 ℹ️
Status: Passed Duration: 10:59 💡
Started: Jul 8, 2024 7:05 PM Ended: Jul 8, 2024 7:16 PM

Review all test suite changes for PR #2137 ↗︎

@corrideat corrideat force-pushed the feat/sw-support branch 3 times, most recently from f69ca19 to a0a48d4 Compare July 4, 2024 19:06
@@ -27,7 +27,7 @@ export default ({
methods: {
submit () {
this.$refs.modal.close()
this.$router.push({ query: this.$route.query, path: this.$route.query.next ?? '/dashboard' }).catch(() => {})
this.$router.push({ query: this.$route.query, path: this.$route.query.next ?? '/' }).catch(() => {})
Copy link
Member

Choose a reason for hiding this comment

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

Why was this changed?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think both should work, but / always has the same number of redirects. That's why I changed it here.

@corrideat corrideat force-pushed the feat/sw-support branch 2 times, most recently from 0909f11 to 9679412 Compare July 5, 2024 19:27
frontend/main.js Outdated Show resolved Hide resolved
frontend/main.js Outdated Show resolved Hide resolved
frontend/main.js Outdated Show resolved Hide resolved
frontend/main.js Outdated Show resolved Hide resolved
Comment on lines +1451 to +1452
sbp('okTurtles.events/emit', DELETED_CHATROOM, { groupContractID: contractID, chatRoomID: data.chatRoomID })
const { identityContractID } = sbp('state/vuex/state').loggedIn
Copy link
Member

Choose a reason for hiding this comment

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

The DELETED_CHATROOM listener is defined to also take an identityContractID:

{ identityContractID, groupContractID, chatRoomID }

So should this include identityContractID: innerSigningContractID here?

Copy link
Member Author

@corrideat corrideat Jul 7, 2024

Choose a reason for hiding this comment

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

It's optional, but, yes, I think it could be added.

Copy link
Member Author

Choose a reason for hiding this comment

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

It should not be used when deleting a chatroom. If it's set, it'll skip the handler unless the user deleting it is the same as the currently logged in user.

Copy link
Member

Choose a reason for hiding this comment

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

Then could you please add a comment saying that the identityContractID is intentionally left out?

@taoeffect
Copy link
Member

So the latest Cypress failure is related to the one of the changes made today, and it could be related to the changes with removing the event queue for login (we could try simply adding a login-logout queue).

However the tests did pass with Feedback #6 commit. Another possibility is the change related to this change related to removeMember on leaving a group.

Or something else.

@corrideat
Copy link
Member Author

So the latest Cypress failure is related to the one of the changes made today, and it could be related to the changes with removing the event queue for login (we could try simply adding a login-logout queue).

However the tests did pass with Feedback #6 commit. Another possibility is the change related to this change related to removeMember on leaving a group.

Or something else.

This had to do with /process now being async. Fixed by making proposals also be async when needed.


return message
return message.contractID()
Copy link
Member

Choose a reason for hiding this comment

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

Why was this change made?

Copy link
Member Author

Choose a reason for hiding this comment

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

To avoid having to copy GIMessage across boundaries (a potentially expensive operation)

Comment on lines +646 to +651
'gi.actions/identity/login': (...params) => {
return sbp('okTurtles.eventQueue/queueEvent', 'ACTIONS-LOGIN', ['gi.actions/identity/_private/login', ...params])
},
'gi.actions/identity/logout': (...params) => {
return sbp('okTurtles.eventQueue/queueEvent', 'ACTIONS-LOGIN', ['gi.actions/identity/_private/logout', ...params])
},
Copy link
Member

Choose a reason for hiding this comment

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

Can we replace these with anonymous functions pushed onto the event queue?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it's better this way for logging, as otherwise you don't know when the anonymous function is executed

Copy link
Member

@taoeffect taoeffect left a comment

Choose a reason for hiding this comment

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

Incredible work @corrideat!

@taoeffect taoeffect merged commit 8f53a22 into master Jul 8, 2024
4 checks passed
@taoeffect taoeffect deleted the feat/sw-support branch July 8, 2024 19:27
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