4 Commits
Author SHA1 Message Date
Radosław SmolińskiandClaude Fable 5.2 dc3e594d38 Sending method, the owner's answers: nothing changes until another option is picked; the panel warns before the save
- a save that sends the method already shown, while nothing is stored, stores nothing: the site keeps sending
  exactly as before and keeps following what is filled in, until somebody picks ANOTHER option
- the state block reads the form as it is edited and warns at once when "Own SMTP server" is picked with server,
  user name or password empty, or "Microsoft Graph" on a server without GRAPH_* (graphReady in the panel state);
  it reloads after every save
- texts, doctor's info finding, docs, skills, changelog; reference e2e checks the warning

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-26 23:15:42 +01:00
Radosław SmolińskiandClaude Fable 5.2 8c19391590 Sending method, review M-1 and M-2: the plugin's own status write never stores a choice; a non-method is refused
- M-1: the save rule of `emailMethod` ran after the early return for the plugin's status writes, so the first
  failed (or recovered) send stored the method the read showed as if an admin had chosen it. The rule is now a
  hook of its own that runs on every write: a write that does not name the method leaves what is stored, empty
  included.
- M-2: a sent value that is not null or one of the three methods (a number, a list, another word) is refused
  with a ValidationError (400) before it reaches the database.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-26 23:08:34 +01:00
Radosław SmolińskiandClaude Fable 5.2 ee8ea42956 E-mail: "Sending method" is an explicit choice - IWSN (built-in), Own SMTP server, Microsoft Graph (deprecated)
What is chosen is what is used. The choice is the stored field `emailMethod` of Site integrations (empty until
somebody chooses); `emailTransport` of 1.6 - 1.17.0 stays, hidden.

- no silent switch: a chosen method that cannot be used (SMTP incomplete, Graph without GRAPH_*) fails loudly
  - status smtp-incomplete / graph-not-set-up, state block, doctor mail-method - and nothing is sent another way
- upgrade writes nothing and loses no mail: until somebody chooses, the order of 1.17.0 applies and the field
  shows its result as selected; the first save of the panel's form stores the choice
- only the chosen method's fields are shown; the test e-mail names the method (Graph too)
- mail: { relay: false } does not offer "IWSN" (the stored values stay three: one SQL enum for every project)
- Postgres / SQLite: one migration (a column). Before it runs the plugin's readers read the global without the
  field, mail goes the old way, one loud log line and the doctor say what to do
- getMailMethod, setMailMethod, resolveMailMethod, readMailSettings, mailMethodColumnMissing exported
- tests on SQLite, Postgres and MongoDB, with and without the migration; docs, AGENT.md, skills, changelog

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-26 22:39:03 +01:00
Radosław SmolińskiandClaude Fable 5.2 c6841a1674 WIP: sending method as an explicit choice, kept in payload-kv (superseded: the choice moves to a stored field)
Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-26 22:30:03 +01:00