gabriel / musehub public
refactor BREAKING task/frontend-src-structure #1 / 1
gabriel · 169 days ago · Apr 10, 2026 · Diff

refactor: move frontend source from static/js+scss to src/ts+scss

TypeScript and SCSS source files no longer live inside static/. static/ is for compiled artifacts only — files that are ready to serve.

- src/ts/ — TypeScript source (compiled to static/app.js via esbuild) - src/scss/ — SCSS source (compiled to static/app.css via sass) - static/ — compiled output only; no source files

Also deleted 4 dead page modules with no corresponding templates: commit.ts, graph.ts, insights.ts, view.ts — removed their imports and registrations from app.ts. Bundle shrank by 124kb.

Fixed all pre-existing TypeScript errors: - Removed conflicting declare global block from explore.ts - Added initRepoNav and authHeaders to the canonical Window interface in musehub.ts

Updated: package.json, tsconfig.json, AGENTS.md, docs/guides/frontend-assets.md.

sha256:fbd6a93ed2655fba7e9652d8c3449c2c7720bfdd59a72c301365dfce38658a6f sha
+2 ~7 −158 symbols
sha256:655a0798f27212455517f61f0831123bd2eb7c1c4ee65105f4e316ff09af72c8 snapshot
+2
symbols added
~7
symbols modified
−158
symbols removed
0
dead code introduced
Semantic Changes 167 symbols
+ src
+ src/ts
− AnalysisEmotion class class AnalysisEmotion L42–42
− AnalysisKey class class AnalysisKey L39–39
− AnalysisMeter class class AnalysisMeter L41–41
− AnalysisTempo class class AnalysisTempo L40–40
− Comment class class Comment L824–830
− CommitData class class CommitData L27–35
− CommitObj class class CommitObj L25–25
− CommitPageCfg class class CommitPageCfg L14–21
− CommitPageData class class CommitPageData L76–78
− CtxData variable variable CtxData L727–727
− DimData class class DimData L37–37
− Issue variable variable Issue L628–628
− Proposal variable variable Proposal L627–627
− Session variable variable Session L629–629
− Track class class Track L23–23
− WaveSurferInstance class class WaveSurferInstance L44–53
− Window class class Window L56–73
− apiFetch function function apiFetch L106–108
− artifactHtml function function artifactHtml L297–374
− avatarColor function function avatarColor L133–137
− avatarHtml function function avatarHtml L139–143
− buildArtifactSections function function buildArtifactSections L376–414
− buildBeforeAfterAudio function function buildBeforeAfterAudio L447–472
− buildChildLinks function function buildChildLinks L479–485
− buildInlinePlayer function function buildInlinePlayer L211–254
− buildProseSummary function function buildProseSummary L507–537
− closeCompose function function closeCompose L766–769
− commentHtml function function commentHtml L840–862
− copyToClipboard function function copyToClipboard L114–120
− currentUsername function function currentUsername L122–131
− deleteComment function async_function deleteComment L937–946
− dimBadge function function dimBadge L287–293
− esc function function esc L105–105
− fmtDate function function fmtDate L109–109
− fmtRelative function function fmtRelative L110–110
− getExt function function getExt L377–377
− hydrateImages function async_function hydrateImages L416–425
− iapFmtTime function function iapFmtTime L145–150
− iapLoad function function iapLoad L154–209
− iapSeek function function iapSeek L268–274
− iapSetVolume function function iapSetVolume L276–279
− iapSwitchTrack function function iapSwitchTrack L281–283
− iapTogglePlay function function iapTogglePlay L256–266
− initCommit function function initCommit L1304–1319
− load function async_function load L1027–1300
− loadAiSummary function async_function loadAiSummary L722–751
− loadComments function async_function loadComments L880–904
− loadCrossReferences function async_function loadCrossReferences L616–703
− loadMuseTagsPanel function async_function loadMuseTagsPanel L539–614
− openCompose function function openCompose L755–764
− parseInstruments function function parseInstruments L427–436
− playerCard function function playerCard L449–461
− renderComments function function renderComments L832–838
− renderCommitBody function function renderCommitBody L438–445
− renderScorePreviews function function renderScorePreviews L705–718
− replyHtml function function replyHtml L864–878
− section function function section L389–395
− sendCompose function async_function sendCompose L771–820
− setupEventDelegation function function setupEventDelegation L967–1023
− showReplyForm function function showReplyForm L948–963
− submitComment function async_function submitComment L906–935
− tagBadges function function tagBadges L474–477
− tagPill function function tagPill L487–505
− DagData class class DagData L36–36
− DagEdge class class DagEdge L35–35
− DagNode class class DagNode L17–34
− GraphCfg class class GraphCfg L15–15
− GraphPageData class class GraphPageData L55–60
− Layout class class Layout L170–177
− SessionEntry class class SessionEntry L37–37
− SessionMap class class SessionMap L38–38
− SsrDagData class class SsrDagData L49–53
− SsrDagNode class class SsrDagNode L41–48
− Window class class Window L63–68
− applySearch function function applySearch L1003–1025
− buildLayout function function buildLayout L179–208
− buildSessionMap function function buildSessionMap L1150–1161
− clampView function function clampView L279–285
− colorFor function function colorFor L128–133
− commitType function function commitType L135–139
− draw function function draw L745–778
− drawBackground function function drawBackground L311–326
− drawEdges function function drawEdges L352–418
− drawLabel function function drawLabel L571–677
− drawLaneStripes function function drawLaneStripes L330–348
− drawMinimap function function drawMinimap L681–741
− drawNode function function drawNode L420–548
− drawPill function function drawPill L550–569
− el function function el L909–909
− hexToRgb function function hexToRgb L164–166
− hexToRgba function function hexToRgba L157–162
− hideTooltip function function hideTooltip L888–891
− hitTest function function hitTest L289–307
− initGraph function function initGraph L1250–1256
− load function async_function load L1189–1246
− nodeSemanticColor function function nodeSemanticColor L141–146
− nodeX function function nodeX L268–268
− nodeY function function nodeY L269–269
− normaliseSsrDag function function normaliseSsrDag L1165–1187
− populateSidebar function function populateSidebar L895–999
− resizeCanvas function function resizeCanvas L245–264
− scheduleRedraw function function scheduleRedraw L234–241
− screenToWorld function function screenToWorld L273–275
− scrollToHead function function scrollToHead L1029–1037
− setText function function setText L910–910
− showTooltip function function showTooltip L782–886
− timeAgo function function timeAgo L148–155
− wireCanvas function function wireCanvas L1041–1146
− worldToScreen function function worldToScreen L270–272
− BlastNode class class BlastNode L545–551
− CommitEntry class class CommitEntry L21–29
− InsightsData class class InsightsData L53–61
− LanguageEntry class class LanguageEntry L31–38
− SemKV variable variable SemKV L488–488
− SemverCounts class class SemverCounts L46–51
− TypeBar class class TypeBar L40–44
− animateBars function function animateBars L696–715
− animateCountUp function function animateCountUp L717–745
− drawBreakingBlast function function drawBreakingBlast L553–692
− drawCommitDNAArc function function drawCommitDNAArc L431–539
− drawLanguageTreemap function function drawLanguageTreemap L337–426
− drawSemVerTimeline function function drawSemVerTimeline L136–333
− getTip function function getTip L97–104
− hideTip function function hideTip L119–122
− initInsights function function initInsights L749–774
− moveTip function function moveTip L113–117
− panelLabel function function panelLabel L126–129
− showTip function function showTip L106–111
− tick function function tick L732–738
− ChildOp class class ChildOp L22–26
− FileOp class class FileOp L28–33
− PageData class class PageData L49–60
− SlimCommit class class SlimCommit L40–47
− StructuredDelta class class StructuredDelta L35–38
− SymEdge class class SymEdge L82–85
− SymNode class class SymNode L71–80
− WireCommit class class WireCommit L62–69
− activateCommit function async_function activateCommit L578–605
− applyFilter function function applyFilter L457–468
− buildGraph function function buildGraph L169–221
− clearAnalyze function function clearAnalyze L694–701
− clearGraph function function clearGraph L607–615
− detectKind function function detectKind L132–143
− escapeHtml function function escapeHtml L163–165
− highlightImpact function function highlightImpact L436–453
− initView function function initView L705–758
− pill function function pill L502–503
− relativeTime function function relativeTime L151–161
− renderAnalyze function function renderAnalyze L632–692
− renderCommitNav function function renderCommitNav L537–576
− renderGraph function function renderGraph L225–392
− selectNode function function selectNode L472–533
− setMode function function setMode L406–434
− shortLabel function function shortLabel L145–149
− syncModeButtons function function syncModeButtons L396–404
− updateStats function function updateStats L619–628
~ docs/guides/frontend-assets.md .md 2 symbols added, 1 symbol removed, 2 symbols modified
− Source locations section Source locations L20–30
+ Source vs output section Source vs output L5–28
+ Source → output mapping section Source → output mapping L44–54
~ package.json .json
~ tsconfig.json .json
~ src/ts/app.ts .ts moved from musehub/templates/musehub/static/js/app.ts
~ src/ts/musehub.ts .ts moved from musehub/templates/musehub/static/js/musehub.ts; 1 modified
~ Window
~ src/ts/pages/activity.ts .ts moved from musehub/templates/musehub/static/js/pages/activity.ts
~ src/ts/pages/blob.ts .ts moved from musehub/templates/musehub/static/js/pages/blob.ts
~ src/ts/pages/branches.ts .ts moved from musehub/templates/musehub/static/js/pages/branches.ts
~ src/ts/pages/ci-run-detail.ts .ts moved from musehub/templates/musehub/static/js/pages/ci-run-detail.ts
~ src/ts/pages/commit-detail.ts .ts moved from musehub/templates/musehub/static/js/pages/commit-detail.ts
~ src/ts/pages/commits.ts .ts moved from musehub/templates/musehub/static/js/pages/commits.ts
~ src/ts/pages/diff.ts .ts moved from musehub/templates/musehub/static/js/pages/diff.ts
~ src/ts/pages/domain-detail.ts .ts moved from musehub/templates/musehub/static/js/pages/domain-detail.ts
~ src/ts/pages/domains.ts .ts moved from musehub/templates/musehub/static/js/pages/domains.ts
~ src/ts/pages/elicitation-callback.ts .ts moved from musehub/templates/musehub/static/js/pages/elicitation-callback.ts
~ src/ts/pages/explore.ts .ts moved from musehub/templates/musehub/static/js/pages/explore.ts; 1 removed
− Window class class Window L14–18
~ src/ts/pages/feed.ts .ts moved from musehub/templates/musehub/static/js/pages/feed.ts
~ src/ts/pages/issue-detail.ts .ts moved from musehub/templates/musehub/static/js/pages/issue-detail.ts
~ src/ts/pages/issue-list.ts .ts moved from musehub/templates/musehub/static/js/pages/issue-list.ts
~ src/ts/pages/mcp-docs.ts .ts moved from musehub/templates/musehub/static/js/pages/mcp-docs.ts
~ src/ts/pages/new-repo.ts .ts moved from musehub/templates/musehub/static/js/pages/new-repo.ts
~ src/ts/pages/proposal-detail.ts .ts moved from musehub/templates/musehub/static/js/pages/proposal-detail.ts
~ src/ts/pages/proposal-list.ts .ts moved from musehub/templates/musehub/static/js/pages/proposal-list.ts
~ src/ts/pages/release-detail.ts .ts moved from musehub/templates/musehub/static/js/pages/release-detail.ts
~ src/ts/pages/release-list.ts .ts moved from musehub/templates/musehub/static/js/pages/release-list.ts
~ src/ts/pages/repo-page.ts .ts moved from musehub/templates/musehub/static/js/pages/repo-page.ts
~ src/ts/pages/sessions.ts .ts moved from musehub/templates/musehub/static/js/pages/sessions.ts
~ src/ts/pages/settings.ts .ts moved from musehub/templates/musehub/static/js/pages/settings.ts
~ src/ts/pages/symbols.ts .ts moved from musehub/templates/musehub/static/js/pages/symbols.ts
~ src/ts/pages/tags.ts .ts moved from musehub/templates/musehub/static/js/pages/tags.ts
~ src/ts/pages/timeline.ts .ts moved from musehub/templates/musehub/static/js/pages/timeline.ts
~ src/ts/pages/topics.ts .ts moved from musehub/templates/musehub/static/js/pages/topics.ts
~ src/ts/pages/tree.ts .ts moved from musehub/templates/musehub/static/js/pages/tree.ts
~ src/ts/pages/user-profile.ts .ts moved from musehub/templates/musehub/static/js/pages/user-profile.ts
← Older Oldest on task/frontend-src-structure
All commits
Newer → Latest on task/frontend-src-structure

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:fbd6a93ed2655fba7e9652d8c3449c2c7720bfdd59a72c301365dfce38658a6f --body "your comment"