From e7baa943228d4795f681199561ccc9997ee536e9 Mon Sep 17 00:00:00 2001 From: aewing Date: Thu, 8 Jan 2026 17:29:54 +0000 Subject: [PATCH] refactor: remove progress bar from job loading UI - Removed progress bar HTML element and CSS - Removed startProgress() and finishProgress() functions - Simplified job loading flow (jobs now display instantly) - Progress tracking removed; jobs render as they load --- backend/server.ts | 2 +- frontend/index.html | 23 +---------- nohup.out | 95 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 97 insertions(+), 23 deletions(-) create mode 100644 nohup.out diff --git a/backend/server.ts b/backend/server.ts index a55ba06..08e3357 100644 --- a/backend/server.ts +++ b/backend/server.ts @@ -219,7 +219,7 @@ app.onError((err, c) => { return c.text('Internal Server Error', 500); }); -const PORT = Number(process.env.PORT || 3003); +const PORT = Number(process.env.PORT || 3000); logLine('logs/server.log', `Starting frontend server on port ${PORT}`); diff --git a/frontend/index.html b/frontend/index.html index 435651a..3f21b78 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -33,10 +33,6 @@

Job Info

-
-
-
- @@ -256,7 +252,6 @@ } window.clearJobsCache = clearJobsCache; - const progressBar = document.getElementById('progressBar'); const searchBox = document.getElementById('searchBox'); const resultsEl = document.getElementById('results'); const filtersPanel = document.getElementById('filtersPanel'); @@ -350,20 +345,8 @@ } loadVersion(); - let progTimer=null; - function startProgress(){ - progressBar.style.width='0%'; - if(progTimer) clearInterval(progTimer); - let simulatedProg=0; - progTimer=setInterval(()=>{ - if(simulatedProg<65){ simulatedProg+=0.8; progressBar.style.width=Math.min(65,simulatedProg).toFixed(1)+'%'; } - },150); - } - function finishProgress(){ if(progTimer) clearInterval(progTimer); progressBar.style.width='100%'; setTimeout(()=>{progressBar.parentElement.classList.add('hidden');},400); } - // --- Fetch all jobs --- async function fetchAllJobs(){ - startProgress(); clearJobsCache('Loading…'); let page=1, totalItems=0; try{ @@ -379,14 +362,10 @@ // Apply filters on the currently loaded pages so initial results reflect preferences immediately. applyFiltersAndRender(); - if(progTimer) clearInterval(progTimer); - const realProg=Math.min(95, Math.floor((jobsCache.length / Math.max(1,totalItems)) * 95)); - progressBar.style.width=realProg+'%'; if(jobsCache.length >= totalItems || items.length===0) break; page++; } - finishProgress(); - }catch(err){ finishProgress(); alert('Failed to fetch jobs: '+err.message); console.error(err);} + }catch(err){ alert('Failed to fetch jobs: '+err.message); console.error(err);} } function renderInitialBatch(jobs){ diff --git a/nohup.out b/nohup.out new file mode 100644 index 0000000..81601f1 --- /dev/null +++ b/nohup.out @@ -0,0 +1,95 @@ +file:///home/admin/Job-Info/node_modules/hono/dist/adapter/bun/ssg.js:3 +var { write } = Bun; + ^ + +ReferenceError: Bun is not defined + at file:///home/admin/Job-Info/node_modules/hono/dist/adapter/bun/ssg.js:3:17 + at ModuleJob.run (node:internal/modules/esm/module_job:413:25) + at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:654:26) + at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:101:5) + +Node.js v25.2.1 +[dotenv@17.2.3] injecting env (0) from .env -- tip: ⚙️ override existing env vars with { override: true } +Started server: http://localhost:3000 +[job-files] Request received +[getGraphToken] Header token: NONE +[getGraphToken] Env token: NOT SET +[getGraphToken] Using: NONE +[job-files] No token found +[job-files] Request received +[getGraphToken] Header token: NONE +[getGraphToken] Env token: NOT SET +[getGraphToken] Using: NONE +[job-files] No token found +[job-files] Request received +[getGraphToken] Header token: eyJ0eXAiOiJKV1QiLCJu... +[getGraphToken] Env token: NOT SET +[getGraphToken] Using: eyJ0eXAiOiJKV1QiLCJu... +[job-files] Token found: eyJ0eXAiOiJKV1QiLCJu... +[job-files] Link: https://czflex.sharepoint.com/:f:/s/Team/IgDPpHWv5q5qT4doe96ablfoAY46huDKF2eBDSmsG0zrmH0 +[job-files] Request received +[getGraphToken] Header token: eyJ0eXAiOiJKV1QiLCJu... +[getGraphToken] Env token: NOT SET +[getGraphToken] Using: eyJ0eXAiOiJKV1QiLCJu... +[job-files] Token found: eyJ0eXAiOiJKV1QiLCJu... +[job-files] Link: https://czflex.sharepoint.com/:f:/s/Team/IgDPpHWv5q5qT4doe96ablfoAY46huDKF2eBDSmsG0zrmH0 +[job-files] Request received +[getGraphToken] Header token: eyJ0eXAiOiJKV1QiLCJu... +[getGraphToken] Env token: NOT SET +[getGraphToken] Using: eyJ0eXAiOiJKV1QiLCJu... +[job-files] Token found: eyJ0eXAiOiJKV1QiLCJu... +[job-files] Link: https://czflex.sharepoint.com/:f:/s/Team/IgDPpHWv5q5qT4doe96ablfoAY46huDKF2eBDSmsG0zrmH0 +[job-files] Request received +[getGraphToken] Header token: eyJ0eXAiOiJKV1QiLCJu... +[getGraphToken] Env token: NOT SET +[getGraphToken] Using: eyJ0eXAiOiJKV1QiLCJu... +[job-files] Token found: eyJ0eXAiOiJKV1QiLCJu... +[job-files] Link: https://czflex.sharepoint.com/:f:/s/Team/IgDPpHWv5q5qT4doe96ablfoAY46huDKF2eBDSmsG0zrmH0 +[job-files] Request received +[getGraphToken] Header token: eyJ0eXAiOiJKV1QiLCJu... +[getGraphToken] Env token: NOT SET +[getGraphToken] Using: eyJ0eXAiOiJKV1QiLCJu... +[job-files] Token found: eyJ0eXAiOiJKV1QiLCJu... +[job-files] Link: https://czflex.sharepoint.com/:f:/s/Team/IgDPpHWv5q5qT4doe96ablfoAY46huDKF2eBDSmsG0zrmH0 +[job-files] Request received +[getGraphToken] Header token: eyJ0eXAiOiJKV1QiLCJu... +[getGraphToken] Env token: NOT SET +[getGraphToken] Using: eyJ0eXAiOiJKV1QiLCJu... +[job-files] Token found: eyJ0eXAiOiJKV1QiLCJu... +[job-files] Link: https://czflex.sharepoint.com/:f:/s/Team/IgDPpHWv5q5qT4doe96ablfoAY46huDKF2eBDSmsG0zrmH0 +[job-files] Request received +[getGraphToken] Header token: eyJ0eXAiOiJKV1QiLCJu... +[getGraphToken] Env token: NOT SET +[getGraphToken] Using: eyJ0eXAiOiJKV1QiLCJu... +[job-files] Token found: eyJ0eXAiOiJKV1QiLCJu... +[job-files] Link: https://czflex.sharepoint.com/:f:/s/Team/IgDPpHWv5q5qT4doe96ablfoAY46huDKF2eBDSmsG0zrmH0 +[job-files] Request received +[getGraphToken] Header token: eyJ0eXAiOiJKV1QiLCJu... +[getGraphToken] Env token: NOT SET +[getGraphToken] Using: eyJ0eXAiOiJKV1QiLCJu... +[job-files] Token found: eyJ0eXAiOiJKV1QiLCJu... +[job-files] Link: https://czflex.sharepoint.com/:f:/s/Team/IgDPpHWv5q5qT4doe96ablfoAY46huDKF2eBDSmsG0zrmH0 +[job-files] Request received +[getGraphToken] Header token: eyJ0eXAiOiJKV1QiLCJu... +[getGraphToken] Env token: NOT SET +[getGraphToken] Using: eyJ0eXAiOiJKV1QiLCJu... +[job-files] Token found: eyJ0eXAiOiJKV1QiLCJu... +[job-files] Link: https://czflex.sharepoint.com/:f:/s/Team/IgDPpHWv5q5qT4doe96ablfoAY46huDKF2eBDSmsG0zrmH0 +[job-files] Request received +[getGraphToken] Header token: eyJ0eXAiOiJKV1QiLCJu... +[getGraphToken] Env token: NOT SET +[getGraphToken] Using: eyJ0eXAiOiJKV1QiLCJu... +[job-files] Token found: eyJ0eXAiOiJKV1QiLCJu... +[job-files] Link: https://czflex.sharepoint.com/:f:/s/Team/IgDPpHWv5q5qT4doe96ablfoAY46huDKF2eBDSmsG0zrmH0 +[job-files] Request received +[getGraphToken] Header token: eyJ0eXAiOiJKV1QiLCJu... +[getGraphToken] Env token: NOT SET +[getGraphToken] Using: eyJ0eXAiOiJKV1QiLCJu... +[job-files] Token found: eyJ0eXAiOiJKV1QiLCJu... +[job-files] Link: https://czflex.sharepoint.com/:f:/s/Team/IgDPpHWv5q5qT4doe96ablfoAY46huDKF2eBDSmsG0zrmH0 +[job-files] Request received +[getGraphToken] Header token: eyJ0eXAiOiJKV1QiLCJu... +[getGraphToken] Env token: NOT SET +[getGraphToken] Using: eyJ0eXAiOiJKV1QiLCJu... +[job-files] Token found: eyJ0eXAiOiJKV1QiLCJu... +[job-files] Link: https://czflex.sharepoint.com/:f:/s/Team/IgDPpHWv5q5qT4doe96ablfoAY46huDKF2eBDSmsG0zrmH0