chore(format): run prettier over src/ and scripts/

Formatting was configured but never enforced: `bun run format:check`
reported 199 unformatted files and ran in no workflow and in no git hook,
so .prettierrc (printWidth 100, trailing commas) described an intention
rather than the tree.

This is the one-time sweep that makes the check gateable. Whitespace and
token-reflow only -- no behavioural change: `bun run check` reports 0
errors and all 1053 frontend tests pass before and after.

Kept out of every other commit on purpose. A 199-file diff mixed with
real changes is unreviewable, and the next commit turns format:check
into a hard CI gate so this cannot silently accumulate again.
This commit is contained in:
2026-08-21 17:41:44 +02:00
parent d095e1f410
commit ad48d89dfe
199 changed files with 4698 additions and 3453 deletions
+38 -21
View File
@@ -172,7 +172,12 @@ function createAuthStore() {
// we mark authenticated — the first screen (library overview) reads
// through it — so keep it awaited.
repository = new RepositoryClient();
await repository.create(session.serverUrl, session.userId, session.accessToken, session.serverId);
await repository.create(
session.serverUrl,
session.userId,
session.accessToken,
session.serverId,
);
// Configure the Rust player for playback reporting. This is NOT needed to
// render the first screen (it only matters once playback starts), so run
@@ -185,7 +190,7 @@ function createAuthStore() {
session.serverUrl,
session.accessToken,
session.userId,
deviceId
deviceId,
);
log.debug("Rust player configured for automatic playback reporting");
} catch (error) {
@@ -209,19 +214,21 @@ function createAuthStore() {
// Start connectivity monitoring early to avoid appearing offline on startup
log.debug("Starting early connectivity monitoring...");
connectivity.startMonitoring(session.serverUrl, {
onServerReconnected: () => {
// Retry session verification when server becomes reachable
retryVerification();
// Resume downloads queued while offline, then refresh the catalog.
// Lazy import to avoid an auth <-> offlineCatalog import cycle.
import("$lib/services/offlineCatalog")
.then((m) => m.onReconnected())
.catch((err) => log.warn("Catalog reconnect failed:", err));
},
}).catch((error) => {
log.error("Failed to start connectivity monitoring:", error);
});
connectivity
.startMonitoring(session.serverUrl, {
onServerReconnected: () => {
// Retry session verification when server becomes reachable
retryVerification();
// Resume downloads queued while offline, then refresh the catalog.
// Lazy import to avoid an auth <-> offlineCatalog import cycle.
import("$lib/services/offlineCatalog")
.then((m) => m.onReconnected())
.catch((err) => log.warn("Catalog reconnect failed:", err));
},
})
.catch((error) => {
log.error("Failed to start connectivity monitoring:", error);
});
// Start background session verification — fire-and-forget. This is
// already asynchronous work (results arrive via the auth:* events wired
@@ -313,7 +320,7 @@ function createAuthStore() {
authResult.user.id,
authResult.serverId,
authResult.user.name,
authResult.accessToken
authResult.accessToken,
);
await commands.storageSetActiveUser(authResult.user.id, authResult.serverId);
@@ -332,7 +339,12 @@ function createAuthStore() {
// Create RepositoryClient
repository = new RepositoryClient();
await repository.create(serverUrl, authResult.user.id, authResult.accessToken, authResult.serverId);
await repository.create(
serverUrl,
authResult.user.id,
authResult.accessToken,
authResult.serverId,
);
// Configure Rust player
try {
@@ -341,7 +353,7 @@ function createAuthStore() {
serverUrl,
authResult.accessToken,
authResult.user.id,
playerDeviceId
playerDeviceId,
);
log.debug("Rust player configured for playback reporting");
} catch (error) {
@@ -398,7 +410,7 @@ function createAuthStore() {
authResult.user.id,
authResult.serverId,
authResult.user.name,
authResult.accessToken
authResult.accessToken,
);
// Recreate repository with new credentials
@@ -406,7 +418,12 @@ function createAuthStore() {
await repository.destroy();
const session = await commands.authGetSession();
if (session) {
await repository.create(session.serverUrl, authResult.user.id, authResult.accessToken, authResult.serverId);
await repository.create(
session.serverUrl,
authResult.user.id,
authResult.accessToken,
authResult.serverId,
);
}
}
@@ -417,7 +434,7 @@ function createAuthStore() {
repository ? await getCurrentSessionServerUrl() : "",
authResult.accessToken,
authResult.user.id,
playerDeviceId
playerDeviceId,
);
} catch (error) {
log.error("Failed to reconfigure player:", error);