Skip to content

feat: accept either homeserver or username on login (solves #12) - #141

Merged
viktorstrate merged 2 commits into
viktorstrate:mainfrom
oleggtro:feat/autofill-username
Nov 21, 2026
Merged

viktorstrate merged 2 commits into
viktorstrate:mainfrom
oleggtro:feat/autofill-username

Conversation

@oleggtro

@oleggtro oleggtro commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Hey there,
I really want a native mac Matrix client to exist and want to help out wherever possible.

This PR enables the user to enter either their fully qualified username or only their hostnames server on initial login as requested in #12.

I've attached a demo of how the changes look below.

Any feedback is very welcome :)

issue_12_demo.mov

…ate#12)

This commit enables the user to enter either their fully qualified username or only their hostnames server on initial login
Copilot AI balanced review requested due to automatic review settings November 20, 2026 14:27

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@viktorstrate viktorstrate left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thank you for the PR :) I've left some comments.


@State private var loading: Bool = false
@State private var showError: Error? = nil
@State private var isCredentialStage: Bool = false

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I don't think we need this state. Instead we can derive it from homeserverLogin != nil.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sure, great idea. didn't think of that, thanks!

Comment on lines +38 to +41
if parts.count == 2 {
usernameField = String(parts[0])
homeserverField = String(parts[1])
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Since parts.count can only be 2, I'd rather use an assert(parts.count == 2) instead of the if conditional.

@oleggtro

Copy link
Copy Markdown
Contributor Author

Thanks for the quick reply!

I'm not thaat familiar with Swift and SwiftUI (yet) but I’m trying to get a hold of it.

I refactored the parts you suggested :)

@viktorstrate viktorstrate linked an issue Nov 21, 2026 that may be closed by this pull request

@viktorstrate viktorstrate left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Looks good, thank you

@viktorstrate
viktorstrate merged commit 97ab3f2 into viktorstrate:main Nov 21, 2026
3 checks passed
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.

Using matrixID to autofill username on login

3 participants