Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
ab73b8a
[skip ci] Update CHANGELOG.md (prepend template)
github-actions[bot] Jun 22, 2026
6d89d47
fix(dev): tweak frontend-bundle-report
syuilo Jun 22, 2026
7a3e034
Merge branch 'develop' of https://github.com/misskey-dev/misskey into…
syuilo Jun 22, 2026
fff87f6
enhance(dev): tweak Frontend Chunk Report
syuilo Jun 22, 2026
5d8c31b
fix(dev): tweak frontend-bundle-report-comment
syuilo Jun 22, 2026
f5806a0
enhance(dev): tweak Frontend Chunk Report
syuilo Jun 22, 2026
d54b948
enhance(dev): tweak Frontend Chunk Report
syuilo Jun 22, 2026
6d11f57
enhance(dev): improve backend memory usage comparison workflow (#17591)
syuilo Jun 23, 2026
09b761e
enhance(dev): tweak report-backend-memory
syuilo Jun 23, 2026
72d91ce
refactor(dev): report-backend-memoryのmarkdown生成ロジックを分離
syuilo Jun 23, 2026
c899aaf
enhance(dev): tweak report-backend-memory
syuilo Jun 23, 2026
cb1d1d6
enhance(dev): tweak report-backend-memory
syuilo Jun 23, 2026
6e4380f
enhance(dev): tweak report-backend-memory
syuilo Jun 23, 2026
544c422
chore(dev): refactor
syuilo Jun 23, 2026
8186742
refactor(dev): unify frontend-bundle-visualizer-report.mjs and fronte…
syuilo Jun 23, 2026
4bacb1b
chore(dev): fix typo
syuilo Jun 23, 2026
05e00e4
refactor(dev): refactor frontend-js-size.mjs
syuilo Jun 23, 2026
2c814ec
chore(dev): tweak frontend-js-size.mjs
syuilo Jun 23, 2026
f703413
chore(dev): tweak frontend-js-size.mjs
syuilo Jun 23, 2026
f6cfe15
chore(dev): tweak frontend-js-size.mjs
syuilo Jun 23, 2026
e77184f
chore(ci): simplify FFmpeg installation in workflows (#17612)
samunohito Jun 24, 2026
3e1a090
fix(dev): tweak frontend-js-size.mjs
syuilo Jun 24, 2026
a27b155
Merge branch 'develop' of https://github.com/misskey-dev/misskey into…
syuilo Jun 24, 2026
e12f97b
enhance(dev): improve Frontend Bundle Report
syuilo Jun 24, 2026
1173550
chore(dev): refactor frontend bundle report
syuilo Jun 24, 2026
59ae380
enhance(dev): improve backend memory usage report (#17608)
syuilo Jun 24, 2026
69ae0c1
chore(dev): tweak frontend-js-size.mjs
syuilo Jun 24, 2026
bfad097
Merge branch 'develop' of https://github.com/misskey-dev/misskey into…
syuilo Jun 24, 2026
4a056bc
chore(dev): tweak backend-memory-report
syuilo Jun 24, 2026
5ab352d
chore(dev): tweak backend-memory-report
syuilo Jun 24, 2026
8dfa900
(test) enhance(dev): improve backend-memory-report
syuilo Jun 24, 2026
83319d1
chore(dev): tweak backend-memory-report
syuilo Jun 24, 2026
351f878
chore(dev): tweak backend-memory-report
syuilo Jun 24, 2026
7b2790e
chore(dev): tweak backend-memory-report
syuilo Jun 24, 2026
fdc2f79
chore(dev): tweak backend-memory-report
syuilo Jun 24, 2026
d008103
chore(dev): tweak frontend-js-size
syuilo Jun 24, 2026
079ec86
chore(dev): tweak frontend-js-size
syuilo Jun 24, 2026
453f38b
chore(dev): tweak backend-memory-report
syuilo Jun 25, 2026
0904855
chore(dev): tweak backend-memory-report
syuilo Jun 25, 2026
2116213
chore(dev): tweak backend-memory-report
syuilo Jun 25, 2026
4d6ad90
chore(dev): tweak frontend-js-size
syuilo Jun 25, 2026
1f4978b
Update frontend-bundle-report.yml
syuilo Jun 25, 2026
e90ef7e
[ci skip] chore(dev): tweak frontend-js-size
syuilo Jun 25, 2026
1c4bcd9
refactor(dev): refactor of backend memory comparison workflow (#17619)
syuilo Jun 25, 2026
faecacc
fix(dev): follow up of 1c4bcd9b32414e826fecdeda89f769d9f383b9b6
syuilo Jun 25, 2026
8a479bd
fix(dev): follow up of 1c4bcd9b32414e826fecdeda89f769d9f383b9b6
syuilo Jun 25, 2026
9785962
fix(dev): follow up of 1c4bcd9b32414e826fecdeda89f769d9f383b9b6
syuilo Jun 25, 2026
aad6ce8
fix(dev): follow up of 1c4bcd9b32414e826fecdeda89f769d9f383b9b6
syuilo Jun 26, 2026
73dca04
chore(dev): refactor workflow js
syuilo Jun 26, 2026
93fd491
refactor(dev): extract heap snapshot logic
syuilo Jun 26, 2026
5cbdbd1
chore(dev): tweak backend-memory-report
syuilo Jun 26, 2026
08ca482
chore(dev): tweak some workflows
syuilo Jun 26, 2026
2747fd0
chore(dev): tweak some workflows
syuilo Jun 26, 2026
a1f995c
fix(dev): fix measure-memory
syuilo Jun 26, 2026
669889f
chore: センシティブ判定を外部サービス扱いにする (#17570)
samunohito Jun 26, 2026
61f734d
Bump version to 2026.6.1-alpha.0
github-actions[bot] Jun 26, 2026
038a2d0
refactor
syuilo Jun 26, 2026
9b32c6f
Merge branch 'develop' of https://github.com/misskey-dev/misskey into…
syuilo Jun 26, 2026
1068c64
feat: コントロールパネルから二要素認証を解除できるように (#17614)
kakkokari-gtyih Jun 26, 2026
8af2579
enhance(frontend): drop pref migration (#17379)
syuilo Jun 26, 2026
3cd772e
Merge branch 'master' into develop
syuilo Jun 26, 2026
a7503c2
chore(deps): update pnpm to v11.8.0 [security] (#17625)
renovate[bot] Jun 27, 2026
8fc3403
chore(dev): clean up unnecessary logs
syuilo Jun 27, 2026
a107cae
chore(dev): clean up unnecessary logs
syuilo Jun 27, 2026
d1cac26
fix(dev): fix typo of report-api-diff.yml
syuilo Jun 27, 2026
1faeb9b
refactor(dev): use actions/download-artifact
syuilo Jun 27, 2026
228beff
chore(dev): tweak backend-memory-report
syuilo Jun 27, 2026
dbbc5fc
chore(dev): clean up unnecessary step
syuilo Jun 27, 2026
e9715aa
enhance(dev): make heap snapshot downloadable
syuilo Jun 27, 2026
cec23e5
enhance(dev): improve heap snapshot analysis (#17628)
syuilo Jun 27, 2026
529c4d4
chore(dev): tweak heap snapshot table
syuilo Jun 27, 2026
554339a
deps: update dependencies (#17631)
kakkokari-gtyih Jun 27, 2026
42ff280
Bump version to 2026.6.1-alpha.1
github-actions[bot] Jun 27, 2026
797dec7
Update CHANGELOG.md
kakkokari-gtyih Jun 27, 2026
ba3fb4a
Merge branch 'master' into develop
kakkokari-gtyih Jun 27, 2026
4f993ce
enhance: Set default Node.js version to v26 (#17623)
kakkokari-gtyih Jun 27, 2026
ffe65ca
Update CHANGELOG.md
kakkokari-gtyih Jun 27, 2026
7544ebf
Update CHANGELOG.md
kakkokari-gtyih Jun 27, 2026
1220f05
Update CHANGELOG.md
kakkokari-gtyih Jun 27, 2026
6193c35
fix: stats API の型に reactionCount が定義されていない問題を修正 (#17634)
kakkokari-gtyih Jun 27, 2026
62f8589
Update CONTRIBUTING.md
syuilo Jun 28, 2026
4daa1ff
chore(deps): 未使用依存パッケージを削除 (#17641)
kakkokari-gtyih Jun 29, 2026
bf88122
chore(deps): update [github actions] update dependencies [ci skip] (#…
renovate[bot] Jun 30, 2026
7e29f04
fix(chat): don't send message while the IME is composing (#17646)
greymoth-jp Jul 1, 2026
174fb43
fix: frontend-embedで見つけた型エラーの修正 (#17650)
samunohito Jul 2, 2026
2d67380
fix(backend): 同名の新規ハッシュタグが複数同時に作成されたとき、DBで発生した競合を適切にハンドリング (#17640)
ihoronir Jul 2, 2026
1eedf04
fix(frontend): デバイスサイズをスマートフォンに固定している場合はページヘッダーのアイコンを常に表示するように (#17590)
kakkokari-gtyih Jul 2, 2026
96d6a09
fix(backend/test): e2e testの固定待ち時間をポーリングに変更 (#17654)
kakkokari-gtyih Jul 3, 2026
97e54a1
fix(frontend): APIキーを指定するいくつかのフォームでautocompleteが発動する問題を修正 (#17655)
kakkokari-gtyih Jul 3, 2026
721b1b0
fix(backend/test): backend e2e test の beforeAll でdispose前にschema drop…
kakkokari-gtyih Jul 3, 2026
c29a3d9
refactor(frontend): MkNote/MkNoteDetailedのロジックを統合 (#17636)
kakkokari-gtyih Jul 3, 2026
5432984
Bump version to 2026.7.0-alpha.0
github-actions[bot] Jul 3, 2026
9f61451
fix: tsconfig.jsonにskipLibCheck: trueを追加する (#17651)
samunohito Jul 3, 2026
eb2c7ff
fix(backend/test): follow-up of #17654 (waitForを他のe2eテストにも展開) (#17659)
kakkokari-gtyih Jul 4, 2026
0f056c4
refactor: Sentry呼び出し個所の抽象化 (#17661)
samunohito Jul 4, 2026
f59bf35
feat: 条件に一致したURLプレビューのサムネイルを隠すことができるように (#17635)
kakkokari-gtyih Jul 4, 2026
c423bf9
Update CHANGELOG.md
kakkokari-gtyih Jul 4, 2026
426f674
fix: frontend-builderのutils.tsが型エラーを起こしていたのを修正 (#17649)
samunohito Jul 4, 2026
00b2cb2
fix(backend/test): streaming.ts e2e の検証不備を修正 (#17663)
kakkokari-gtyih Jul 4, 2026
187610d
fix(frontend): correctly detect isMe in mention (#17664)
Johann150 Jul 4, 2026
97082ef
Update CHANGELOG.md [ci skip]
kakkokari-gtyih Jul 4, 2026
1858d56
fix(frontend): ワードミュートの判定が誤っている問題を修正 (#17668)
kakkokari-gtyih Jul 5, 2026
1d41cb3
perf(frontend): UNIX時計ウィジェットでrequestAnimationFrameを使用するように (#17665)
kakkokari-gtyih Jul 5, 2026
f066c1c
Bump version to 2026.7.0-alpha.1
github-actions[bot] Jul 5, 2026
3817f00
Revert "fix(dev): fix typo of report-api-diff.yml"
syuilo Jul 5, 2026
d4dd02c
feat: Sentryバックエンドの自動計装を個別で無効化出来る仕組みを追加する (#17673)
samunohito Jul 6, 2026
7243bd3
fix: Sentry 使用環境下にて、Misskey が発行した SQL クエリが span に含まれない問題を修正 (#17671)
samunohito Jul 6, 2026
c24ce9b
deps: update dependencies (#17669)
kakkokari-gtyih Jul 6, 2026
03d224a
Bump version to 2026.7.0-alpha.2
github-actions[bot] Jul 6, 2026
c15f93e
fix: Sentry 使用環境下にて、外部送信リクエストへ `sentry-trace` / `baggage` ヘッダが既定で付与され…
samunohito Jul 8, 2026
5590f8b
chore(backend): COOP/COEPヘッダーを送信するテスト用引数
syuilo Jul 8, 2026
b2867eb
fix(frontend): ディレクティブのイベントリスナーがマウント解除後も残る問題を修正 (#17683)
kakkokari-gtyih Jul 8, 2026
9440423
refactor(frontend): フロントエンドのfluent-emojisをemoji-assetsから取ってくるように (#17…
kakkokari-gtyih Jul 8, 2026
9472e72
enhance(frontend/test): frontend e2eをPlaywrightに移行 (#17682)
kakkokari-gtyih Jul 8, 2026
76ab562
fix: follow-up of #17682 [ci skip]
kakkokari-gtyih Jul 8, 2026
059fbaa
fix(frontend/test): follow-up of #17682 of 2 (#17685)
kakkokari-gtyih Jul 8, 2026
2335eb7
chore: pnpm dev時のプロセス管理をより綿密に行い、Windows環境でのプロセス残留を抑止 (#17690)
samunohito Jul 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/commands/harness-audit.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Misskey リポジトリの `.claude/` 構成を 7 カテゴリで採点し、改
| 2 | Context Efficiency | frontmatter description の冗長度、SKILL.md の長さ分布、重複情報、CLAUDE.md の肥大化 |
| 3 | Quality Gates | Stop / PreToolUse / PostToolUse hook の整備、`/quality-gate` 等の完了前ゲートの有無、自動 lint/typecheck |
| 4 | Memory Persistence | `.claude/skills/*/SKILL.md` と `references/` の同期状態を評価。プロジェクト側 `.claude/memory/` は未採用方針 (auto-memory はユーザーホーム側で自動運用) のため、ここを採点起点にせず既定 5/10 から開始する |
| 5 | Eval Coverage | `working-on-backend` / `working-on-frontend` の testing リファレンス (backend-testing.md / frontend-testing.md) の網羅、Misskey 固有の e2e/fed/Storybook/Cypress 適用ガイド |
| 5 | Eval Coverage | `working-on-backend` / `working-on-frontend` の testing リファレンス (backend-testing.md / frontend-testing.md) の網羅、Misskey 固有の e2e/fed/Storybook/Playwright 適用ガイド |
| 6 | Security Guardrails | SPDX 規約適用、migration 不変性ルール、ja-JP.yml 限定編集ルール、secrets 検出 |
| 7 | Cost Efficiency | enabledPlugins の重複・過剰、context-budget の整備、MCP 過剰登録なし |

Expand Down
4 changes: 2 additions & 2 deletions .claude/commands/quality-gate.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ note: 元 ECC 版は言語自動判定 + format/lint/type のジェネリック

`/quality-gate [scope]`

完了前の **軽量** 品質チェック。重い E2E / 連合テスト (test:e2e / test:fed / Cypress) は CI 側で実行されるため、本コマンドには含めない。
完了前の **軽量** 品質チェック。重い E2E / 連合テスト (test:e2e / test:fed / Playwright) は CI 側で実行されるため、本コマンドには含めない。

## Scope

Expand Down Expand Up @@ -120,4 +120,4 @@ Frontend ut: PASS (87/87)

- ジェネリックな言語自動判定を排除し、Misskey 固定 pipeline に。
- formatter フェーズなし (Misskey は ESLint --fix のみ採用)。
- e2e / federation / Cypress は重いため除外し CI 側に委譲。
- e2e / federation / Playwright は重いため除外し CI 側に委譲。
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ cp .github/misskey/test.yml .config/test.yml

補足:

- ルートの `pnpm start:test` (Cypress 用にテストサーバーを起動するコマンド) を使う経路では実行時に `ncp` で自動コピーされる ([package.json](../../../../../package.json))。それ以外で backend テストを直接走らせる時は上記の手動コピーが必要
- ルートの `pnpm start:test` (Playwright 用にテストサーバーを起動するコマンド) を使う経路では実行時に `ncp` で自動コピーされる ([package.json](../../../../../package.json))。それ以外で backend テストを直接走らせる時は上記の手動コピーが必要
- すでに `.config/test.yml` があれば各テストスクリプトの内部 `compile-config` で十分なので、追加で `pnpm --filter backend compile-config` を叩く必要はない
- `pnpm start:test` は backend e2e テスト (`pnpm --filter backend test:e2e`) の前提ではない (ポート競合の元になるため使わないこと)

Expand Down
2 changes: 1 addition & 1 deletion .claude/skills/working-on-frontend/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ SKILL.md 本体は references への索引だけ。具体的な手順や規約
- SCSS Modules / `--MI_THEME-*` `--MI-*` CSS 変数 / グローバル utility class (`_button` 等) → [references/knowledge/scss-modules.md](references/knowledge/scss-modules.md)
- `os.alert` / `os.confirm` / `os.popup` 等 UI ヘルパー (ブラウザ標準 `alert()` 直呼びは禁止) → [references/knowledge/os-api.md](references/knowledge/os-api.md)
- `*.stories.impl.ts` 併設規則 + 複数 story / argTypes / layout / action パターン → [references/knowledge/storybook.md](references/knowledge/storybook.md)
- frontend Vitest / Cypress E2E の書き方と前提 → [references/knowledge/frontend-testing.md](references/knowledge/frontend-testing.md)
- frontend Vitest / Playwright E2E の書き方と前提 → [references/knowledge/frontend-testing.md](references/knowledge/frontend-testing.md)

## 必ず最後に通る場所

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Frontend テスト (Vitest / Cypress)
# Frontend テスト (Vitest / Playwright)

Misskey frontend のテスト構成。

Expand All @@ -13,11 +13,11 @@ pnpm --filter frontend test-and-coverage # カバレッジ付き

- 主な配置: `packages/frontend/test/*.test.ts` (例: `i18n.test.ts`, `theme.test.ts`, `is-birthday.test.ts`)
- ビルドツール周りなど対象コードと隣接させた方が分かりやすいテストは、コードと同じディレクトリに `*.test.ts` として置く (例: [packages/frontend/lib/rollup-plugin-unwind-css-module-class-name.test.ts](../../../../../packages/frontend/lib/rollup-plugin-unwind-css-module-class-name.test.ts))
- 共有コンポーネント (`MkX.vue`) のユニットテストは現状少なく、`*.spec.ts` / `__tests__/` 形式は採用していない (Storybook + Cypress でカバー)
- 共有コンポーネント (`MkX.vue`) のユニットテストは現状少なく、`*.spec.ts` / `__tests__/` 形式は採用していない (Storybook + Playwright でカバー)

## Cypress E2E
## Playwright E2E

Cypress は **起動済みのテストサーバー** に対して走るため、unit より前提が多い。[.github/workflows/test-frontend.yml](../../../../../.github/workflows/test-frontend.yml) の `e2e` ジョブと同じ手順をローカルで踏む:
Playwright は **起動済みのテストサーバー** に対して走るため、unit より前提が多い。[.github/workflows/test-frontend.yml](../../../../../.github/workflows/test-frontend.yml) の `e2e` ジョブと同じ手順をローカルで踏む:

```bash
# 1. テスト用 DB / Redis を起動 (テスト用ポート。開発用の compose.local-db.yml ではない)
Expand All @@ -29,15 +29,14 @@ cp .github/misskey/test.yml .config/test.yml
# 3. 全体ビルド
pnpm build

# 4. テストサーバー起動 + Cypress 実行 (いずれもルートから)
pnpm e2e # 内部で pnpm start:test を起動し http://localhost:61812 を待って Cypress run
pnpm cy:open # 対話的に開く (サーバーは別途 pnpm start:test で起動しておく)
# 4. テストサーバー起動 + Playwright 実行 (いずれもルートから)
pnpm e2e # 内部で pnpm start:test を起動し http://localhost:61812 を待って Playwright を実行
```

- 設定: ルート [cypress.config.ts](../../../../../cypress.config.ts)
- テスト本体は [cypress/](../../../../../cypress/) 配下
- 設定: ルート [packages/frontend/playwright.config.ts](../../../../../packages/frontend/playwright.config.ts) で、`packages/frontend/test/e2e/` 配下の `*.spec.ts` を対象にする
- テスト本体は [packages/frontend/test/e2e/](../../../../../packages/frontend/test/e2e/) 配下に配置する。

新規 frontend 機能の E2E は Cypress に書くのが基本。ただし対象は主要 UI フロー (login / post / drive etc) に限定し、細かい単位テストは Vitest または Storybook で代替する慣習。
新規 frontend 機能の E2E は Playwright に書くのが基本。ただし対象は主要 UI フロー (login / post / drive etc) に限定し、細かい単位テストは Vitest または Storybook で代替する慣習。

## Storybook (視覚確認 + Chromatic 視覚回帰)

Expand All @@ -55,6 +54,6 @@ pnpm --filter frontend build-storybook # 静的ビルド
frontend のテスト種別で DB / Redis の要否が違う:

- **Vitest (unit)** — DB 不要。ロジック / コンポーネント単体のテストで backend に繋がない (CI の `vitest` ジョブにも `services:` は無い)
- **Cypress (E2E)** — テストサーバー (`pnpm start:test`) 経由で backend に繋ぐため DB / Redis が必要。**テスト用ポートの [packages/backend/test/compose.yml](../../../../../packages/backend/test/compose.yml)** を使う (上記 Cypress E2E の手順を参照)
- **Playwright (E2E)** — テストサーバー (`pnpm start:test`) 経由で backend に繋ぐため DB / Redis が必要。**テスト用ポートの [packages/backend/test/compose.yml](../../../../../packages/backend/test/compose.yml)** を使う (上記 Playwright E2E の手順を参照)

開発用の `compose.local-db.yml` (db `5432` / redis `6379`) は **テストには使わない**。テスト用の `packages/backend/test/compose.yml` (`54312` / `56312`) とはポートが異なり、混同すると接続できない。
23 changes: 23 additions & 0 deletions .config/example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,31 @@ id: 'aidx'

#sentryForBackend:
# enableNodeProfiling: true
# # Specify Sentry integration names to disable individual auto-instrumentation.
# # The names are integration .name values, not factory function names.
# # To check enabled names, set `options.debug: true` and see
# # "Integration installed: <name>" in the Sentry logs.
# #
# # As of 2026-07-07 / @sentry/node 10.62.0, useful names for Misskey include:
# # Postgres ... DB queries (when pg is externalized)
# # Redis ... ioredis commands
# # Fastify ... inbound HTTP routes
# # Http ... inbound/outbound HTTP; disabling this can also affect request isolation
# # NodeFetch ... fetch/undici requests
# disabledIntegrations: ['Postgres']
# options:
# dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0'
# # By default, Misskey prevents Sentry trace headers (`sentry-trace` and
# # `baggage`) from being sent to remote ActivityPub/Webhook/etc. hosts.
# # To intentionally propagate distributed traces to trusted internal services,
# # list only those internal URL patterns here.
# # Avoid broad patterns that match remote servers unless you intentionally
# # want to restore Sentry's legacy behavior of propagating traces to all
# # outbound HTTP requests.
# #tracePropagationTargets: []
# # Internal allowlist example:
# #tracePropagationTargets:
# # - 'internal-service.example'

#sentryForFrontend:
# vueIntegration:
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"workspaceFolder": "/workspace",
"features": {
"ghcr.io/devcontainers/features/node:1": {
"version": "22.15.0"
"version": "22.23.1"
},
"ghcr.io/devcontainers-extra/features/pnpm:2": {
"version": "10.10.0"
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ pnpm install --frozen-lockfile
cp .devcontainer/devcontainer.yml .config/default.yml
pnpm build
pnpm migrate
pnpm exec cypress install
pnpm --filter frontend exec playwright install --with-deps chromium
3 changes: 0 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,3 @@ updates:
typescript-eslint:
patterns:
- "@typescript-eslint/*"
tensorflow:
patterns:
- "@tensorflow/*"
2 changes: 1 addition & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
'packages/frontend:test':
- any:
- changed-files:
- any-glob-to-any-file: ['cypress/**/*']
- any-glob-to-any-file: ['packages/frontend/test/**/*']

'packages/sw':
- any:
Expand Down
2 changes: 1 addition & 1 deletion .github/min.node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22.15.0
22.22.2
3 changes: 1 addition & 2 deletions .github/scripts/backend-js-footprint.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const [repoDirArg, outputFileArg] = process.argv.slice(2);
const STARTUP_TIMEOUT = util.readIntegerEnv('MK_JS_FOOTPRINT_STARTUP_TIMEOUT_MS', 120000, 1);
const SETTLE_TIME = util.readIntegerEnv('MK_JS_FOOTPRINT_SETTLE_TIME_MS', 10000, 0);
const REQUEST_COUNT = util.readIntegerEnv('MK_JS_FOOTPRINT_REQUEST_COUNT', 10, 0);
const MAX_TABLE_ITEMS = util.readIntegerEnv('MK_JS_FOOTPRINT_MAX_ITEMS', 20, 1);

const repoDir = resolve(repoDirArg);
const outputFile = resolve(outputFileArg);
Expand Down Expand Up @@ -389,7 +388,7 @@ function summarizeRecords(records, phase) {
stringLiteralKiB: bytesToKiB(totals.stringLiteralBytes),
},
packages: [...packages.values()].toSorted((a, b) => b.sourceBytes - a.sourceBytes),
modules: modules.toSorted((a, b) => b.sourceBytes - a.sourceBytes).slice(0, MAX_TABLE_ITEMS),
modules: modules.toSorted((a, b) => b.sourceBytes - a.sourceBytes),
};
}

Expand Down
26 changes: 15 additions & 11 deletions .github/scripts/backend-memory-report.mts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const metrics = [

function formatMemoryMb(valueKiB: number | null | undefined) {
if (valueKiB == null) return '-';
return `${util.formatNumber(valueKiB / 1024)} MB`;
return `${util.formatNumber(valueKiB / 1000)} MB`;
}

function getMemoryValue(report: MemoryReport, phase: typeof memoryReportPhases[number]['key'], metric: typeof metrics[number]) {
Expand All @@ -79,8 +79,8 @@ function renderMainTableForPhase(base: MemoryReport, head: MemoryReport, phase:
'| --- | ---: | ---: | ---: | ---: | ---: | ---: |',
];

function formatDeltaMemory(diffKiB: number) {
return util.formatColoredDelta(formatMemoryMb(Math.abs(diffKiB)), diffKiB);
function formatDeltaMemory(deltaKiB: number) {
return util.formatColoredDelta(deltaKiB, v => formatMemoryMb(v), 100); // 0.1 MB threshold
}

for (const metric of metrics) {
Expand All @@ -91,7 +91,7 @@ function renderMainTableForPhase(base: MemoryReport, head: MemoryReport, phase:
const headSpread = getSampleSpread(head, phase, metric);
const summary = util.pairedDeltaSummary(base.samples, head.samples, (sample) => getMemoryValueFromSample(sample, phase, metric));
const percent = summary.median * 100 / baseValue;
const deltaMedian = summary == null ? '-' : `${formatDeltaMemory(summary.median)}<br>${util.formatDeltaPercent(percent).replaceAll('\\%', '\\\\%')}`;
const deltaMedian = summary == null ? '-' : `${formatDeltaMemory(summary.median)}<br>${util.formatDeltaPercent(percent, 0.1).replaceAll('\\%', '\\\\%')}`;

lines.push(`| **${metric}** | ${formatMemoryMb(baseValue)} <br> ± ${formatMemoryMb(baseSpread)} | ${formatMemoryMb(headValue)} <br> ± ${formatMemoryMb(headSpread)} | ${deltaMedian} | ${summary?.mad == null ? '-' : formatMemoryMb(summary.mad)} | ${summary == null ? '-' : formatDeltaMemory(summary.min)} | ${summary == null ? '-' : formatDeltaMemory(summary.max)} |`);
}
Expand Down Expand Up @@ -144,7 +144,7 @@ function renderHeapSnapshotSection(base: MemoryReport, head: MemoryReport) {
];

for (const graph of [
heapSnapshotUtil.renderHeapSnapshotSankey(baseHeapSnapshotReport, 'Base'),
//heapSnapshotUtil.renderHeapSnapshotSankey(baseHeapSnapshotReport, 'Base'),
heapSnapshotUtil.renderHeapSnapshotSankey(headHeapSnapshotReport, 'Head'),
]) {
if (graph == null) continue;
Expand Down Expand Up @@ -183,7 +183,7 @@ function renderJsFootprintMetricTable(base: RuntimeLoadedJsFootprintReport, head
const headValue = getJsFootprintValue(head, 'afterRequest', key);
if (baseValue == null || headValue == null) continue;

lines.push(`| **${title}** | ${formatter(baseValue)} | ${formatter(headValue)} | ${util.formatColoredDelta(formatter(headValue - baseValue), headValue - baseValue)} | ${util.calcAndFormatDeltaPercent(baseValue, headValue).replaceAll('\\%', '\\\\%')} |`);
lines.push(`| **${title}** | ${formatter(baseValue)} | ${formatter(headValue)} | ${util.formatColoredDelta(headValue - baseValue, v => formatter(v))} | ${util.calcAndFormatDeltaPercent(baseValue, headValue).replaceAll('\\%', '\\\\%')} |`);
}

return lines.join('\n');
Expand Down Expand Up @@ -278,7 +278,7 @@ function renderLargestPackageIncreases(base: RuntimeLoadedJsFootprintReport, hea
];

for (const packageSummary of increases) {
lines.push(`| ${packageDisplayName(packageSummary)} | ${util.formatBytes(packageSummary.baseSourceBytes)} | ${util.formatBytes(packageSummary.sourceBytes)} | ${util.formatColoredDelta(util.formatBytes(packageSummary.sourceBytes - packageSummary.baseSourceBytes), packageSummary.sourceBytes - packageSummary.baseSourceBytes)} | ${util.formatColoredDelta(util.formatNumber(packageSummary.modules - packageSummary.baseModules), packageSummary.modules - packageSummary.baseModules)} |`);
lines.push(`| ${packageDisplayName(packageSummary)} | ${util.formatBytes(packageSummary.baseSourceBytes)} | ${util.formatBytes(packageSummary.sourceBytes)} | ${util.formatColoredDelta(packageSummary.sourceBytes - packageSummary.baseSourceBytes, v => util.formatBytes(v))} | ${util.formatColoredDelta(packageSummary.modules - packageSummary.baseModules, v => util.formatNumber(v))} |`);
}

return lines.join('\n');
Expand Down Expand Up @@ -374,6 +374,10 @@ if (heapSnapshotSection != null) {
lines.push('');
}

const artifactUrl = process.env.MK_MEMORY_HEAP_SNAPSHOT_ARTIFACT_URL_HEAD!.trim();
lines.push(`[Download representative V8 heap snapshot (head)](${artifactUrl})`);
lines.push('');

const jsFootprintSection = renderJsFootprintSection(baseJsFootprint, headJsFootprint);
if (jsFootprintSection != null) {
lines.push(jsFootprintSection);
Expand Down Expand Up @@ -402,15 +406,15 @@ function isBeyondSampleNoise(base: MemoryReport, head: MemoryReport, phase: type
const headValue = getMemoryValue(head, phase, metric);
if (baseValue == null || headValue == null) return false;

const diff = headValue - baseValue;
if (diff <= 0) return false;
const delta = headValue - baseValue;
if (delta <= 0) return false;

const baseSpread = getSampleSpread(base, phase, metric);
const headSpread = getSampleSpread(head, phase, metric);
if (baseSpread == null || headSpread == null) return true;

const combinedSpread = Math.hypot(baseSpread, headSpread);
return diff > combinedSpread * 3;
return delta > combinedSpread * 3;
}

const warningMetric = getWarningMetric(base, head);
Expand All @@ -420,6 +424,6 @@ if (warningMetric != null && warningDiffPercent != null && warningDiffPercent >
lines.push('');
}

lines.push(`[See workflow logs for details](https://github.com/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID})`);
//lines.push(`[See workflow logs for details](https://github.com/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID})`);

await writeFile(outputFile, `${lines.join('\n')}\n`);
Loading
Loading