gabriel / musehub public
feat BREAKING task/alpine-csp-migration #2 / 2
gabriel · 165 days ago · Apr 13, 2026 · Diff

feat: migrate Alpine to CSP build, eliminate unsafe-eval from CSP

- Replace alpinejs standard build with @alpinejs/csp v3.15.8 (done in previous session — file already swapped) - Create src/ts/alpine-components.ts: registers tabSwitcher, newRepoForm, and settingsPage components during alpine:init using function references instead of inline expressions — required by CSP build - Add import in app.ts and declare Window.Alpine in musehub.ts - issue_detail.html: x-data="tabSwitcher", method refs (setCliTab etc.), getter refs (showCli/showMcp/showRest, cliClass/mcpClass/restClass) - new_repo.html: collapse x-data to x-data="newRepoForm" (showBranch only); replace Alpine topics widget with TS-managed container + hidden input - new-repo.ts: read topics from #tags-hidden hidden input instead of _x_dataStack (Alpine internal) - settings.html: x-data="settingsPage" with data-initial-section; unroll Jinja nav loop into static links with data-section attrs; replace all inline expressions with method/getter refs (setSection, openArchive, closeArchive, showGeneral, generalNavClass, etc.) - main.py CSP: remove 'unsafe-eval' from script-src

sha256:e09a52a9e00efe297ae9a18c64380f0ef351ad62685ce5f93c9decf8972e8286 sha
+30 ~19 −4 symbols
sha256:2c992f3700ba7d65abc29df7b6a79e0921d4f42dfc4bce8b8bba51d8b4320d8c snapshot
+30
symbols added
~19
symbols modified
−4
symbols removed
0
dead code introduced
Semantic Changes 53 symbols
~ src/ts/alpine-components.ts .ts 26 symbols added
+ AlpineRoot type_alias AlpineRoot L13–13
+ cliClass class method cliClass L30–30
+ closeArchive method method closeArchive L83–83
+ closeDelete method method closeDelete L87–87
+ closeTransfer method method closeTransfer L85–85
+ collaborationNavClass class method collaborationNavClass L75–75
+ dangerNavClass class method dangerNavClass L77–77
+ generalNavClass class method generalNavClass L74–74
+ init method method init L66–69
+ mcpClass class method mcpClass L31–31
+ mergeNavClass class method mergeNavClass L76–76
+ openArchive method method openArchive L82–82
+ openDelete method method openDelete L86–86
+ openTransfer method method openTransfer L84–84
+ restClass class method restClass L32–32
+ setCliTab method method setCliTab L33–33
+ setMcpTab method method setMcpTab L34–34
+ setRestTab method method setRestTab L35–35
+ setSection method method setSection L78–81
+ showCli method method showCli L27–27
+ showCollaboration method method showCollaboration L71–71
+ showDanger method method showDanger L73–73
+ showGeneral method method showGeneral L70–70
+ showMcp method method showMcp L28–28
+ showMerge method method showMerge L72–72
+ showRest method method showRest L29–29
~ musehub/main.py .py 2 symbols modified
~ musehub/templates/musehub/pages/new_repo.html .html 2 symbols added, 2 symbols removed, 4 symbols modified
− section@125 section section@125 L125–162
− template@148 section template@148 L148–155
+ div#tag-input-container section div#tag-input-container L129–131
+ section@107 section section@107 L107–134
~ musehub/templates/musehub/pages/settings.html .html 2 symbols added, 2 symbols removed, 11 symbols modified
− form@243 section form@243 L243–252
− form@264 section form@264 L264–278
+ form@246 section form@246 L246–255
+ form@267 section form@267 L267–281
~ src/ts/musehub.ts .ts 1 symbol modified
~ Window
~ src/ts/pages/new-repo.ts .ts 1 symbol modified

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