summaryrefslogtreecommitdiff
path: root/website/.vitepress
diff options
context:
space:
mode:
authorSho Sakuma <me@m1sk9.dev>2026-06-01 13:58:03 +0900
committerSho Sakuma <me@m1sk9.dev>2026-06-01 13:58:03 +0900
commit04ab6c92a6849e3d2af7439c2f0092324bc8889b (patch)
tree1c82b390468e2baea38456dad459ae8807e53bfa /website/.vitepress
parent8b7ce2853aeca22b6eff61e3faac6fb8671aa17b (diff)
downloadLunaticChat-04ab6c92a6849e3d2af7439c2f0092324bc8889b.tar.gz
LunaticChat-04ab6c92a6849e3d2af7439c2f0092324bc8889b.tar.bz2
LunaticChat-04ab6c92a6849e3d2af7439c2f0092324bc8889b.zip
docs(compatibility): clarify protocol version validation is Velocity-only
Update the compatibility matrix logic and documentation to reflect the actual implementation: only Velocity performs the handshake validation, not Paper. - Remove velocity-too-new and velocity-too-old from CompatibilityResult - Simplify checkCompatibility() to check only if Velocity accepts Paper - Update reason labels to clarify direction (Paper vs Velocity perspective) - Add note distinguishing plugin version from protocol version - Clarify Velocity-only validation in the protocol section - Rewrite compatibility rules from Velocity's perspective Paper only sends the handshake; it does not validate Velocity's version. This aligns documentation with the actual behavior in platform-velocity/.../PluginMessageHandler.kt. Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'website/.vitepress')
-rw-r--r--website/.vitepress/theme/components/CompatibilityMatrix.vue16
-rw-r--r--website/.vitepress/theme/components/useCompatibilityData.ts19
2 files changed, 10 insertions, 25 deletions
diff --git a/website/.vitepress/theme/components/CompatibilityMatrix.vue b/website/.vitepress/theme/components/CompatibilityMatrix.vue
index 0e91edc..9f1910c 100644
--- a/website/.vitepress/theme/components/CompatibilityMatrix.vue
+++ b/website/.vitepress/theme/components/CompatibilityMatrix.vue
@@ -31,10 +31,8 @@ const t = computed(() =>
compatibleShort: 'OK',
compatibilityHeader: 'Compatibility',
reasonMajorMismatch: 'Major version mismatch',
- reasonPaperTooNew: 'Paper newer — update Velocity first',
- reasonVelocityTooNew: 'Velocity newer — update Paper',
- reasonPaperTooOld: 'Paper too old',
- reasonVelocityTooOld: 'Velocity too old',
+ reasonPaperTooNew: 'Paper protocol newer than Velocity — update Velocity first',
+ reasonPaperTooOld: 'Paper protocol older than Velocity accepts',
legend: 'Legend',
legendCompatible: 'Compatible — both can connect.',
legendIncompatible: 'Incompatible — handshake will be rejected.',
@@ -55,10 +53,8 @@ const t = computed(() =>
compatibleShort: 'OK',
compatibilityHeader: '互換性',
reasonMajorMismatch: 'MAJOR バージョン不一致',
- reasonPaperTooNew: 'Paper が新しすぎる — Velocity を先に更新',
- reasonVelocityTooNew: 'Velocity が新しすぎる — Paper を更新',
- reasonPaperTooOld: 'Paper が古すぎる',
- reasonVelocityTooOld: 'Velocity が古すぎる',
+ reasonPaperTooNew: 'Paper のプロトコルが Velocity より新しい — Velocity を先に更新',
+ reasonPaperTooOld: 'Paper のプロトコルが Velocity の許容範囲より古い',
legend: '凡例',
legendCompatible: '互換 — 接続可能.',
legendIncompatible: '非互換 — ハンドシェイクで拒否されます.',
@@ -89,12 +85,8 @@ function reasonLabel(result: CompatibilityResult): string {
return t.value.reasonMajorMismatch;
case 'paper-too-new':
return t.value.reasonPaperTooNew;
- case 'velocity-too-new':
- return t.value.reasonVelocityTooNew;
case 'paper-too-old':
return t.value.reasonPaperTooOld;
- case 'velocity-too-old':
- return t.value.reasonVelocityTooOld;
default:
return '';
}
diff --git a/website/.vitepress/theme/components/useCompatibilityData.ts b/website/.vitepress/theme/components/useCompatibilityData.ts
index 452e8b4..d0de01d 100644
--- a/website/.vitepress/theme/components/useCompatibilityData.ts
+++ b/website/.vitepress/theme/components/useCompatibilityData.ts
@@ -134,25 +134,18 @@ export function useCompatibilityData() {
return { data, loading, error };
}
-export type CompatibilityResult = 'compatible' | 'major-mismatch' | 'paper-too-new' | 'velocity-too-new' | 'paper-too-old' | 'velocity-too-old';
+export type CompatibilityResult = 'compatible' | 'major-mismatch' | 'paper-too-new' | 'paper-too-old';
+// Mirrors the gatekeeping done by Velocity in
+// platform-velocity/.../PluginMessageHandler.kt — Paper does not validate.
export function checkCompatibility(
paper: ProtocolVersion,
velocity: ProtocolVersion,
): CompatibilityResult {
if (paper.major !== velocity.major) return 'major-mismatch';
-
- const paperAcceptsVelocity =
- velocity.minor >= paper.minSupportedMinor && velocity.minor <= paper.minor;
- const velocityAcceptsPaper =
- paper.minor >= velocity.minSupportedMinor && paper.minor <= velocity.minor;
-
- if (paperAcceptsVelocity && velocityAcceptsPaper) return 'compatible';
- if (!velocityAcceptsPaper && paper.minor > velocity.minor) return 'paper-too-new';
- if (!paperAcceptsVelocity && velocity.minor > paper.minor) return 'velocity-too-new';
- if (!velocityAcceptsPaper && paper.minor < velocity.minSupportedMinor) return 'paper-too-old';
- if (!paperAcceptsVelocity && velocity.minor < paper.minSupportedMinor) return 'velocity-too-old';
- return 'major-mismatch';
+ if (paper.minor > velocity.minor) return 'paper-too-new';
+ if (paper.minor < velocity.minSupportedMinor) return 'paper-too-old';
+ return 'compatible';
}
export function isCompatible(