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:
@@ -115,7 +115,7 @@ function createLibraryStore() {
|
||||
|
||||
async function loadItems(
|
||||
parentId: string,
|
||||
options: { startIndex?: number; limit?: number; genres?: string[] } = {}
|
||||
options: { startIndex?: number; limit?: number; genres?: string[] } = {},
|
||||
) {
|
||||
update((s) => ({ ...s, loadingCount: s.loadingCount + 1, error: null }));
|
||||
|
||||
@@ -206,7 +206,7 @@ function createLibraryStore() {
|
||||
const item = await repo.getItem(itemId);
|
||||
|
||||
log.debug(`loadItem(${itemId}): ${item.name} (${item.kind})`);
|
||||
log.debug(`- Has people? ${item.people ? `YES (${item.people.length})` : 'NO'}`);
|
||||
log.debug(`- Has people? ${item.people ? `YES (${item.people.length})` : "NO"}`);
|
||||
if (item.people && item.people.length > 0) {
|
||||
item.people.forEach((p, i) => {
|
||||
log.debug(` [${i}] ${p.name} (type: "${p.type}", id: "${p.id}")`);
|
||||
@@ -257,7 +257,7 @@ function createLibraryStore() {
|
||||
|
||||
// Add 10-second timeout to prevent indefinite hanging
|
||||
const timeoutPromise = new Promise<never>((_, reject) =>
|
||||
setTimeout(() => reject(new Error("Search timeout - please try again")), 10000)
|
||||
setTimeout(() => reject(new Error("Search timeout - please try again")), 10000),
|
||||
);
|
||||
|
||||
// Phase 1: the command resolves with instant local-cache results. The
|
||||
@@ -267,10 +267,7 @@ function createLibraryStore() {
|
||||
// never names a Jellyfin item type in connection with search.
|
||||
const options: SearchOptions = { limit: 10000, scope };
|
||||
|
||||
const result = await Promise.race([
|
||||
repo.search(query, options, requestId),
|
||||
timeoutPromise
|
||||
]);
|
||||
const result = await Promise.race([repo.search(query, options, requestId), timeoutPromise]);
|
||||
|
||||
// Only apply if this is still the active query (a newer search may have
|
||||
// started while we awaited).
|
||||
|
||||
Reference in New Issue
Block a user