-
Notifications
You must be signed in to change notification settings - Fork 808
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
Handle AFK '@-in-names' protocol (take 2) #1270
Conversation
This reverts commit 5348d13.
Went through everything in I've confirmed in the test client that tab completion of usernames now works. Are the additional things I should be testing? Does someone else want to patch this in to help provide some extra assurance it won't break things this time around? |
Is the new |
I don't see any |
Have you played through an entire battle on testclient, with and without |
(People in the Staff room are pretty willing to help devs test this sort of thing.) (Once you have, feel free to merge.) |
Doesn't this require me to set up a server + client to allow other people to access it? And they still have to go through a hacky login flow because #1264 has not been resolved? Easier to just play out battles myself TBH... (I don't have any Pokémon code or even Node for that matter on any of my servers yet...). It'd be great to have a staging environment where we could test out client + server features without pushing to main, but I think a proper set up for that is once again blocked on #1264.
I'm not a collaborator on this repro, but if I were I would be adding a 'Do Not Merge' label currently. I found one bug after playing through a battle (fixed with d701d93), and there's currently another issue where if you are /away and refresh you end up in a mixed state where parts of the UI think your /away and other parts don't (I think due to which UI elements listen to which things to know when to update). Once I've fixed that and gone through another round of poking around looking for edge cases I'll let you know. |
I'm mistaken about this. The 'bad UI state' is really a combination of two things, neither which are caused by this PR.
not any |
I mean the test would be: Battle on Main, other tester on Main, you on testclient. Bugs that only crop up with an experimental server aren't important; critical bugs are crashes that affect Main like the ones we hit last time. |
Once you've tested that, comment and I'll merge immediately. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(pending the test in comments)
Oh yeah, I'd tested both against the main server and against a local server already, but I just did it again to be sure: Poked around the Lobby etc afterwards on the test client and no crashes. I'm significantly more confident in this change than last time, but still find it hard to promise much in an untyped codebase without tests. |
case 'name': case 'n': { | ||
const user = BattleTextParser.parseNameParts(args[1]); | ||
if (toId(args[2]) !== toId(user.name)) { | ||
divHTML = '<small>' + BattleLog.escapeHTML(user.name) + ' renamed from ' + BattleLog.escapeHTML(args[2]) + '.</small>'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should note - this is going to look kind of weird once the server code lands, as args[2]
is the ID, which shouldn't have actually changed, so its going to be 'Foo renamed from foo'
when Foo@!Away -> Foo
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be a different message in that case; something like Foo changed status to ...
Rollforward of #1265. Currently this is unchanged from what was committed and then rolled back (thus why this is a draft), but I will be going through everything in
git grep users
to avoid breaking things.