Harden Yomitan settings open flow for external profile mode

- Return status from `openYomitanSettings` and show user-facing warning when external read-only profile mode blocks settings
- Thread `yomitanSession` through settings runtime/opener deps so settings window uses the active session
- Expand tests for session forwarding and external profile path propagation
- Move AniList setup/token/CLI docs into the AniList section in configuration docs
This commit is contained in:
2026-03-11 18:32:16 -07:00
parent a64af69365
commit 504793eaed
8 changed files with 84 additions and 41 deletions

View File

@@ -23,13 +23,15 @@ test('yomitan opener warns when extension cannot be loaded', async () => {
test('yomitan opener opens settings window when extension is available', async () => {
let opened = false;
const yomitanSession = { id: 'session' };
const openSettings = createOpenYomitanSettingsHandler({
ensureYomitanExtensionLoaded: async () => ({ id: 'ext' }),
openYomitanSettingsWindow: () => {
opened = true;
openYomitanSettingsWindow: ({ yomitanSession: forwardedSession }) => {
opened = (forwardedSession as { id: string } | null)?.id === 'session';
},
getExistingWindow: () => null,
setWindow: () => {},
getYomitanSession: () => yomitanSession,
logWarn: () => {},
logError: () => {},
});