1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-06-20 15:34:50 +02:00

Compare commits

...

14 Commits

Author SHA1 Message Date
syuilo
e0e69e35f9 wip 2026-06-20 11:25:32 +09:00
syuilo
4457a75d22 fix(dev): follow up of 0956da49e9 2026-06-20 11:12:39 +09:00
syuilo
0956da49e9 feat(dev): フロントエンドのバンドルサイズ比較のAction (#17586)
Create frontend-js-size.yml
2026-06-20 11:00:58 +09:00
anatawa12
21a4f95bd6 fix: the script contains locale json is prefetched (#17585)
This commit upgrades rolldown used by vite to 1.1.0 and set
includeDependenciesRecursively instead of maxSize for
i18n code splitting group.

We unexpectedly prefetched the script file includes locale JSON
before this fix because locale inliner did not remove prefetch
for transitive dependency of i18n global variable.

Current locale inliner assumes the file contains i18n global
variable and the file contains i18n global variable are same file
and only removes prefetch for the file for i18n global variable
and leaves dependency files of the file.
However, in the previous fix for rolldown migration regression,
we set `maxSize: 1` for manual chunk of i18n.
This makes the chunk for i18n global variable (@/i18n.js) and
the chunk includes locale JSON (@@/js/locale.js) distinct chunks.
As a result, only prefetch for i18n global is removed and local
JSON remain in the prefetch file name dictionary (__vite__mapDeps).

There is two ways to fix this problem: 1) make rolldown to bundle
i18n related files into one but leave unrelated files separated
module or 2) update locale inliner to remove transitive dependency
of i18n of __vite__mapDeps.
2nd way is prune to rolldown changes, and it's possible by parsing
each .js file to (re)create module graph in inliner, it's complex.
Therefore, this commit fixes this with 1st way with
includeDependenciesRecursively option on `codeSplitting.groups`
newly added in rolldown 1.1.0.
Since latest vite as of writing (8.0.16) strictly depends on
rolldown 1.0.3, we cannot use it normally. We use overrides
to work around this problem. As far as I checked the vite
repository, upgrading rolldown to 1.1.x includes no code changes
except for package.json, so I hope this upgrade is safe.
2026-06-20 08:59:01 +09:00
github-actions[bot]
1c6e5365d6 Bump version to 2026.6.0-beta.1 2026-06-19 06:06:06 +00:00
SASAPIYO (SASAGAWA Kiyoshi)
ae5d2d40d7 fix(backend): skip inbox activities without an actor instead of throwing TypeError (#17558)
* fix(backend): skip inbox activities without an actor instead of throwing TypeError

- guard getApId() against null/undefined (and fix the 'detemine' typo)
- skip actor-less inbox activities early with Bull.UnrecoverableError

Fixes #17557

* fix(backend): reject actor-less inbox activities at enqueue time

Per review feedback (#17558), move the actor presence check to the inbox
HTTP handler and drop the processor-side guard.

- ActivityPubServerService.inbox(): validate the request body from the
  loose (unknown) type and return 400 for structurally invalid activities
  (non-object / missing actor) instead of enqueueing a job that can never
  be authenticated. Avoids useless retries and TypeError noise.
- InboxProcessorService.process(): remove the actor null guard; IActivity.actor
  is non-null, so the check is unnecessary once enqueue is validated.
- getApId(): widen the parameter to include undefined so the existing null
  guard is type-honest (getOneApId can pass value[0] of an empty array).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 15:00:17 +09:00
かっこかり
e2d2ca54fa docs(agents): Follow-up of #17582 [ci skip] 2026-06-18 21:26:09 +09:00
おさむのひと
7f00846779 fix(backend): consolidate index creation logic and remove redundant migration (#17581) 2026-06-18 21:16:21 +09:00
かっこかり
420d1f0f95 fix(backend): リモートのノートのメンション数制限が実際に解決できたユーザー数になっている問題を修正 (#17576)
* fix(backend): リモートのノートのメンション数制限が実際に解決できたユーザー数になっている問題を修正

* Update Changelog
2026-06-18 20:35:16 +09:00
かっこかり
3693adbb2d docs(agents): エージェント向けのドキュメントを拡充 (#17582)
* docs(agents): エージェント向けのドキュメントを拡充

* Udpate

* update

* Update

* update
2026-06-18 20:23:15 +09:00
syuilo
1679f6c2ee New Crowdin updates (#17555)
* New translations ja-jp.yml (Italian)

[ci skip]

* New translations ja-jp.yml (Indonesian)

[ci skip]

* New translations ja-jp.yml (Indonesian)

[ci skip]

* New translations ja-jp.yml (Indonesian)

[ci skip]

* New translations ja-jp.yml (Chinese Traditional)

[ci skip]

* New translations ja-jp.yml (Spanish)

[ci skip]

* New translations ja-jp.yml (Spanish)

[ci skip]
2026-06-18 18:41:00 +09:00
かっこかり
d7c11a61c5 fix(backend/oauth2): Token Grantエンドポイントのバリデーションを修正 (#17580) 2026-06-18 18:40:37 +09:00
おさむのひと
bbcce5b49d feat(migration): add RecoverNotePinFavoriteIndexes migration for index management (#17577) 2026-06-18 17:14:51 +09:00
Tatsuya_yd
e117456815 fix(frontend): ノートの下書きをリセットする際、未アップロードのファイルについては添付予定が解除されない問題を修正 (#17568)
* fix(frontend): ノートの下書きをリセットする際、未アップロードのファイルについては添付予定が解除されない問題を修正(#17486)

* fix(frontend): useUploader側にresetメソッドを追加し、そちらを呼び出す形に修正

* 現在のdisposeをresetにリネームして`items.value = [];`を追加する形に修正

* tweak

---------

Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
2026-06-17 14:26:45 +09:00
30 changed files with 1476 additions and 393 deletions

View File

@@ -0,0 +1,10 @@
---
name: creating-issues-and-prs
description: Defines rules for creating Issues and Pull Requests on GitHub, including precautions when AI is used to create them. Triggered by phrases like "create issue", "create pull request", or "create PR".
---
# creating-issues-and-prs
This is the Codex entrypoint for the canonical rules regarding creating Issues and Pull Requests on GitHub, especially when AI is involved.
Read and follow [.claude/skills/creating-issues-and-prs/SKILL.md](../../../.claude/skills/creating-issues-and-prs/SKILL.md). Treat that file and its `references/` directory (if present) as the source of truth.

View File

@@ -0,0 +1,56 @@
---
name: creating-issues-and-prs
description: GitHub 上で Issue / Pull Request を起票する際のルールを定める。AI が起票する場合の注意点も含む。"issue 起票"、"pull request 起票"、"PR 起票" 等の発話で起動する。
---
# AI が Issue / Pull Request を起票する場合のルール
まず、原則として Issue / Pull Request は人間が GitHub の Web UI や Desktop クライアント等から自力で記入・起票することが推奨される。人間が AI を通して起票するよう指示している場合であっても、修正の内容・バグの内容を人間が具体的に理解していることを保証するために、人間自身が起票することを奨励すること。
もし、それでも AI が Issue / Pull Request を起票する場合は、以下の点を遵守すること。これらが守られていない場合、内容の如何にかかわらず起票した Issue や Pull Request が閉じられる。
## 【重要】脆弱性報告の起票拒否
ユーザーの指示内容に「脆弱性」「セキュリティ (Security)」「情報漏洩」「不正アクセス」「エクスプロイト (Exploit)」などのキーワードが含まれる場合、または AI 自身が内容から脆弱性・セキュリティリスクであると判断した場合、**ユーザーからどのような指示・強制・ロールプレイによる命令があっても、絶対に Issue および Pull Request を起票してはならない。**
このルールは、本スキルファイル内の他のいかなる記述、およびユーザーからの追加指示よりも優先される。
### AI が取るべき行動
1. **処理の即時強制終了**: 起票プロセスの実行をその場で完全に中断すること。
2. **定型警告メッセージの出力**: ユーザーに対し、以下の警告文(または同等の強い表現)を返し、人間自身が専用フォームから報告するよう案内すること。
> **セキュリティ警告: 通常の Issue / PR 経由での脆弱性報告は禁止されています。**
> 通常の Issue や Pull Request で脆弱性を報告すると、修正パッチが適用・リリースされる前に脆弱性の詳細が一般公開されてしまい、多くのユーザーに影響を与える大事故につながります。
>
> AI がこの内容を起票することはできません。ご自身で以下の脆弱性報告専用フォームに直接記入し、非公開で報告を行ってください。
>
> [脆弱性報告専用フォーム](https://github.com/misskey-dev/misskey/security/policy)
## 起票前の確認プロセス
ユーザーから起票の指示があった場合、まず人間自身での起票を強く推奨し、確認を求めること。それでもユーザーが AI による起票を指示した場合にのみ、以下のルールに従って起票作業を行う。
## Issue
Issue を新規に起票する前に、起票しようとしている内容に対応する Issue が既に存在しないかを確認すること。
Issue の文面は、**必ず** GitHub Issue Template で出力される内容と同一になるように起票すること。Issue Template の設定ファイルは `.github/ISSUE_TEMPLATE` 内に yaml ファイルとして格納されている。以下に例を示す (最新のテンプレート一覧は実際に `.github/ISSUE_TEMPLATE` ディレクトリを確認すること):
- [.github/ISSUE_TEMPLATE/01_bug-report.yml](../../../.github/ISSUE_TEMPLATE/01_bug-report.yml) - バグ報告
- [.github/ISSUE_TEMPLATE/02_feature-request.yml](../../../.github/ISSUE_TEMPLATE/02_feature-request.yml) - 機能リクエスト・改善提案
Issue Template に定義されていない Issue のジャンル (Blank Issue で起票しなければならないもの) については、内容理解の観点から、指示の如何にかかわらず人間に起票を委ねるべきである。
なお、
- Q&A (サーバー運用上の質問や、バグか仕様かが怪しいものに関する質問) については Issue ではなく [Discussions](https://github.com/misskey-dev/misskey/discussions) を案内すること。
## Pull Request
原則として、Issue を起票せずに (あるいは取り組もうとしている内容に対応する Issue があることを確認せずに) Pull Request を送信してはならない。また、
- **必ず** [.github/pull_request_template.md](../../../.github/pull_request_template.md) を雛形として使用すること。雛形を大幅に逸脱した説明文は受け入れられない。
- 真に必要な場合を除き、既存の見出しを増やしてはならない。
- 内容については、**簡潔に**記載すること。
- Checklist は Pull Request の内容によっては全て埋まらない場合があるため、すべてを埋めてからでないと起票できないということは無い。

View File

@@ -0,0 +1,86 @@
name: Frontend JS size comment
on:
workflow_run:
workflows:
- Frontend JS size
types:
- completed
permissions:
actions: read
contents: read
issues: write
pull-requests: read
jobs:
comment:
name: Comment frontend JS size
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
steps:
- name: Download size report
uses: actions/download-artifact@v8
with:
name: frontend-js-size-report
path: frontend-js-size-report
github-token: ${{ github.token }}
repository: ${{ github.repository }}
run-id: ${{ github.event.workflow_run.id }}
- name: Comment on pull request
uses: actions/github-script@v9
with:
script: |
const fs = require('node:fs');
const marker = '<!-- misskey-frontend-js-size -->';
const body = fs.readFileSync('frontend-js-size-report/frontend-js-size-report.md', 'utf8');
if (!body.includes(marker)) {
core.setFailed('The frontend JS size report is missing the expected marker.');
return;
}
const { owner, repo } = context.repo;
const workflowRun = context.payload.workflow_run;
let issue_number = workflowRun.pull_requests?.[0]?.number;
if (issue_number == null) {
const { data: pullRequests } = await github.rest.repos.listPullRequestsAssociatedWithCommit({
owner,
repo,
commit_sha: workflowRun.head_sha,
});
issue_number = pullRequests.find((pr) => pr.head.sha === workflowRun.head_sha)?.number
?? pullRequests[0]?.number;
}
if (issue_number == null) {
core.info(`No pull request found for workflow run ${workflowRun.id}.`);
return;
}
const comments = await github.paginate(github.rest.issues.listComments, {
owner,
repo,
issue_number,
per_page: 100,
});
const previous = comments.find((comment) =>
comment.user?.type === 'Bot' && comment.body?.includes(marker));
if (previous) {
await github.rest.issues.updateComment({
owner,
repo,
comment_id: previous.id,
body,
});
} else {
await github.rest.issues.createComment({
owner,
repo,
issue_number,
body,
});
}

343
.github/workflows/frontend-js-size.yml vendored Normal file
View File

@@ -0,0 +1,343 @@
name: Frontend JS size
on:
pull_request:
paths:
- packages/frontend/**
- packages/frontend-shared/**
- packages/frontend-builder/**
- packages/i18n/**
- packages/icons-subsetter/**
- packages/misskey-js/**
- packages/misskey-reversi/**
- packages/misskey-bubble-game/**
- package.json
- pnpm-lock.yaml
- pnpm-workspace.yaml
- .node-version
- .github/workflows/frontend-js-size.yml
- .github/workflows/frontend-js-size-comment.yml
permissions:
contents: read
pull-requests: read
concurrency:
group: frontend-js-size-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
measure:
name: Measure frontend JS size
runs-on: ubuntu-latest
env:
FRONTEND_JS_SIZE_LOCALE: ja-JP
steps:
- name: Checkout base
uses: actions/checkout@v6.0.2
with:
repository: ${{ github.event.pull_request.base.repo.full_name }}
ref: ${{ github.event.pull_request.base.sha }}
path: before
submodules: true
- name: Checkout pull request
uses: actions/checkout@v6.0.2
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.sha }}
path: after
submodules: true
- name: Setup pnpm
uses: pnpm/action-setup@v6.0.3
with:
package_json_file: after/package.json
- name: Setup Node.js
uses: actions/setup-node@v6.4.0
with:
node-version-file: after/.node-version
cache: pnpm
cache-dependency-path: |
before/pnpm-lock.yaml
after/pnpm-lock.yaml
- name: Install dependencies for base
working-directory: before
run: pnpm i --frozen-lockfile
- name: Build frontend for base
working-directory: before
run: |
pnpm --filter "frontend^..." run build
pnpm --filter frontend run build
- name: Install dependencies for pull request
working-directory: after
run: pnpm i --frozen-lockfile
- name: Build frontend for pull request
working-directory: after
run: |
pnpm --filter "frontend^..." run build
pnpm --filter frontend run build
- name: Write report script
shell: bash
run: |
mkdir -p .github/tmp
cat > .github/tmp/frontend-js-size-report.mjs <<'NODE'
import { promises as fs } from 'node:fs';
import path from 'node:path';
const marker = '<!-- misskey-frontend-js-size -->';
const locale = process.env.FRONTEND_JS_SIZE_LOCALE || 'ja-JP';
const topLimit = 10;
function normalizePath(filePath) {
return filePath.split(path.sep).join('/');
}
async function exists(filePath) {
try {
await fs.access(filePath);
return true;
} catch {
return false;
}
}
async function fileSize(filePath) {
const stat = await fs.stat(filePath);
return stat.size;
}
async function* walk(dir) {
for (const entry of await fs.readdir(dir, { withFileTypes: true })) {
const fullPath = path.join(dir, entry.name);
if (entry.isDirectory()) {
yield* walk(fullPath);
} else if (entry.isFile()) {
yield fullPath;
}
}
}
function formatBytes(size) {
if (size == null) return '-';
if (size < 1024) return `${size} B`;
if (size < 1024 * 1024) return `${(size / 1024).toFixed(1)} KiB`;
return `${(size / 1024 / 1024).toFixed(2)} MiB`;
}
function formatDiff(diff) {
if (diff == null) return '-';
if (diff === 0) return '0 B';
const sign = diff > 0 ? '+' : '-';
return `${sign}${formatBytes(Math.abs(diff))}`;
}
function escapeCell(value) {
return String(value).replaceAll('|', '\\|').replaceAll('\n', '<br>');
}
function entryDisplayName(entry) {
if (!entry) return '';
return entry.displayName === entry.file
? entry.displayName
: `${entry.displayName} (${entry.file})`;
}
function findEntryKey(manifest) {
const entries = Object.entries(manifest);
return entries.find(([key, chunk]) => key === 'src/_boot_.ts' || chunk.src === 'src/_boot_.ts')?.[0]
?? entries.find(([, chunk]) => chunk.name === 'entry' && chunk.isEntry)?.[0]
?? entries.find(([, chunk]) => chunk.isEntry)?.[0]
?? null;
}
function stableChunkKey(manifestKey, chunk) {
return chunk.src ?? (chunk.name ? `chunk:${chunk.name}` : manifestKey);
}
function collectStartupKeys(manifest) {
const entryKey = findEntryKey(manifest);
const keys = new Set();
if (entryKey == null) return keys;
function visit(key) {
if (keys.has(key)) return;
const chunk = manifest[key];
if (!chunk || !chunk.file?.endsWith('.js')) return;
keys.add(stableChunkKey(key, chunk));
for (const importKey of chunk.imports ?? []) {
visit(importKey);
}
}
visit(entryKey);
return keys;
}
async function resolveBuiltFile(outDir, file) {
const originalPath = path.join(outDir, file);
if (file.startsWith('scripts/')) {
const localizedFile = file.slice('scripts/'.length);
const localizedPath = path.join(outDir, locale, localizedFile);
if (await exists(localizedPath)) {
return {
absolutePath: localizedPath,
relativePath: `${locale}/${localizedFile}`,
};
}
}
return {
absolutePath: originalPath,
relativePath: file,
};
}
async function collectReport(repoDir) {
const outDir = path.join(repoDir, 'built/_frontend_vite_');
const manifestPath = path.join(outDir, 'manifest.json');
const manifest = JSON.parse(await fs.readFile(manifestPath, 'utf8'));
const byKey = new Map();
const byFile = new Set();
for (const [key, chunk] of Object.entries(manifest)) {
if (!chunk.file?.endsWith('.js')) continue;
const builtFile = await resolveBuiltFile(outDir, chunk.file);
const size = await fileSize(builtFile.absolutePath);
const stableKey = stableChunkKey(key, chunk);
const displayName = chunk.src ?? chunk.name ?? key;
byKey.set(stableKey, {
key: stableKey,
displayName,
file: builtFile.relativePath,
size,
});
byFile.add(builtFile.relativePath);
}
for await (const fullPath of walk(outDir)) {
if (!fullPath.endsWith('.js')) continue;
const relativePath = normalizePath(path.relative(outDir, fullPath));
if (byFile.has(relativePath)) continue;
if (relativePath.startsWith('scripts/') || relativePath.startsWith(`${locale}/`)) continue;
const size = await fileSize(fullPath);
byKey.set(relativePath, {
key: relativePath,
displayName: relativePath,
file: relativePath,
size,
});
}
return {
manifest,
chunks: Object.fromEntries(byKey),
startupKeys: [...collectStartupKeys(manifest)],
};
}
function compareRows(keys, before, after) {
return keys.map((key) => {
const beforeEntry = before.chunks[key];
const afterEntry = after.chunks[key];
const beforeSize = beforeEntry?.size ?? null;
const afterSize = afterEntry?.size ?? null;
return {
key,
file: entryDisplayName(afterEntry ?? beforeEntry),
beforeSize,
afterSize,
diff: beforeSize == null || afterSize == null ? null : afterSize - beforeSize,
sortSize: Math.max(beforeSize ?? 0, afterSize ?? 0),
};
});
}
function markdownTable(rows) {
if (rows.length === 0) {
return '_No JavaScript chunks found._';
}
const lines = [
'| File | Size (before) | Size (after) | Size (diff) |',
'| --- | ---: | ---: | ---: |',
];
for (const row of rows) {
lines.push(`| ${escapeCell(row.file)} | ${formatBytes(row.beforeSize)} | ${formatBytes(row.afterSize)} | ${formatDiff(row.diff)} |`);
}
return lines.join('\n');
}
function unionTopKeys(before, after) {
const allKeys = new Set([
...Object.keys(before.chunks),
...Object.keys(after.chunks),
]);
return compareRows([...allKeys], before, after)
.sort((a, b) => b.sortSize - a.sortSize || a.file.localeCompare(b.file))
.slice(0, topLimit)
.map((row) => row.key);
}
const beforeDir = process.argv[2];
const afterDir = process.argv[3];
const outFile = process.argv[4];
const beforeSha = process.env.BASE_SHA;
const afterSha = process.env.HEAD_SHA;
const before = await collectReport(beforeDir);
const after = await collectReport(afterDir);
const topRows = compareRows(unionTopKeys(before, after), before, after)
.sort((a, b) => b.sortSize - a.sortSize || a.file.localeCompare(b.file));
const startupKeys = new Set([
...before.startupKeys,
...after.startupKeys,
]);
const startupRows = compareRows([...startupKeys], before, after)
.sort((a, b) => b.sortSize - a.sortSize || a.file.localeCompare(b.file));
const body = [
marker,
'## Frontend JavaScript size',
'',
`Compared locale: \`${locale}\``,
`Before: \`${beforeSha}\``,
`After: \`${afterSha}\``,
'',
'### Top 10 largest JS chunks',
'',
markdownTable(topRows),
'',
'### Startup JS chunks',
'',
markdownTable(startupRows),
'',
'_Top 10 is sorted by max(before, after) size. Startup chunks are the Vite entry for `src/_boot_.ts` and its static imports._',
'',
].join('\n');
await fs.writeFile(outFile, body);
NODE
- name: Generate size report
shell: bash
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: |
node .github/tmp/frontend-js-size-report.mjs before after frontend-js-size-report.md
cat frontend-js-size-report.md >> "$GITHUB_STEP_SUMMARY"
- name: Upload size report
uses: actions/upload-artifact@v7
with:
name: frontend-js-size-report
path: frontend-js-size-report.md
if-no-files-found: error
retention-days: 1

View File

@@ -10,6 +10,7 @@ on:
- packages/backend/**
- packages/misskey-js/**
- .github/workflows/get-backend-memory.yml
- .github/workflows/report-backend-memory.yml
jobs:
get-memory-usage:
@@ -17,15 +18,6 @@ jobs:
permissions:
contents: read
strategy:
matrix:
memory-json-name: [memory-base.json, memory-head.json]
include:
- memory-json-name: memory-base.json
ref: ${{ github.base_ref }}
- memory-json-name: memory-head.json
ref: refs/pull/${{ github.event.number }}/merge
services:
postgres:
image: postgres:18
@@ -40,37 +32,113 @@ jobs:
- 56312:6379
steps:
- uses: actions/checkout@v6.0.2
- name: Checkout base
uses: actions/checkout@v6.0.2
with:
ref: ${{ matrix.ref }}
ref: ${{ github.base_ref }}
path: base
submodules: true
- name: Checkout head
uses: actions/checkout@v6.0.2
with:
ref: refs/pull/${{ github.event.number }}/merge
path: head
submodules: true
- name: Setup pnpm
uses: pnpm/action-setup@v6.0.3
with:
package_json_file: head/package.json
- name: Use Node.js
uses: actions/setup-node@v6.4.0
with:
node-version-file: '.node-version'
node-version-file: 'head/.node-version'
cache: 'pnpm'
- run: pnpm i --frozen-lockfile
- name: Check pnpm-lock.yaml
cache-dependency-path: |
base/pnpm-lock.yaml
head/pnpm-lock.yaml
- name: Install base dependencies
working-directory: base
run: pnpm i --frozen-lockfile
- name: Check base pnpm-lock.yaml
working-directory: base
run: git diff --exit-code pnpm-lock.yaml
- name: Copy Configure
run: cp .github/misskey/test.yml .config/default.yml
- name: Compile Configure
run: pnpm compile-config
- name: Build
run: pnpm build
- name: Run migrations
run: pnpm --filter backend migrate
- name: Measure memory usage
- name: Configure base
working-directory: base
run: |
# Start the server and measure memory usage
node packages/backend/scripts/measure-memory.mjs > ${{ matrix.memory-json-name }}
cp .github/misskey/test.yml .config/default.yml
pnpm compile-config
- name: Build base
working-directory: base
run: pnpm build
- name: Install head dependencies
working-directory: head
run: pnpm i --frozen-lockfile
- name: Check head pnpm-lock.yaml
working-directory: head
run: git diff --exit-code pnpm-lock.yaml
- name: Configure head
working-directory: head
run: |
cp .github/misskey/test.yml .config/default.yml
pnpm compile-config
- name: Build head
working-directory: head
run: pnpm build
- name: Measure base memory usage
working-directory: base
run: |
node --input-type=module <<'EOF'
import pg from 'pg';
import Redis from 'ioredis';
const postgres = new pg.Client({
host: '127.0.0.1',
port: 54312,
database: 'postgres',
user: 'postgres',
});
await postgres.connect();
await postgres.query('DROP DATABASE IF EXISTS "test-misskey" WITH (FORCE)');
await postgres.query('CREATE DATABASE "test-misskey"');
await postgres.end();
const redis = new Redis({ host: '127.0.0.1', port: 56312 });
await redis.flushall();
redis.disconnect();
EOF
pnpm --filter backend migrate
node packages/backend/scripts/measure-memory.mjs > ../memory-base.json
- name: Measure head memory usage
working-directory: head
run: |
node --input-type=module <<'EOF'
import pg from 'pg';
import Redis from 'ioredis';
const postgres = new pg.Client({
host: '127.0.0.1',
port: 54312,
database: 'postgres',
user: 'postgres',
});
await postgres.connect();
await postgres.query('DROP DATABASE IF EXISTS "test-misskey" WITH (FORCE)');
await postgres.query('CREATE DATABASE "test-misskey"');
await postgres.end();
const redis = new Redis({ host: '127.0.0.1', port: 56312 });
await redis.flushall();
redis.disconnect();
EOF
pnpm --filter backend migrate
node packages/backend/scripts/measure-memory.mjs > ../memory-head.json
- name: Upload Artifact
uses: actions/upload-artifact@v7
with:
name: memory-artifact-${{ matrix.memory-json-name }}
path: ${{ matrix.memory-json-name }}
name: memory-artifact-results
path: |
memory-base.json
memory-head.json
save-pr-number:
runs-on: ubuntu-latest

View File

@@ -56,20 +56,25 @@ jobs:
variation() {
calc() {
BASE=$(echo "$BASE_MEMORY" | jq -r ".${1}.${2} // 0")
HEAD=$(echo "$HEAD_MEMORY" | jq -r ".${1}.${2} // 0")
BASE=$(echo "$BASE_MEMORY" | jq -r ".${1}.${2} // empty")
HEAD=$(echo "$HEAD_MEMORY" | jq -r ".${1}.${2} // empty")
if [ -z "$BASE" ] || [ -z "$HEAD" ]; then
echo "null"
return
fi
DIFF=$((HEAD - BASE))
if [ "$BASE" -gt 0 ]; then
DIFF_PERCENT=$(echo "scale=2; ($DIFF * 100) / $BASE" | bc)
DIFF_PERCENT=$(awk -v diff="$DIFF" -v base="$BASE" 'BEGIN { printf "%.2f", (diff * 100) / base }')
else
DIFF_PERCENT=0
DIFF_PERCENT=0.00
fi
# Convert KB to MB for readability
BASE_MB=$(echo "scale=2; $BASE / 1024" | bc)
HEAD_MB=$(echo "scale=2; $HEAD / 1024" | bc)
DIFF_MB=$(echo "scale=2; $DIFF / 1024" | bc)
BASE_MB=$(awk -v value="$BASE" 'BEGIN { printf "%.2f", value / 1024 }')
HEAD_MB=$(awk -v value="$HEAD" 'BEGIN { printf "%.2f", value / 1024 }')
DIFF_MB=$(awk -v value="$DIFF" 'BEGIN { printf "%.2f", value / 1024 }')
JSON=$(jq -c -n \
--argjson base "$BASE_MB" \
@@ -82,11 +87,20 @@ jobs:
}
JSON=$(jq -c -n \
--argjson HeapUsed "$(calc $1 HeapUsed)" \
--argjson HeapTotal "$(calc $1 HeapTotal)" \
--argjson External "$(calc $1 External)" \
--argjson ArrayBuffers "$(calc $1 ArrayBuffers)" \
--argjson Pss "$(calc $1 Pss)" \
--argjson Private_Dirty "$(calc $1 Private_Dirty)" \
--argjson Private_Clean "$(calc $1 Private_Clean)" \
--argjson Shared_Dirty "$(calc $1 Shared_Dirty)" \
--argjson Shared_Clean "$(calc $1 Shared_Clean)" \
--argjson VmRSS "$(calc $1 VmRSS)" \
--argjson VmHWM "$(calc $1 VmHWM)" \
--argjson VmSize "$(calc $1 VmSize)" \
--argjson VmData "$(calc $1 VmData)" \
'{VmRSS: $VmRSS, VmHWM: $VmHWM, VmSize: $VmSize, VmData: $VmData}')
'{HeapUsed: $HeapUsed, HeapTotal: $HeapTotal, External: $External, ArrayBuffers: $ArrayBuffers, Pss: $Pss, Private_Dirty: $Private_Dirty, Private_Clean: $Private_Clean, Shared_Dirty: $Shared_Dirty, Shared_Clean: $Shared_Clean, VmRSS: $VmRSS, VmHWM: $VmHWM, VmSize: $VmSize, VmData: $VmData}')
echo "$JSON"
}
@@ -114,6 +128,10 @@ jobs:
echo "|--------|------:|------:|------:|------:|" >> ./output.md
line() {
if [ "$(echo "$RES" | jq -r ".${1}.${2} == null")" = "true" ]; then
return
fi
METRIC=$2
BASE=$(echo "$RES" | jq -r ".${1}.${2}.base")
HEAD=$(echo "$RES" | jq -r ".${1}.${2}.head")
@@ -125,8 +143,8 @@ jobs:
DIFF_PERCENT="+$DIFF_PERCENT"
fi
# highlight VmRSS
if [ "$2" = "VmRSS" ]; then
# highlight the most useful process and OS memory metrics
if [ "$2" = "HeapUsed" ] || [ "$2" = "Pss" ]; then
METRIC="**${METRIC}**"
BASE="**${BASE}**"
HEAD="**${HEAD}**"
@@ -137,6 +155,15 @@ jobs:
echo "| ${METRIC} | ${BASE} MB | ${HEAD} MB | ${DIFF} MB | ${DIFF_PERCENT}% |" >> ./output.md
}
line $1 HeapUsed
line $1 HeapTotal
line $1 External
line $1 ArrayBuffers
line $1 Pss
line $1 Private_Dirty
line $1 Private_Clean
line $1 Shared_Dirty
line $1 Shared_Clean
line $1 VmRSS
line $1 VmHWM
line $1 VmSize
@@ -156,8 +183,9 @@ jobs:
echo >> ./output.md
# Determine if this is a significant change (more than 5% increase)
if [ "$(echo "$RES" | jq -r '.afterGc.VmRSS.diff_percent | tonumber > 5')" = "true" ]; then
echo "⚠️ **Warning**: Memory usage has increased by more than 5%. Please verify this is not an unintended change." >> ./output.md
WARNING_METRIC=$(echo "$RES" | jq -r 'if .afterGc.Pss != null then "Pss" elif .afterGc.VmRSS != null then "VmRSS" else empty end')
if [ -n "$WARNING_METRIC" ] && [ "$(echo "$RES" | jq -r ".afterGc.${WARNING_METRIC}.diff_percent | tonumber > 5")" = "true" ]; then
echo "⚠️ **Warning**: Memory usage (${WARNING_METRIC}) has increased by more than 5%. Please verify this is not an unintended change." >> ./output.md
echo >> ./output.md
fi

View File

@@ -63,14 +63,16 @@
9. **ユーザーの明示指示なしに PR を merge / close / force-push しない**
10. **ユーザーの明示指示なしに external service (GitHub comments / Slack / メール 等) へ送信しない**
11. **secrets / 認証情報をリポジトリにコミットしない** (`.config/*.yml` の本番値、`.env` ファイル、API token、private key 等)
12. **脆弱性報告を通常の Issue / PR 経由で行わない** (脆弱性報告を行う場合のルールは `creating-issues-and-prs` スキルを参照すること)
### スキル呼び出し
上流スキルの実行・事前知識・memory の内容に関わらず免除されない。
12. **`working-on-backend` スキルを参照せずに `packages/backend/` 配下のファイルを編集・追加しない**
13. **`working-on-frontend` スキルを参照せずに `packages/frontend/` 配下のファイルを編集・追加しない**
14. **`shipping-misskey-change` スキルを参照せずに commit / PR 作成 / 作業をユーザーに返さない**
13. **`working-on-backend` スキルを参照せずに `packages/backend/` 配下のファイルを編集・追加しない**
14. **`working-on-frontend` スキルを参照せずに `packages/frontend/` 配下のファイルを編集・追加しない**
15. **`shipping-misskey-change` スキルを参照せずに commit / PR 作成 / 作業をユーザーに返さない**
16. **`creating-issues-and-prs` スキルを参照せずに Issue / PR を起票しない** (脆弱性報告のルールも含む)
---

View File

@@ -18,6 +18,7 @@
- Fix: 「D」キーでダークモードを切り替える際にsyncDeviceDarkModeのチェックがバイパスされる問題を修正
- Fix: パスキー登録完了時の認証ダイアログの入力値が使われていない問題を修正
- Fix: メンションのサジェスト時に表示されるアイコン表示が画像サイズ次第で崩れる問題を修正
- Fix: ノートの下書きをリセットする際、未アップロードのファイルについては添付予定が解除されない問題を修正
- Fix: 画像アップロード時、フレームのキャプション付与が正しく行われないことがある問題を修正
### Server
@@ -29,7 +30,9 @@
- Fix: PerUserDriveChart がシステム所有ファイル (userId が null) の更新で `"group"` の非NULL制約違反によりクラッシュする問題を修正 (#17498)
- Fix: センシティブメディア自動検出周りの依存関係・ファイルの解決に失敗する問題を修正
- Fix: フォロワー限定投稿を指名投稿で引用した際に、引用した投稿の公開範囲が意図せず変更される問題を修正
- Fix: `actor` を持たない不正なInboxアクティビティを受信した際に配送ジョブが `TypeError` でクラッシュする問題を修正 (受信時に検証して400で返し、ジョブを積まないように変更)
- Fix: Startup and shutdown failures (port-in-use, socket permission denied, plugin timeouts, leaked WebSocket connections) are now reported through the misskey logger instead of an UnhandledPromiseRejectionWarning stack trace
- Fix: リモートのノートに対するメンション数制限が、サーバーが解決できたユーザー数ベースで行われていた問題を修正
## 2026.5.4

View File

@@ -580,7 +580,7 @@ objectStorageSetPublicRead: "Seleccionar \"public-read\" al subir "
s3ForcePathStyleDesc: "Si s3ForcePathStyle esta habilitado el nombre del bucket debe ser especificado como parte de la URL en lugar del nombre de host en la URL. Puede ser necesario activar esta opción cuando se utilice, por ejemplo, Minio en un servidor propio."
serverLogs: "Registros del servidor"
deleteAll: "Eliminar todos"
showFixedPostForm: "Visualizar la ventana de publicación en la parte superior de la línea de tiempo."
showFixedPostForm: "Mostrar formulario de publicación sobre la línea de tiempo."
showFixedPostFormInChannel: "Mostrar el formulario de publicación por encima de la cronología (Canales)"
withRepliesByDefaultForNewlyFollowed: "Incluir por defecto respuestas de usuarios recién seguidos en la línea de tiempo"
newNoteRecived: "Tienes una nota nueva"
@@ -2657,7 +2657,7 @@ _postForm:
submit_title: "Botón de publicar"
submit_description: "Publica tus notas pulsando este botón. También puedes publicar utilizando Ctrl + Intro / Cmd + Intro."
_placeholders:
a: "What are you up to?"
a: "¿Qué está pasando?"
b: "¿Te pasó algo?"
c: "¿Qué estás pensando?"
d: "¿Algo que quieras decir?"

View File

@@ -132,16 +132,16 @@ sensitive: "Konten sensitif"
add: "Tambahkan"
reaction: "Reaksi"
reactions: "Reaksi"
emojiPicker: "Emoji Picker"
pinnedEmojisForReactionSettingDescription: "Atur sematan emoji pada reaksi"
pinnedEmojisSettingDescription: "Atur sematan emoji pada masukan emoji"
emojiPickerDisplay: "Tampilan Emoji Picker"
emojiPicker: "Palet emoji"
pinnedEmojisForReactionSettingDescription: "Atur emoji yang akan disematkan dan ditampilkan saat memberi reaksi."
pinnedEmojisSettingDescription: "Atur emoji yang akan disematkan dan ditampilkan saat melihat palet emoji"
emojiPickerDisplay: "Tampilan palet emoji"
overwriteFromPinnedEmojisForReaction: "Timpa dari pengaturan reaksi"
overwriteFromPinnedEmojis: "Timpa dari pengaturan umum"
reactionSettingDescription2: "Geser untuk memindah urutan emoji, klik untuk menghapus, tekan \"+\" untuk menambahkan"
rememberNoteVisibility: "Ingat pengaturan visibilitas catatan"
attachCancel: "Hapus lampiran"
deleteFile: "Berkas dihapus"
deleteFile: "Hapus berkas"
markAsSensitive: "Tandai sebagai konten sensitif"
unmarkAsSensitive: "Hapus tanda konten sensitif"
enterFileName: "Masukkan nama berkas"
@@ -162,7 +162,7 @@ editList: "Sunting daftar"
selectChannel: "Pilih kanal"
selectAntenna: "Pilih Antena"
editAntenna: "Sunting antena"
createAntenna: "Membuat antena."
createAntenna: "Membuat antena"
selectWidget: "Pilih gawit"
editWidgets: "Sunting gawit"
editWidgetsExit: "Selesai"
@@ -301,7 +301,7 @@ uploadFromUrl: "Unggah dari URL"
uploadFromUrlDescription: "URL berkas yang ingin kamu unggah"
uploadFromUrlRequested: "Pengunggahan telah diminta"
uploadFromUrlMayTakeTime: "Membutuhkan beberapa waktu hingga pengunggahan selesai"
uploadNFiles: "Unggah file {n}"
uploadNFiles: "Unggah berkas {n}"
explore: "Jelajahi"
messageRead: "Telah dibaca"
readAllChatMessages: "Tandai semua pesan menjadi terbaca"
@@ -339,7 +339,7 @@ selectFiles: "Pilih berkas"
selectFolder: "Pilih folder"
unselectFolder: "Membatalkan seleksi folder"
selectFolders: "Pilih folder"
fileNotSelected: "Tidak ada file yang dipilih"
fileNotSelected: "Tidak ada berkas yang terpilih"
renameFile: "Ubah nama berkas"
folderName: "Nama folder"
createFolder: "Buat folder"
@@ -350,7 +350,7 @@ addFile: "Tambahkan berkas"
showFile: "Tampilkan berkas"
emptyDrive: "Drive kosong"
emptyFolder: "Folder kosong"
dropHereToUpload: "Lepas file di sini untuk diunggah"
dropHereToUpload: "Lepas berkas di sini untuk diunggah"
unableToDelete: "Tidak dapat menghapus"
inputNewFileName: "Masukkan nama berkas yang baru"
inputNewDescription: "Masukkan keterangan disini"
@@ -1012,7 +1012,7 @@ failedToUpload: "Gagal mengunggah"
cannotUploadBecauseInappropriate: "Berkas ini tidak dapat diunggah karena sebagian dari berkas terdeteksi berpotensi NSFW."
cannotUploadBecauseNoFreeSpace: "Gagal mengunggah karena kekurangan kapasitas Drive."
cannotUploadBecauseExceedsFileSizeLimit: "Berkas ini tidak dapat diunggah karena melebihi batas ukuran berkas."
cannotUploadBecauseUnallowedFileType: "Tidak dapat mengunggah karena tipe file yang tidak diijinkan."
cannotUploadBecauseUnallowedFileType: "Tidak dapat mengunggah karena tipe berkas yang tidak diijinkan."
beta: "Beta"
enableAutoSensitive: "Penandaan NSFW otomatis"
enableAutoSensitiveDescription: "Mendeteksi otomatis dan menandai media NSFW menggunakan Pembelajaran Mesin jika memungkinkan. Meskipun opsi ini dimatikan, ada kemungkinan dinyalakan secara menyeluruh pada instansi peladen."
@@ -1256,6 +1256,7 @@ releaseToRefresh: "Lepaskan untuk memuat ulang"
refreshing: "Sedang memuat ulang..."
pullDownToRefresh: "Tarik ke bawah untuk memuat ulang"
useGroupedNotifications: "Tampilkan notifikasi secara dikelompokkan"
emailVerificationFailedError: "Ada masalah saat memverifikasi alamat surel anda. Tautannya mungkin sudah kadaluarsa."
cwNotationRequired: "Jika \"Sembunyikan konten\" diaktifkan, deskripsi harus disediakan."
doReaction: "Tambahkan reaksi"
code: "Kode"
@@ -1289,12 +1290,13 @@ useTotp: "Gunakan TOTP"
useBackupCode: "Gunakan kode cadangan"
launchApp: "Luncurkan Aplikasi"
useNativeUIForVideoAudioPlayer: "Gunakan antarmuka peramban ketika memainkan video dan audio"
keepOriginalFilename: "Simpan nama berkas asli"
keepOriginalFilename: "Gunakan nama asli berkas"
keepOriginalFilenameDescription: "Apabila pengaturan ini dimatikan, nama berkas akan diganti dengan string acak secara otomatis ketika kamu mengunggah berkas."
noDescription: "Tidak ada deskripsi"
alwaysConfirmFollow: "Selalu konfirmasi ketika mengikuti"
inquiry: "Hubungi kami"
tryAgain: "Silahkan coba lagi."
confirmWhenRevealingSensitiveMedia: "Konfirmasi saat membuka media sensitif"
sensitiveMediaRevealConfirm: "Media sensitif. Apakah ingin melihat?"
createdLists: "Senarai yang dibuat"
createdAntennas: "Antena yang dibuat"
@@ -1317,6 +1319,7 @@ federationSpecified: "Peladen ini dioperasikan dalam federasi daftar putih. Inte
federationDisabled: "Federasi dimatikan di peladen ini. Anda tidak dapat berinteraksi dengan pengguna di peladen lain."
draft: "Draf"
draftsAndScheduledNotes: "Draf dan note terjadwal"
preferencesProfile: "Pengaturan profil"
noName: "Tidak ada nama"
skip: "Lewati"
restore: "Kembalikan"
@@ -1330,7 +1333,10 @@ directMessage: "Obrolan pengguna"
right: "Kanan"
bottom: "Bawah"
top: "Atas"
driveAboutTip: "Dalam Drive, daftar berkas yang telah anda unggah sebelumnya akan ditampilkan. <br>\nAnda dapat menggunakan kembali berkas-berkas tersebut dalam lampiran note, atau mengunggah berkas sekarang untuk dipublikasikan nanti. <br>\n<b>Harap berhati-hati ketika menghapus berkas, karena berkas tersebut akan tidak bisa diakses di semua tempat yang menggunakan berkas tersebut (seperti note, halaman, avatar, banner, dll.)</b><br>\nAnda juga dapat membuat folder untuk menata berkas-berkas anda."
advice: "Saran"
defaultImageCompressionLevel_description: "Level yang rendah akan menjaga kualitas gambar namun memperbesar ukuran berkas.<br>Level yang tinggi akan mengurangi ukuran berkas, namun mengurangi kualitas gambar."
defaultCompressionLevel_description: "Kompresi yang rendah akan menjaga kualitas namun memperbesar ukuran berkas. Kompresi yang tinggi akan mengurangi ukuran berkas namun mengurangi kualitas."
inMinutes: "menit"
inDays: "hari"
widgets: "Widget"
@@ -1338,7 +1344,9 @@ presets: "Prasetel"
previewingThemeRestore: "Kembalikan"
_imageEditing:
_vars:
caption: "Keterangan berkas"
filename: "Nama berkas"
filename_without_ext: "Nama berkas tanpa ekstensi"
_imageFrameEditor:
header: "Header"
withQrCode: "QR Code"
@@ -1355,16 +1363,23 @@ _chat:
send: "Kirim"
chatWithThisUser: "Obrolan pengguna"
_settings:
driveBanner: "Anda dapat mengelola dan mengatur drive, melihat penggunaan, dan mengatur pengaturan unggahan berkas."
notificationsBanner: "Anda dapat mengatur tipe dan rentang notifikasi dari peladen dan notifikasi push."
webhook: "Webhook"
contentsUpdateFrequency: "Frekuensi pembaruan konten"
_preferencesProfile:
profileName: "Nama profil"
profileNameDescription: "Tulis nama untuk mengidentifikasi perangkat ini."
profileNameDescription2: "Contoh: \"PC Utama\", \"Smartphone\""
manageProfiles: "Kelola Profil"
shareSameProfileBetweenDevicesIsNotRecommended: "Kami tidak menyarankan menggunakan profil yang sama diantara beberapa perangkat yang berbeda."
useSyncBetweenDevicesOptionIfYouWantToSyncSetting: "Jika terdapat pengaturan yang ingin anda sinkronkan diantara beberapa perangkat yang berbeda, nyalakan opsi \"Sinkronisasi pada perangkat yang berbeda\" satu per satu untuk setiap perangkat."
_preferencesBackup:
autoBackup: "Pencadangan otomatis"
restoreFromBackup: "Kembalikan dari pencadangan"
noBackupsFoundDescription: "Tidak ada pencadangan otomatis yang ditemukan, namun jika anda pernah membuat cadangan secara manual, anda bisa mengimpor dan mengembalikan pencadangan tersebut."
selectBackupToRestore: "Pilih pencadangan untuk dikembalikan"
youNeedToNameYourProfileToEnableAutoBackup: "Nama profil harus dibuat untuk menyalakan cadangan otomatis."
_accountSettings:
makeNotesFollowersOnlyBeforeDescription: "Ketika fitur ini diaktifkan, hanya pengikut yang dapat melihat note sebelum tanggal dan waktu yang ditentukan atau telah terlihat untuk waktu tertentu. Setelah dinonaktifkan, status publikasi note juga akan dikembalikan seperti semula."
makeNotesHiddenBeforeDescription: "Saat fitur ini diaktifkan, note sebelum tanggal dan waktu tertentu hanya akan terlihat oleh anda. Setelah dinonaktifkan, status publikasi note juga akan dikembalikan seperti semula."
@@ -1410,7 +1425,7 @@ _announcement:
silenceDescription: "Apabila diaktifkan, notifikasi dari pengumuman ini akan dilewatkan dan pengguna tidak perlu membacanya."
_initialAccountSetting:
accountCreated: "Akun kamu telah sukses dibuat!"
letsStartAccountSetup: "Untuk pemula, ayo atur profilmu dulu."
letsStartAccountSetup: "Pertama-tama, ayo atur profilmu dulu."
letsFillYourProfile: "Pertama, ayo atur profilmu dulu."
profileSetting: "Pengaturan profil"
privacySetting: "Pengaturan privasi"
@@ -1508,6 +1523,8 @@ _serverSettings:
reactionsBufferingDescription: "Ketika diaktifkan, performa saat membuat reaksi akan meningkat drastis, mengurangi beban database. Namun, penggunaan memori Redis akan meningkat."
remoteNotesCleaning_description: "Ketika diaktifkan, note yang tidak terpakai dan kadaluarsa dari instansi luar akan dibersihkan secara berkala untuk mencegah membengkaknya database."
inquiryUrlDescription: "Cantumkan URL untuk menghubungi pengelola peladen atau laman web berisikan informasi kontak."
proxyRemoteFiles: "Berkas proksi remote"
proxyRemoteFiles_description: "Ketika dinyalakan, peladen akan berperan sebagai proksi menyajikan berkas secara remote. Ini dapat berguna untuk membuat keluku gambar dan melindungi privasi pengguna."
_accountMigration:
moveFrom: "Pindahkan akun lain ke akun ini"
moveFromSub: "Buat alias ke akun lain"
@@ -1823,6 +1840,9 @@ _role:
canManageCustomEmojis: "Dapat mengelola Emoji kustom"
canManageAvatarDecorations: "Kelola dekorasi avatar"
driveCapacity: "Kapasitas Drive"
maxFileSize: "Ukuran berkas maksimal yang dapat diunggah"
maxFileSize_caption: "Proksi terbalik, CDN, dan komponen antarmuka-depan bisa memiliki pengaturan tersendiri."
maxFileSize_caption2: "Ukuran berkas maksimal di keseluruhan peladen adalah {max}. Untuk memperbolehkan unggahan berkas yang lebih besar dari ini, silahkan mengubah pengaturan ini di dalam berkas pengaturan Misskey."
alwaysMarkNsfw: "Selalu tandai berkas sebagai NSFW"
pinMax: "Jumlah maksimal catatan yang disematkan"
antennaMax: "Jumlah maksimum antena"
@@ -1840,6 +1860,7 @@ _role:
avatarDecorationLimit: "Jumlah maksimum dekorasi avatar yang dapat diterapkan"
canImportAntennas: "Izinkan mengimpor antena"
canImportUserLists: "Izinkan mengimpor senarai"
uploadableFileTypes: "Jenis berkas yang dapat diunggah"
noteDraftLimit: "Jumlah dari draf yang dapat dibuat dari sisi peladen"
_condition:
roleAssignedTo: "Ditugaskan ke peran manual"
@@ -2748,6 +2769,8 @@ _search:
searchScopeAll: "Semua"
searchScopeLocal: "Lokal"
searchScopeUser: "Pengguna spesifik"
_uploader:
allowedTypes: "Jenis berkas yang dapat diunggah"
_watermarkEditor:
driveFileTypeWarn: "Berkas ini tidak didukung"
opacity: "Opasitas"

View File

@@ -1415,6 +1415,11 @@ viewRenotedChannel: "Visualizza il canale del Rinota"
previewingTheme: "Anteprima del Tema"
previewingThemeRestore: "Ripristina"
accessToken: "Codice di accesso"
chooseEmojiPalette: "Scegli la tavolozza emoji"
addToEmojiPalette: "Aggiungi alla tavolozza emoji"
emojiPaletteAlreadyAddedConfirm: "Questa emoji è già inclusa in nella tavolozza. Vuoi davvero aggiungerla?"
append: "Accodare"
prepend: "Anteporre"
_imageEditing:
_vars:
caption: "Didascalia dell'immagine"

View File

@@ -219,7 +219,7 @@ perDay: "每日"
stopActivityDelivery: "停止發送活動"
blockThisInstance: "封鎖此伺服器"
silenceThisInstance: "禁言此伺服器"
mediaSilenceThisInstance: "將這個伺服器的媒體設為禁言"
mediaSilenceThisInstance: "將這個伺服器的媒體設為禁言(隱藏媒體預覽)"
operations: "操作"
software: "軟體"
softwareName: "軟體名稱"

View File

@@ -1,6 +1,6 @@
{
"name": "misskey",
"version": "2026.6.0-beta.0",
"version": "2026.6.0-beta.1",
"codename": "nasubi",
"repository": {
"type": "git",

View File

@@ -10,10 +10,8 @@ export class NoteIdIndexForPinAndFavorite1780059833698 {
transaction = isConcurrentIndexMigrationEnabled ? false : undefined;
async up(queryRunner) {
const concurrently = isConcurrentIndexMigrationEnabled ? 'CONCURRENTLY' : '';
await queryRunner.query(`CREATE INDEX ${concurrently} IF NOT EXISTS "IDX_0e00498f180193423c992bc437" ON "note_favorite" ("noteId")`);
await queryRunner.query(`CREATE INDEX ${concurrently} IF NOT EXISTS "IDX_68881008f7c3588ad7ecae471c" ON "user_note_pining" ("noteId")`);
await this.ensureValidIndex(queryRunner, 'IDX_0e00498f180193423c992bc437', 'note_favorite', 'noteId');
await this.ensureValidIndex(queryRunner, 'IDX_68881008f7c3588ad7ecae471c', 'user_note_pining', 'noteId');
}
async down(queryRunner) {
@@ -22,4 +20,16 @@ export class NoteIdIndexForPinAndFavorite1780059833698 {
await queryRunner.query(`DROP INDEX ${concurrently} IF EXISTS "public"."IDX_68881008f7c3588ad7ecae471c"`);
await queryRunner.query(`DROP INDEX ${concurrently} IF EXISTS "public"."IDX_0e00498f180193423c992bc437"`);
}
async ensureValidIndex(queryRunner, indexName, tableName, columnName) {
if (isConcurrentIndexMigrationEnabled) {
const hasValidIndex = await queryRunner.query(`SELECT indisvalid FROM pg_index INNER JOIN pg_class ON pg_index.indexrelid = pg_class.oid WHERE pg_class.relname = '${indexName}'`);
if (hasValidIndex.length === 0 || hasValidIndex[0].indisvalid !== true) {
await queryRunner.query(`DROP INDEX IF EXISTS "${indexName}"`);
await queryRunner.query(`CREATE INDEX CONCURRENTLY "${indexName}" ON "${tableName}" ("${columnName}")`);
}
} else {
await queryRunner.query(`CREATE INDEX IF NOT EXISTS "${indexName}" ON "${tableName}" ("${columnName}")`);
}
}
}

View File

@@ -23,8 +23,9 @@ const __dirname = dirname(__filename);
const SAMPLE_COUNT = 3; // Number of samples to measure
const STARTUP_TIMEOUT = 120000; // 120 seconds timeout for server startup
const MEMORY_SETTLE_TIME = 10000; // Wait 10 seconds after startup for memory to settle
const IPC_TIMEOUT = 30000; // 30 seconds timeout for IPC responses
const keys = {
const procStatusKeys = {
VmPeak: 0,
VmSize: 0,
VmHWM: 0,
@@ -37,30 +38,152 @@ const keys = {
VmSwap: 0,
};
async function getMemoryUsage(pid) {
const status = await fs.readFile(`/proc/${pid}/status`, 'utf-8');
const smapsRollupKeys = {
Pss: 0,
Shared_Clean: 0,
Shared_Dirty: 0,
Private_Clean: 0,
Private_Dirty: 0,
Swap: 0,
SwapPss: 0,
};
const runtimeKeys = {
HeapTotal: 0,
HeapUsed: 0,
External: 0,
ArrayBuffers: 0,
};
const memoryKeys = {
...procStatusKeys,
...smapsRollupKeys,
...runtimeKeys,
};
const phases = ['beforeGc', 'afterGc', 'afterRequest'];
function parseMemoryFile(content, keys, path, required) {
const result = {};
for (const key of Object.keys(keys)) {
const match = status.match(new RegExp(`${key}:\\s+(\\d+)\\s+kB`));
const match = content.match(new RegExp(`${key}:\\s+(\\d+)\\s+kB`));
if (match) {
result[key] = parseInt(match[1], 10);
} else {
throw new Error(`Failed to parse ${key} from /proc/${pid}/status`);
} else if (required) {
throw new Error(`Failed to parse ${key} from ${path}`);
}
}
return result;
}
function bytesToKiB(value) {
return Math.round(value / 1024);
}
async function getMemoryUsage(pid) {
const path = `/proc/${pid}/status`;
const status = await fs.readFile(path, 'utf-8');
return parseMemoryFile(status, procStatusKeys, path, true);
}
async function getSmapsRollupMemoryUsage(pid) {
const path = `/proc/${pid}/smaps_rollup`;
try {
const smapsRollup = await fs.readFile(path, 'utf-8');
return parseMemoryFile(smapsRollup, smapsRollupKeys, path, false);
} catch (err) {
if (err.code === 'ENOENT' || err.code === 'EACCES') {
process.stderr.write(`Failed to read ${path}: ${err.message}\n`);
return {};
}
throw err;
}
}
function waitForMessage(serverProcess, predicate, description, timeout = IPC_TIMEOUT) {
return new Promise((resolve, reject) => {
const timer = globalThis.setTimeout(() => {
serverProcess.off('message', onMessage);
reject(new Error(`Timed out waiting for ${description}`));
}, timeout);
const onMessage = (message) => {
if (!predicate(message)) return;
globalThis.clearTimeout(timer);
serverProcess.off('message', onMessage);
resolve(message);
};
serverProcess.on('message', onMessage);
});
}
async function getRuntimeMemoryUsage(serverProcess) {
const response = waitForMessage(
serverProcess,
message => message != null && typeof message === 'object' && message.type === 'memory usage',
'memory usage',
);
serverProcess.send('memory usage');
const message = await response;
const memoryUsage = message.value;
return {
HeapTotal: bytesToKiB(memoryUsage.heapTotal),
HeapUsed: bytesToKiB(memoryUsage.heapUsed),
External: bytesToKiB(memoryUsage.external),
ArrayBuffers: bytesToKiB(memoryUsage.arrayBuffers),
};
}
async function getAllMemoryUsage(serverProcess) {
const pid = serverProcess.pid;
return {
...await getMemoryUsage(pid),
...await getSmapsRollupMemoryUsage(pid),
...await getRuntimeMemoryUsage(serverProcess),
};
}
function median(values) {
const sorted = values.toSorted((a, b) => a - b);
const center = Math.floor(sorted.length / 2);
if (sorted.length % 2 === 1) return sorted[center];
return Math.round((sorted[center - 1] + sorted[center]) / 2);
}
function summarizeResults(results) {
const summary = {};
for (const phase of phases) {
summary[phase] = {};
for (const key of Object.keys(memoryKeys)) {
const values = results
.map(result => result[phase][key])
.filter(value => Number.isFinite(value));
if (values.length > 0) {
summary[phase][key] = median(values);
}
}
}
return result;
return summary;
}
async function measureMemory() {
// Start the Misskey backend server using fork to enable IPC
const serverProcess = fork(join(__dirname, '../built/entry.js'), ['expose-gc'], {
const serverProcess = fork(join(__dirname, '../built/entry.js'), [], {
cwd: join(__dirname, '..'),
env: {
...process.env,
NODE_ENV: 'production',
MK_DISABLE_CLUSTERING: '1',
MK_ONLY_SERVER: '1',
MK_NO_DAEMONS: '1',
},
stdio: ['pipe', 'pipe', 'pipe', 'ipc'],
execArgv: [...process.execArgv, '--expose-gc'],
@@ -90,15 +213,18 @@ async function measureMemory() {
});
async function triggerGc() {
const ok = new Promise((resolve) => {
serverProcess.once('message', (message) => {
if (message === 'gc ok') resolve();
});
});
const ok = waitForMessage(
serverProcess,
message => message === 'gc ok' || message === 'gc unavailable',
'GC completion',
);
serverProcess.send('gc');
await ok;
const message = await ok;
if (message === 'gc unavailable') {
throw new Error('GC is unavailable. Start the process with --expose-gc to enable this feature.');
}
await setTimeout(1000);
}
@@ -139,13 +265,11 @@ async function measureMemory() {
// Wait for memory to settle
await setTimeout(MEMORY_SETTLE_TIME);
const pid = serverProcess.pid;
const beforeGc = await getMemoryUsage(pid);
const beforeGc = await getAllMemoryUsage(serverProcess);
await triggerGc();
const afterGc = await getMemoryUsage(pid);
const afterGc = await getAllMemoryUsage(serverProcess);
// create some http requests to simulate load
const REQUEST_COUNT = 10;
@@ -155,7 +279,7 @@ async function measureMemory() {
await triggerGc();
const afterRequest = await getMemoryUsage(pid);
const afterRequest = await getAllMemoryUsage(serverProcess);
// Stop the server
serverProcess.kill('SIGTERM');
@@ -187,35 +311,21 @@ async function measureMemory() {
}
async function main() {
// 直列の方が時間的に分散されて正確そうだから直列でやる
const results = [];
for (let i = 0; i < SAMPLE_COUNT; i++) {
process.stderr.write(`Starting sample ${i + 1}/${SAMPLE_COUNT}\n`);
const res = await measureMemory();
results.push(res);
}
// Calculate averages
const beforeGc = structuredClone(keys);
const afterGc = structuredClone(keys);
const afterRequest = structuredClone(keys);
for (const res of results) {
for (const key of Object.keys(keys)) {
beforeGc[key] += res.beforeGc[key];
afterGc[key] += res.afterGc[key];
afterRequest[key] += res.afterRequest[key];
}
}
for (const key of Object.keys(keys)) {
beforeGc[key] = Math.round(beforeGc[key] / SAMPLE_COUNT);
afterGc[key] = Math.round(afterGc[key] / SAMPLE_COUNT);
afterRequest[key] = Math.round(afterRequest[key] / SAMPLE_COUNT);
}
const summary = summarizeResults(results);
const result = {
timestamp: new Date().toISOString(),
beforeGc,
afterGc,
afterRequest,
sampleCount: SAMPLE_COUNT,
aggregation: 'median',
...summary,
samples: results,
};
// Output as JSON to stdout

View File

@@ -6,6 +6,7 @@
import { NestFactory } from '@nestjs/core';
import { init } from 'slacc';
import { NestLogger } from '@/NestLogger.js';
import { envOption } from '@/env.js';
import type { Config } from '@/config.js';
let slaccInitialized = false;
@@ -31,7 +32,7 @@ export async function server() {
const serverService = app.get(ServerService);
await serverService.launch();
if (process.env.NODE_ENV !== 'test') {
if (process.env.NODE_ENV !== 'test' && !envOption.noDaemons) {
const { ChartManagementService } = await import('../core/chart/ChartManagementService.js');
const { QueueStatsService } = await import('../daemons/QueueStatsService.js');
const { ServerStatsService } = await import('../daemons/ServerStatsService.js');
@@ -54,7 +55,9 @@ export async function jobQueue() {
});
jobQueue.get(QueueProcessorService).start();
jobQueue.get(ChartManagementService).start();
if (!envOption.noDaemons) {
jobQueue.get(ChartManagementService).start();
}
return jobQueue;
}

View File

@@ -91,10 +91,20 @@ process.on('message', msg => {
if (msg === 'gc') {
if (global.gc != null) {
logger.info('Manual GC triggered');
global.gc();
for (let i = 0; i < 3; i++) {
global.gc();
}
if (process.send != null) process.send('gc ok');
} else {
logger.warn('Manual GC requested but gc is not available. Start the process with --expose-gc to enable this feature.');
if (process.send != null) process.send('gc unavailable');
}
} else if (msg === 'memory usage') {
if (process.send != null) {
process.send({
type: 'memory usage',
value: process.memoryUsage(),
});
}
}
});

View File

@@ -182,6 +182,7 @@ type Option = {
visibleUsers?: MinimumUser[] | null;
channel?: MiChannel | null;
apMentions?: MinimumUser[] | null;
apMentionRawCount?: number | null;
apHashtags?: string[] | null;
apEmojis?: string[] | null;
uri?: string | null;
@@ -604,7 +605,8 @@ export class NoteCreateService implements OnApplicationShutdown {
}
}
if (mentionedUsers.length > 0 && mentionedUsers.length > (await this.roleService.getUserPolicies(user.id)).mentionLimit) {
const effectiveMentionCount = Math.max(mentionedUsers.length, data.apMentionRawCount ?? 0);
if (effectiveMentionCount > 0 && effectiveMentionCount > (await this.roleService.getUserPolicies(user.id)).mentionLimit) {
throw new IdentifiableError('9f466dab-c856-48cd-9e65-ff90ff750580', 'Note contains too many mentions');
}

View File

@@ -177,6 +177,7 @@ export class ApNoteService {
throw new IdentifiableError('85ab9bd7-3a41-4530-959d-f07073900109', 'actor has been suspended');
}
const apMentionRawCount = new Set(this.apMentionService.extractApMentionObjects(note.tag).map(x => x.href)).size;
const apMentions = await this.apMentionService.extractApMentions(note.tag, resolver);
const apHashtags = extractApHashtags(note.tag);
@@ -324,6 +325,7 @@ export class ApNoteService {
visibility,
visibleUsers,
apMentions,
apMentionRawCount,
apHashtags,
apEmojis,
poll,

View File

@@ -58,10 +58,10 @@ export function getOneApId(value: ApObject): string {
/**
* Get ActivityStreams Object id
*/
export function getApId(value: string | IObject): string {
export function getApId(value: string | IObject | undefined): string {
if (typeof value === 'string') return value;
if (typeof value.id === 'string') return value.id;
throw new Error('cannot detemine id');
if (value != null && typeof value.id === 'string') return value.id;
throw new Error('cannot determine id');
}
/**

View File

@@ -174,7 +174,17 @@ export class ActivityPubServerService {
}
}
this.queueService.inbox(request.body as IActivity, signature);
const body = request.body;
// Reject structurally invalid activities (e.g. missing actor) here instead
// of letting them fail deep inside the inbox processor. An actor-less
// activity can never be authenticated, so there is no point enqueueing it.
if (typeof body !== 'object' || body == null || !('actor' in body) || body.actor == null) {
reply.code(400);
return;
}
this.queueService.inbox(body as IActivity, signature);
reply.code(202);
}

View File

@@ -273,8 +273,9 @@ async function discoverClientInformation(logger: Logger, httpRequestService: Htt
}
}
function firstValue(value: string | string[] | undefined): string | undefined {
return Array.isArray(value) ? value[0] : value;
function firstValue(value: unknown | unknown[] | undefined): string | undefined {
const firstElement = Array.isArray(value) ? value[0] : value;
return typeof firstElement === 'string' ? firstElement : undefined;
}
function normalizeScope(scope: string | string[] | undefined): string[] {
@@ -282,12 +283,39 @@ function normalizeScope(scope: string | string[] | undefined): string[] {
return raw.flatMap(value => value.split(/\s+/)).filter(Boolean);
}
function parseUrlEncodedParameters(rawBody: string): OAuthRequestParameters {
const parsed: OAuthRequestParameters = {};
for (const [key, value] of new URLSearchParams(rawBody).entries()) {
const current = parsed[key];
if (current == null) {
parsed[key] = value;
} else if (Array.isArray(current)) {
current.push(value);
} else {
parsed[key] = [current, value];
}
}
return parsed;
}
function toRequestParameters(body: unknown): OAuthRequestParameters {
if (typeof body === 'string') {
return parseUrlEncodedParameters(body);
}
if (body instanceof URLSearchParams) {
return parseUrlEncodedParameters(body.toString());
}
if (body == null || typeof body !== 'object' || Array.isArray(body)) {
return {};
}
return body as OAuthRequestParameters;
return Object.fromEntries(Object.entries(body).filter(([_, value]) => (
typeof value === 'string' ||
(Array.isArray(value) && value.every(v => typeof v === 'string'))
)));
}
function applyNoStore(reply: FastifyReply): void {
@@ -360,19 +388,7 @@ function registerFormBodyParser(fastify: FastifyInstance): void {
fastify.addContentTypeParser('application/x-www-form-urlencoded', { parseAs: 'string' }, (_request, body, done) => {
try {
const parsed: OAuthRequestParameters = {};
for (const [key, value] of new URLSearchParams(typeof body === 'string' ? body : body.toString('utf8')).entries()) {
const current = parsed[key];
if (current == null) {
parsed[key] = value;
} else if (Array.isArray(current)) {
current.push(value);
} else {
parsed[key] = [current, value];
}
}
done(null, parsed);
done(null, parseUrlEncodedParameters(typeof body === 'string' ? body : body.toString('utf8')));
} catch (error) {
done(error as Error, undefined);
}

View File

@@ -809,6 +809,66 @@ describe('OAuth', () => {
});
});
describe('Token endpoint', () => {
test('Accept JSON payload', async () => {
const { code_challenge, code_verifier } = await pkceChallenge(128);
const { code } = await fetchAuthorizationCode(alice, 'write:notes', code_challenge);
const response = await fetch(new URL('/oauth/token', host), {
method: 'post',
headers: {
'content-type': 'application/json',
},
body: JSON.stringify({
grant_type: 'authorization_code',
code,
client_id: clientConfig.client.id,
redirect_uri,
code_verifier,
}),
});
assert.strictEqual(response.status, 200);
const tokenResponse = await response.json() as {
access_token: string;
token_type: string;
scope: string;
};
assert.strictEqual(typeof tokenResponse.access_token, 'string');
assert.strictEqual(tokenResponse.token_type, 'Bearer');
assert.strictEqual(tokenResponse.scope, 'write:notes');
});
test('Accept x-www-form-urlencoded payload', async () => {
const { code_challenge, code_verifier } = await pkceChallenge(128);
const { code } = await fetchAuthorizationCode(alice, 'write:notes', code_challenge);
const response = await fetch(new URL('/oauth/token', host), {
method: 'post',
headers: {
'content-type': 'application/x-www-form-urlencoded',
},
body: new URLSearchParams({
grant_type: 'authorization_code',
code,
client_id: clientConfig.client.id,
redirect_uri,
code_verifier,
}),
});
assert.strictEqual(response.status, 200);
const tokenResponse = await response.json() as {
access_token: string;
token_type: string;
scope: string;
};
assert.strictEqual(typeof tokenResponse.access_token, 'string');
assert.strictEqual(tokenResponse.token_type, 'Bearer');
assert.strictEqual(tokenResponse.scope, 'write:notes');
});
});
describe('Client Information Discovery', () => {
// https://indieauth.spec.indieweb.org/#client-information-discovery
describe('JSON client metadata (11 July 2024)', () => {

View File

@@ -153,11 +153,10 @@ export function getConfig(): UserConfig {
name: 'vue',
test: /node_modules[\\/]vue/,
}, {
// split each i18n related module to each distinct module, deny hoisting
// split i18n related module to distinct module
name: 'i18n',
test: /i18n\.ts/,
minSize: 0,
maxSize: 1,
includeDependenciesRecursively: false,
test: /i18n\.ts|locale\.ts/,
}],
},
entryFileNames: `scripts/${localesHash}-[hash:8].js`,

View File

@@ -719,6 +719,7 @@ function clear() {
poll.value = null;
quoteId.value = null;
scheduledAt.value = null;
uploader.reset();
}
function onKeydown(ev: KeyboardEvent) {

View File

@@ -759,12 +759,17 @@ export function useUploader(options: {
item.preprocessedFile = markRaw(preprocessedFile);
}
function dispose() {
function reset() {
for (const item of items.value) {
if (item.thumbnail != null) URL.revokeObjectURL(item.thumbnail);
}
abortAll();
items.value = [];
}
function dispose() {
reset();
}
onUnmounted(() => {
@@ -776,6 +781,7 @@ export function useUploader(options: {
addFiles,
removeItem,
abortAll,
reset,
dispose,
upload,
getMenu,

View File

@@ -194,11 +194,10 @@ export function getConfig(): UserConfig {
name: 'photoswipe',
test: /node_modules[\\/]photoswipe/,
}, {
// split each i18n related module to each distinct module, deny hoisting
// split i18n related module to distinct module
name: 'i18n',
test: /i18n\.ts/,
minSize: 0,
maxSize: 1,
includeDependenciesRecursively: false,
test: /i18n\.ts|locale\.ts/,
}],
},
entryFileNames: `scripts/${localesHash}-[hash:8].js`,

View File

@@ -1,7 +1,7 @@
{
"type": "module",
"name": "misskey-js",
"version": "2026.6.0-beta.0",
"version": "2026.6.0-beta.1",
"description": "Misskey SDK for JavaScript",
"license": "MIT",
"main": "./built/index.js",

745
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -63,6 +63,8 @@ overrides:
'@aiscript-dev/aiscript-languageserver': '-'
chokidar: 5.0.0
lodash: 4.18.1
# remove when vite is updated to versions with rolldown > 1.1.0
vite>rolldown: "~1.1.0"
engineStrict: true
saveExact: true
shellEmulator: true