GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: Stage 6 配布パイプラインのレビュー反映(アップデート URL / dev 分離) by ymnao · Pull Request #20 · ymnao/scripta

Conversation

@ymnao

@ymnao ymnao commented May 8, 2026

Copy link
Copy Markdown
Owner

概要

PR #19 (Stage 6 配布パイプラインの基盤整備) の merge 後に判明した 2 件のレビュー指摘を修正する。

関連 Issue

PR #19 のフォローアップ。

移行 Stage

  • Stage 0: 雛形 + フロント表示確認
  • Stage 1: ファイル I/O
  • Stage 2: ワークスペース・ファイルツリー・ファイル監視
  • Stage 3: 全文検索(ripgrep sidecar)
  • Stage 4: Git Sync
  • Stage 5: OGP / PDF / アップデート
  • Stage 6: 仕上げ・配布・切り替え

変更内容

1. アップデート確認先を current repo に揃える(03b8a6c)

問題: electron/main/ipc/update.ts:14 が https://api.github.com/repos/ymnao/scripta/releases/latest を固定で見にいくが、配布パイプライン (electron-builder.yml の publish / release.yml の gh release upload) は current repo を自動推定するため、release は ymnao/scripta-next に載る。アプリは ymnao/scripta を見にいくので、Stage 6 の「リリース切り替え前にリリースして試す」運用が壊れる。

修正:

  • GITHUB_API_URL を ymnao/scripta-next に変更し、リリース切り替え時に "scripta-next" → "scripta" へ戻すべき箇所として WHY コメントを付与
  • update.test.ts のフィクスチャ URL も一貫性のため揃える(テスト本体ロジックには非影響)
  • release.yml に「electron-updater 配線時には *.zip / *.blockmap / latest*.yml を upload glob と attach glob に追加し、mac.target: zip も復活させる必要がある」TODO コメントを追記。今の手動アップデータ実装には影響しないが、将来 updater へ移ったとき「Release はあるが update metadata がなくて更新できない」状態を防ぐ

2. app.setName("scripta") を packaged 時のみに限定(d86eb59)

問題: PR #19 で追加した app.setName("scripta") を electron/main/index.ts の top-level で無条件実行していたため、pnpm dev の Electron も app.getPath("userData") を旧本番ディレクトリ (~/Library/Application Support/scripta/ 等) に寄せ、electron/main/ipc/settings.ts:144 の settings.json 経由で開発中の sidebar 状態 / workspacePath / window state 操作が本番アプリの設定を汚染し得た。

修正:

  • if (app.isPackaged) { app.setName("scripta"); } で gate
  • 互換維持が必要なのは packaged 配布物だけ。dev 時は package.json:name = "scripta-next" の名前空間に留め、本番設定と分離する
  • コメントにも dev 分離の意図を追記

動作確認

  • pnpm lint (biome check 248 files) green
  • pnpm typecheck (node + web) green
  • pnpm test main project 441 cases pass / update.ts 単体 8 cases pass
  • 実機: pnpm dev で起動して ~/Library/Application Support/scripta-next/ (= dev) と ~/Library/Application Support/scripta/ (= 旧本番) が分離していることを確認
  • 実機: packaged build (pnpm dist) → 起動して userData が ~/Library/Application Support/scripta/ を参照することを確認
  • CI: dummy tag で release workflow を起動し、ymnao/scripta-next の draft Release に成果物が attach されることを確認

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
ymnao and others added 2 commits May 8, 2026 13:46
@ymnao @claude
fix: アップデート確認先を current repo に揃え、updater 配線時の TODO を明示
03b8a6c
update.ts:
- GITHUB_API_URL を ymnao/scripta → ymnao/scripta-next に変更。配布
  パイプライン (electron-builder.yml の publish / release.yml の
  gh release upload) は current repo を自動推定するため、release は
  ymnao/scripta-next に載るがアプリは ymnao/scripta を見にいく状態
  だった。Stage 6 の「切り替え前にリリースして試す」運用ができないため修正
- リリース切り替え時に "scripta-next" → "scripta" へ戻すべき箇所として
  WHY コメントを付与
- update.test.ts のフィクスチャ URL も一貫性のため scripta-next に揃える

release.yml:
- 電子-updater 配線時に *.zip / *.blockmap / latest*.yml を upload glob と
  attach glob に追加すべき旨を TODO コメントで明示。今の手動アップデータ
  実装には影響しないが、updater へ移ったとき「Release はあるのに update
  metadata がなくて更新できない」状態を防ぐ

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@ymnao @claude
fix: app.setName("scripta") を packaged 時のみに限定し dev 環境を分離
d86eb59
トップレベル無条件実行だと pnpm dev の Electron も userData を旧本番
ディレクトリ (~/Library/Application Support/scripta/) に寄せ、
electron/main/ipc/settings.ts の settings.json 経由で開発中の
sidebar 状態 / workspacePath / window state 操作が本番アプリの
設定を汚染し得る。互換維持が必要なのは packaged 配布物だけなので、
app.isPackaged で gate して dev 時は package.json:name の "scripta-next"
名前空間に留める。

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings May 8, 2026 04:47
Copilot started reviewing on behalf of ymnao May 8, 2026 04:47
View session
Copilot AI reviewed May 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ymnao
ymnao merged commit dcbc68b into main May 8, 2026
8 of 9 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@ymnao
ymnao deleted the fix/stage-6-build-pipeline-followups branch May 8, 2026 05:35
ymnao added a commit that referenced this pull request Jun 19, 2026
@ymnao
chore: undici security advisory 9 件を parent>child override で対応 (#201)
095af69
@electron/get / jsdom 経由の undici 7.25.0 と node-gyp 経由の 6.25.0 を
それぞれ patched 版 (^7.28.0 / ^6.27.0) に固定して open alert を解消する。

対象 alert (9 件):
- #10 GHSA-pr7r-676h-xcf6 (medium) — cross-user info disclosure via shared cache whitespace bypass (7.x)
- #11 GHSA-vmh5-mc38-953g (high)   — TLS certificate validation bypass via dropped requestTls in SOCKS5 ProxyAgent (7.x)
- #12 GHSA-35p6-xmwp-9g52 (low)    — HTTP response queue poisoning via keep-alive socket reuse (6.x)
- #13 GHSA-35p6-xmwp-9g52 (low)    — 同上 (7.x)
- #14 GHSA-hm92-r4w5-c3mj (high)   — cross-origin request routing via SOCKS5 proxy pool reuse (7.x)
- #17 GHSA-p88m-4jfj-68fv (medium) — HTTP header injection via Set-Cookie percent-decoding (6.x)
- #18 GHSA-p88m-4jfj-68fv (medium) — 同上 (7.x)
- #19 GHSA-g8m3-5g58-fq7m (low)    — Set-Cookie SameSite downgrade via permissive substring matching (6.x)
- #20 GHSA-g8m3-5g58-fq7m (low)    — 同上 (7.x)

parent 特定:
- `@electron/[email protected]` (electron の devDep transitive) が optionalDep として undici 7.25.0
- `[email protected]` (Vitest の DOM 環境用 devDep) が undici 7.25.0
- `[email protected]` (@electron/rebuild → electron-builder 経由) が undici 6.25.0

実害評価: いずれも build/test time の transitive で本リポ runtime は触らない。
SOCKS5 ProxyAgent / shared cache / 攻撃者制御 Set-Cookie 等の前提を満たさないが、
alert closed 化が目的で patch を適用。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@ymnao
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.