fix(file-panels): Settings offers Source where the picker does, and review follow-ups

- Settings > Files offers Source on every key except those a built-in panel of
  another kind (Image) claims, so a plugin that alone claims a text extension
  shows the same choices as the picker.
- Delete the unused isSourceFilePanel.
- The Markdown example warns with the file name when its unmount write fails,
  rather than dropping the edit silently.
- Document that PluginFile stat fields are read at render time and that watch
  or the read hooks are how a panel learns they changed.
This commit is contained in:
Mohamed Boudra
2026-10-20 08:07:00 +02:00
parent ee7d422cc7
commit cd102d08b6
7 changed files with 35 additions and 26 deletions
+3 -2
View File
@@ -1,8 +1,9 @@
import { useEffect, useState } from "react";
/**
* The file a file panel shows. Stable for the life of the tab's target. The stat fields are
* refreshed when the file changes on disk.
* The file a file panel shows. Stable for the life of the tab's target. The stat fields hold the
* latest version Paseo knows; read them while rendering. Changing them does not re-render the
* panel: `watch`, or a re-render from the read hooks, is how a panel learns they changed.
*/
export interface PluginFile {
/** Absolute path on the host. */