Handle Clean up & More info #2

merged
opened by baileytownsend.dev targeting main from bugfix/HandleCleanup
  • Clean up some of the odd Unicode characters that show up if you copy your handle from your profile
  • Added info on how to sign in after
  • Added some tips to help with Invalid Handle
Changed files
+43 -5
public
src
+5
index.html
···
askForPlcToken: false,
plcToken: null,
plcStatus: null,
+
done: false,
//advance
showAdvance: false,
createNewAccount: true,
···
this.plcStatus = 'Signing PLC operation...';
await window.Migrator.signPlcOperation(this.plcToken);
this.plcStatus = 'PLC operation signed successfully! Your account has been MOOved to the new PDS.';
+
this.done = true;
// this.askForPlcToken = false;
} catch (error) {
this.error = error.message;
···
</div>
<div x-show="error" x-text="error" class="error-message"></div>
<div x-show="plcStatus" x-text="plcStatus" class="status-message"></div>
+
<div x-show="done" class="status-message">Congratulations! You have MOOved to a new PDS! Remember to use
+
your new PDS URL under "Hosting provider" when logging in on Bluesky. Can find more detail information
+
<a href="http://localhost:5173/info.html#cant-login">here.</a></div>
<div>
<button type="submit">Sign the papers</button>
</div>
+32 -2
public/info.html
···
</head>
<body>
<div class="container">
-
<h1>PDS MOOver</h1>
+
<h1><a href="/">PDS MOOver </a></h1>
<div class="cow-image">
<img src="/moo.webp" alt="Cartoon milk cow" style="max-width: 100%; max-height: 100%; object-fit: contain;">
</div>
···
<h3>Table of contents</h3>
<ol>
<li><a href="#precautions">Precautions</a></li>
+
<li><a href="#cant-login">I can't log in?/Says my account is deactivated?</a></li>
+
<li><a href="#invalid-handle">My account says Invalid Handle?</a></li>
<li><a href="#help">!!!!!HELP!!!!!</a></li>
<li><a href="#why">Why doesn't PDS MOOver have xyz?</a></li>
<li><a href="#done">Alright account migrated, now what?</a></li>
···
</p>
</section>
+
<section id="cant-login" class="section" style="text-align:left">
+
<h2>I can't log in?/Says my account is deactivated?</h2>
+
<p>When you move to a non Bluesky PDS you have to do an extra step on login.</p>
+
<ol>
+
<li>On the Sign in screen for <a href="https://bsky.app">bsky.app</a> or on the app click the top input
+
titled "Hosting provider" and has a globe icon and says Bluesky Social"
+
</li>
+
<li>Click the tab labeled custom</li>
+
<li>In the input for server address you put the same URL you used for the new PDS URL with the https://
+
like so <code>https://example.com</code></li>
+
<li>Click done and enter your new handle(or email) and password</li>
+
</ol>
+
</section>
+
+
<section id="invalid-handle" class="section" style="text-align:left">
+
<h2>My account says Invalid Handle?</h2>
+
<p>It's a bit of a bug sometimes. I'm not sure what causes it, but usually mentioning your handle in a post
+
or reply fixes it.
+
Like <code>@fullhandle.newpds.com</code>, may or may not highlight it blue and autofill it but make sure
+
you have the
+
full handle and the @ like that. Can also check your handle with the <a
+
href="https://bsky-debug.app/handle">Bluesky Debug Page</a>. If you see green, and it says one
+
of
+
them pass you should be fine and just may take a while to update.</p>
+
</section>
+
<section id="help" class="section" style="text-align:left">
<h2>!!!!!HELP!!!!!</h2>
<p>If you're having issues with PDS MOOver first of all, I'm very sorry. I have tested this to the best of
···
if it created the account, repo is there but some blobs are missing. You can uncheck everything but
"Migrate Missing Blobs", "Migrate Prefs", and "Migrate PLC record" and it will pick up after the account
repo migration. It is odd in the fact that all the fields are required. That's just to cut down on logic
-
to hopefully cut down on bugs. If you don't ever see the "Please enter your PLC Token" you can just
+
to hopefully cut down on bugs. If you don't ever see the "Please enter your PLC Token" and enter the
+
token sent to your email, you can just
forget about it and call it a day if it's too much. Your old account is still active and working.</p>
</section>
+
<section id="why" class="section" style="text-align:left">
<h2>Why doesn't PDS MOOver have xyz?</h2>
<p>PDS MOOver was designed to pretty much be the goat account migration with a UI. Like in this <a
+6 -3
src/pdsmoover.js
···
* @param {string|null} twoFactorCode - Optional, but needed if it fails with 2fa required
*/
async migrate(oldHandle, password, newPdsUrl, newEmail, newHandle, inviteCode, statusUpdateHandler = null, twoFactorCode = null) {
+
+
//Copying the handle from bsky website adds some random unicodes on
+
oldHandle = oldHandle.replace('@', '').trim().replace(/[\u202A\u202C\u200E\u200F\u2066-\u2069]/g, '');
//Resolves the did and finds the did document for the old PDS
safeStatusUpdate(statusUpdateHandler, 'Resolving old PDS');
const usersDid = await handleResolver.resolve(oldHandle);
···
for (const recordBlob of missingBlobs.data.blobs) {
try {
-
//TODO may move the status update here but would have it only update like every 10
+
const blobRes = await oldAgent.com.atproto.sync.getBlob({
did: usersDid,
cid: recordBlob.cid,
···
}
missingUploadedBlobs++;
} catch (error) {
-
//TODO silently logging for now will do a missing blobs later
+
//TODO silently logging prob should list them so user can manually download
console.error(error);
-
this.missingBlobs.push(cid);
+
this.missingBlobs.push(recordBlob.cid);
}
}
missingBlobCursor = missingBlobs.data.cursor;