feat(modernization): promote deferred routes to in-scope and unify page header styles

Promote /tables, /excel-query, /query-tool, /mid-section-defect from
deferred to full shell-governed in-scope routes with canonical redirects,
content contracts, governance artifacts, and updated CI gates.

Unify all page header gradients to #667eea → #764ba2 and h1 font-size
to 24px for visual consistency across all dashboard pages. Remove
Native Route-View dev annotations from job-query, excel-query, and
query-tool headers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
egg
2026-02-12 13:20:06 +08:00
parent 0ed69ce326
commit c38b5f646a
67 changed files with 1073 additions and 252 deletions

View File

@@ -303,10 +303,15 @@ class TestMesApiUsageInTemplates(unittest.TestCase):
self.assertTrue('MesApi.get' in html or '/static/dist/wip-detail.js' in html)
def test_tables_page_uses_mesapi_or_vite_module(self):
response = self.client.get('/tables')
html = response.data.decode('utf-8')
response, final_response, html = _get_response_and_html(self.client, '/tables')
self.assertTrue('MesApi.post' in html or '/static/dist/tables.js' in html)
if response.status_code == 302:
self.assertTrue(response.location.endswith('/portal-shell/tables'))
self.assertEqual(final_response.status_code, 200)
self.assertIn('/static/dist/portal-shell.js', html)
else:
self.assertEqual(response.status_code, 200)
self.assertTrue('MesApi.post' in html or '/static/dist/tables.js' in html)
def test_resource_page_uses_mesapi_or_vite_module(self):
response, final_response, html = _get_response_and_html(self.client, '/resource')
@@ -324,11 +329,16 @@ class TestMesApiUsageInTemplates(unittest.TestCase):
)
def test_query_tool_page_uses_vite_module(self):
response = self.client.get('/query-tool')
html = response.data.decode('utf-8')
response, final_response, html = _get_response_and_html(self.client, '/query-tool')
self.assertIn('/static/dist/query-tool.js', html)
self.assertIn('type="module"', html)
if response.status_code == 302:
self.assertTrue(response.location.endswith('/portal-shell/query-tool'))
self.assertEqual(final_response.status_code, 200)
self.assertIn('/static/dist/portal-shell.js', html)
else:
self.assertEqual(response.status_code, 200)
self.assertIn('/static/dist/query-tool.js', html)
self.assertIn('type="module"', html)
def test_tmtt_defect_page_uses_vite_module(self):
response, final_response, html = _get_response_and_html(self.client, '/tmtt-defect')
@@ -377,6 +387,9 @@ class TestViteModuleIntegration(unittest.TestCase):
'/resource-history': '/portal-shell/resource-history',
'/job-query': '/portal-shell/job-query',
'/tmtt-defect': '/portal-shell/tmtt-defect',
'/tables': '/portal-shell/tables',
'/excel-query': '/portal-shell/excel-query',
'/query-tool': '/portal-shell/query-tool',
}
for endpoint, asset in endpoints_and_assets: