gabriel / musehub public
feat BREAKING intel task/phase4-gravity-detail #1 / 1
AI Agent gabriel · 138 days ago · May 3, 2026 · Diff

feat(intel): Phase 4 — /intel/gravity/detail per-symbol detail page

- _depth_bars() pure helper: converts depth_distribution dict to sorted list of {level, count, pct} for proportional bar chart rendering - intel_gravity_detail_page route: GET /intel/gravity/detail?address= resolves symbol from musehub_symbol_intel, builds depth_bars, returns empty-state for unknown/missing address param (never 404) - intel_gravity_detail.html: symbol header strip with kind badge + address link, 4 metric chips (gravity %, direct, transitive, max depth), depth distribution bar chart (one bar per level, CSS width from pct), sparkline summary strip, back link to /intel/gravity list - components/_intel.scss: detail chip, dist-card, dist-bar, sparkline strip visual rules; gravity chip gets spectral gradient fill - pages/_intel.scss: detail header grid, chip row, dist bars layout - 16 new tests P4_01-P4_16: all green (60/60 total)

sha256:be122851ff29051ad60c0a51a84624032f7198ac7b9ad3a8fcad4c67c5d01b21 sha
+40 symbols
sha256:60f2e3d6578f6cf1b717ecd343a5ecdabf952045d731e89a42fba24eb1edf9a7 snapshot
+40
symbols added
0
dead code introduced
Semantic Changes 40 symbols
~ tests/test_phase4_gravity_detail.py .py 38 symbols added
+ TestDepthBarsHelper class class TestDepthBarsHelper L77–110
+ test_P4_01_none_returns_empty method method test_P4_01_none_returns_empty L78–80
+ test_P4_02_empty_dict_returns_empty method method test_P4_02_empty_dict_returns_empty L82–84
+ test_P4_03_single_bucket_is_100pct method method test_P4_03_single_bucket_is_100pct L86–92
+ test_P4_04_max_bucket_is_100_others_proportional method method test_P4_04_max_bucket_is_100_others_proportional L94–100
+ test_P4_05_sorted_by_level_ascending method method test_P4_05_sorted_by_level_ascending L102–105
+ test_P4_06_string_keys_sorted_as_int method method test_P4_06_string_keys_sorted_as_int L107–110
+ TestNavigation class class TestNavigation L215–223
+ test_P4_16_back_link_to_gravity_list method async_method test_P4_16_back_link_to_gravity_list L217–223
+ TestRouteRegistration class class TestRouteRegistration L117–121
+ test_P4_07_detail_route_registered method method test_P4_07_detail_route_registered L118–121
+ TestRouteResponses class class TestRouteResponses L128–155
+ test_P4_08_known_address_returns_200 method async_method test_P4_08_known_address_returns_200 L130–136
+ test_P4_09_unknown_address_returns_200_with_empty_state method async_method test_P4_09_unknown_address_returns_200_with_empty_state L139–146
+ test_P4_10_missing_address_param_returns_200_with_empty_state method async_method test_P4_10_missing_address_param_returns_200_with_empty_state L149–155
+ TestTemplateContent class class TestTemplateContent L162–208
+ test_P4_11_symbol_name_in_html method async_method test_P4_11_symbol_name_in_html L164–170
+ test_P4_12_gravity_pct_formatted_in_html method async_method test_P4_12_gravity_pct_formatted_in_html L173–179
+ test_P4_13_kind_badge_rendered method async_method test_P4_13_kind_badge_rendered L182–188
+ test_P4_14_reach_counts_rendered method async_method test_P4_14_reach_counts_rendered L191–198
+ test_P4_15_one_depth_bar_per_bucket method async_method test_P4_15_one_depth_bar_per_bucket L201–208
+ _ADDRESS variable variable _ADDRESS L43–43
+ _DIST variable variable _DIST L44–44
+ _OWNER variable variable _OWNER L41–41
+ _SLUG variable variable _SLUG L42–42
+ _enc function function _enc L69–70
+ detail_repo function async_function detail_repo L48–49
+ detail_symbol function async_function detail_symbol L53–66
+ AsyncClient import import AsyncClient L29–29
+ AsyncSession import import AsyncSession L30–30
+ MusehubSymbolIntel import import MusehubSymbolIntel L33–33
+ annotations import import annotations L22–22
+ create_repo import import create_repo L34–34
+ fake_id import import fake_id L32–32
+ pytest import import pytest L27–27
+ pytest_asyncio import import pytest_asyncio L28–28
+ quote import import quote L25–25
+ secrets import import secrets L24–24
+ _depth_bars function function _depth_bars L41–52
+ intel_gravity_detail_page function async_function intel_gravity_detail_page L257–315
← Older Oldest on task/phase4-gravity-detail
All commits
Newer → Latest on task/phase4-gravity-detail

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:be122851ff29051ad60c0a51a84624032f7198ac7b9ad3a8fcad4c67c5d01b21 --body "your comment"