Skip to content

Dashboard Phase 1 refresh#31

Merged
Protocol-zero-0 merged 3 commits into
masterfrom
feat/dashboard-refresh
Jun 8, 2026
Merged

Dashboard Phase 1 refresh#31
Protocol-zero-0 merged 3 commits into
masterfrom
feat/dashboard-refresh

Conversation

@Protocol-zero-0

Copy link
Copy Markdown
Contributor

Changed files

  • web/templates/index.html
  • web/static/js/app.js
  • web/static/js/i18n.js
  • web/static/css/style.css
  • web/app.py
  • tests/test_web_app.py

Summary

  • Adds Phase 1 dashboard self-tests for progressive loading, i18n key parity, legacy label removal, folded advanced tabs, dead-code cleanup, and route health.
  • Adds native JS i18n with en/zh dictionaries, navigator.language defaulting, localStorage language persistence, and data-i18n static text application.
  • Keeps the dashboard on the existing Flask + native JS stack while reducing the main sidebar to six primary tabs and moving process views into a collapsed Advanced section.
  • Changes initial dashboard loading to current Overview data first, then idle-loads the overview graph and prefetches inactive tabs into cache.
  • Removes the overwritten Chinese _planned_tracks implementation and the obsolete Chinese renderExperimentGroups function.

Acceptance commands and results

  • .venv/bin/python -m pytest tests/test_web_app.py -q -> 12 passed in 3.63s
  • .venv/bin/python -c "import web.app; print('import ok')" -> import ok
  • DEEPGRAPH_DB_PATH=/tmp/deepgraph-dashboard-refresh-test.db FLASK_APP=web.app .venv/bin/flask run --host 127.0.0.1 --port 5099; then:
    • curl -s -o /tmp/deepgraph-root.out -w "%{http_code}" http://127.0.0.1:5099/ -> 200
    • curl -s -o /tmp/deepgraph-stats.out -w "%{http_code}" http://127.0.0.1:5099/api/stats -> 200
  • rg -n "Paper DB|Pipeline Papers|Paper Ideas|Method x Dataset|Method × Dataset|Taxonomy Map|Opportunity Map|Deep Insight|Deep Insights|IDEA #|RUN #|Main run|Research Paper Generation|Generated Papers|Complete Papers|\bforge\b" web/templates/index.html web/static/js/app.js web/static/js/agenda.js web/static/js/manuscript_routing.js -> no matches
  • .venv/bin/python -m py_compile web/app.py -> passed
  • git diff --check -> passed

Redeploy steps

  1. On host: git fetch && git checkout feat/dashboard-refresh
  2. Leave .env and database untouched; existing configuration and data are preserved.
  3. sudo systemctl restart deepgraph-web
  4. Verify https://deepgraph.sora2.today has a faster first paint, language switching works, and terminology is clean.

Known non-goals

@Protocol-zero-0

Copy link
Copy Markdown
Contributor Author

Follow-up for issue #30 latest comment is implemented on feat/dashboard-refresh.

Changed files:

  • web/templates/index.html
  • web/static/js/app.js
  • web/static/js/i18n.js
  • web/static/js/agenda.js
  • web/static/js/manuscript_routing.js
  • tests/test_web_app.py

Acceptance results:

  • .venv/bin/python -m pytest tests/test_web_app.py -q -> 12 passed in 3.38s
  • .venv/bin/python -c "import web.app; print('import ok')" -> import ok
  • rg -n "Taxonomy Nodes|experiment ideas|PARADIGM|DISCOVERY" web/templates/index.html web/static/js/app.js web/static/js/agenda.js web/static/js/manuscript_routing.js -> no matches
  • i18n key parity check -> en=202 zh=202 equal=True
  • node --check web/static/js/app.js -> passed
  • node --check web/static/js/i18n.js -> passed
  • node --check web/static/js/agenda.js -> passed
  • node --check web/static/js/manuscript_routing.js -> passed
  • Flask endpoint check with DEEPGRAPH_DB_PATH=/tmp/deepgraph-dashboard-refresh-followup.db FLASK_APP=web.app .venv/bin/flask run --host 127.0.0.1 --port 5100:
    • curl -s -o /tmp/deepgraph-followup-root.out -w "%{http_code}" http://127.0.0.1:5100/ -> 200
    • curl -s -o /tmp/deepgraph-followup-stats.out -w "%{http_code}" http://127.0.0.1:5100/api/stats -> 200
  • git diff --check -> passed

Notes:

  • No backend API response fields or semantics were changed.
  • No tabs/features were removed.
  • No frontend framework was introduced.

@Protocol-zero-0

Copy link
Copy Markdown
Contributor Author

i18n follow-up completed on feat/dashboard-refresh at a80eaac.

Changed files:

  • web/static/js/app.js
  • web/templates/index.html
  • web/static/js/agenda.js
  • web/static/js/manuscript_routing.js
  • web/static/js/i18n.js
  • tests/test_web_app.py

Validation:

  • git pull --ff-only origin feat/dashboard-refresh -> already up to date before edits
  • .venv/bin/python -m pytest tests/test_web_app.py -q -> 13 passed in 3.43s
  • .venv/bin/python -c "import web.app; print('import ok')" -> import ok
  • node --check web/static/js/app.js -> pass
  • node --check web/static/js/agenda.js -> pass
  • node --check web/static/js/manuscript_routing.js -> pass
  • node --check web/static/js/i18n.js -> pass
  • independent i18n key alignment check -> i18n keys aligned 402
  • residual grep over the 4 target files for the known labels and No ... yet pattern -> no matches
  • Flask smoke with DEEPGRAPH_DATABASE_URL= and DEEPGRAPH_DB_PATH=/tmp/deepgraph-i18n-check.db on 127.0.0.1:51231 -> / 200, /api/stats 200

@Protocol-zero-0 Protocol-zero-0 marked this pull request as ready for review June 8, 2026 20:46
Copilot AI review requested due to automatic review settings June 8, 2026 20:46
@Protocol-zero-0

Copy link
Copy Markdown
Contributor Author

合并说明(Phase 1 收尾)

线上(deepgraph.joulebeat.com,branch a80eaac)实测核验通过:

非本 PR 范畴(已另开后端单子跟进):页面在真实访问下会卡死,根因是后端两处连接/线程泄漏(/api/events SSE 占线程 + 读接口不结束事务导致 idle in transaction),与本前端 PR 无关。
数据内容中文化(库里英文原文)是产品决策,不在 Phase 1。

审美级重设计见 #19(Phase 2)。

@Protocol-zero-0 Protocol-zero-0 merged commit 2ea5904 into master Jun 8, 2026
3 checks passed

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.

Pull request overview

This PR refreshes the DeepGraph dashboard “Phase 1” frontend experience on the existing Flask + native JS stack by introducing native i18n, simplifying primary navigation, and improving perceived performance via progressive/idle loading—while adding regression tests to enforce terminology cleanup and i18n parity.

Changes:

  • Added native JS i18n (en/zh) with language persistence and data-i18n application across the dashboard UI.
  • Reorganized navigation to six primary tabs with an Advanced collapsible section, and adjusted Overview to defer heavier panels/graphs.
  • Implemented progressive loading + idle prefetch for inactive tabs, plus new tests to lock in Phase 1 behavior and remove legacy labels/dead code.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
web/templates/index.html Adds data-i18n markup, language toggle, and Advanced collapsible sections for nav + Overview.
web/static/js/app.js Implements i18n helper usage, progressive loading/idle prefetch, and terminology updates throughout UI rendering.
web/static/js/i18n.js New i18n dictionary + runtime language selection, persistence, and DOM application.
web/static/js/agenda.js Switches user-facing strings to i18n keys via tr().
web/static/js/manuscript_routing.js Switches user-facing strings/alerts to i18n keys via tr().
web/static/css/style.css Styles language toggle + Advanced nav/panels.
web/app.py Removes duplicate/overwritten _planned_tracks implementation (dead-code cleanup).
tests/test_web_app.py Adds Phase 1 dashboard regression tests (routes, tab layout, i18n parity, legacy-label removal, progressive init).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread web/static/js/app.js
Comment on lines 1810 to +1814
function friendlyAutomationStage(status, stage) {
const key = String(stage || status || '').toLowerCase();
if (key.includes('verification')) return 'Checking novelty';
if (key.includes('research')) return 'Running EvoScientist research';
if (key.includes('review') || key.includes('forge') || key.includes('formal')) return 'Generating experiment plan';
if (key.includes('gpu')) return 'Running on GPU';
if (key.includes('validation') || key.includes('experiment')) return 'Running experiment';
if (key.includes('writing') || key.includes('submission') || key.includes('bundle')) return 'Writing paper';
if (key.includes('blocked')) return 'Blocked';
if (key.includes('failed')) return 'Failed';
if (key.includes('complete')) return 'Complete';
return stage || status || 'Queued';
if (key.includes('verification')) return tr('status.stage.checkingNovelty');
if (key.includes('research')) return tr('status.stage.runningResearch');
if (key.includes('review') || key.includes('formal')) return tr('status.stage.generatingPlan');
Comment thread web/static/js/app.js
Comment on lines 901 to +907
async function loadTaxonomyDropdown() {
if (taxonomyFlat.length > 0) return; // already loaded
taxonomyLoaded = true;
try {
taxonomyFlat = await api('/api/taxonomy');
const sel = el('evidenceNodeSelect');
sel.innerHTML = '<option value="">-- Select a leaf node --</option>';
sel.innerHTML = `<option value="">${esc(tr('evidence.option'))}</option>`;
Comment thread web/templates/index.html
Comment on lines +187 to +189
<div class="processing-list" id="processingList">
<p class="empty-msg" data-i18n="overview.idle"></p>
</div>
Comment thread web/templates/index.html
Comment on lines 301 to 304
</div>
<div class="paper-flow-list" id="generatedPapersList">
<p class="empty-msg">No manuscript runs have been generated yet.</p>
<p class="empty-msg" data-i18n="empty.generated"></p>
</div>
Comment thread web/templates/index.html
\end{document}</textarea>
</details>
<pre id="mrResultView" style="padding:0;font-size:0.74rem;color:var(--text-dim);max-height:360px;overflow:auto;white-space:pre-wrap;">No result yet.</pre>
<pre id="mrResultView" style="padding:0;font-size:0.74rem;color:var(--text-dim);max-height:360px;overflow:auto;white-space:pre-wrap;" data-i18n="manuscript.noResult"></pre>
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.

2 participants