11 Commits

Author SHA1 Message Date
boojack ec1de34fd8 fix(ai): complete a provider endpoint that has no API path (#6673) 2026-11-28 23:13:15 +08:00
boojack 09a874553a test(api): pin the edges of the AI setting and SSO redirect rules
Cover cases the breaking changes since 26.11.2 left untested:

- SSO sign-in accepts the callback when the instance URL ends in a slash,
  and is refused when the instance URL names no origin.
- A provider whose type changes needs its API key again.
- The AI setting is refused to non-admins through BatchGetInstanceSettings,
  as are ListAIProviderTypes and ListAIProviderModels.
- An endpoint equal to its type's default is stored and returned as empty,
  keeping the stored key without contacting the provider.
- A provider that does not answer in time refuses the save with
  AI_PROVIDER_TIMEOUT.
- ANTHROPIC_COMPATIBLE runs without a key, and OPENAI_COMPATIBLE needs an
  endpoint.
2026-11-28 13:30:42 +08:00
boojack 63971da132 feat(ai): tag suggestions, provider failure model and AI setting playgrounds
- AIService.SuggestTags suggests tags for a draft, preferring the writer's
  own tags, with its own per-user hourly budget.
- Provider failures are classified (auth, quota, rate limit, unreachable,
  timeout, redirect, server, response) and returned with fixed messages and
  AI_* google.rpc.ErrorInfo reasons; provider error text never reaches the
  caller. Provider clients refuse redirects.
- AI setting model: a capability is on when set and needs both provider_id
  and model; the setting is admin only and replaced whole; signed-in users
  read InstanceProfile.ai_features; changing a provider's type or endpoint
  needs its key again; endpoints must be http or https.
- UpdateInstanceSetting lists the models of each new or changed provider and
  refuses the save on a rejected key, an unreachable or redirecting endpoint,
  or a timeout.
- Settings: the provider dialog shows a refused save in place; transcription
  and tag suggestions each have a "Try it" playground that calls the real
  Transcribe and SuggestTags with the saved settings; AI follows System in
  the admin list.
- Editor: tag suggestions in the composer, gated on ai_features.
2026-11-26 21:11:26 +08:00
johnnyjoygh 509e41bd1a style(go): remove trailing blank lines from blocks 2026-11-14 20:52:33 +08:00
johnnyjoygh 5f3969a830 feat(reactions): add full emoji picker
Let people use any Unicode emoji through a searchable, virtualized
picker.
Keep reaction counts accurate and requests optimistic and idempotent.
Refresh demo content so signed-in visitors can participate.

BREAKING CHANGE: Remove the MEMO_RELATED instance setting and
memoRelatedSetting configuration value. Remove their declarations and
lifecycle references from configuration files; existing reactions are
preserved.
2026-11-14 20:46:46 +08:00
ABird e216c28863 feat: declarative configuration with plan, apply, and API ownership (#6507) 2026-10-28 21:35:39 +08:00
Johnny 5cdb9ee399 fix(api): hide the instance admin from anonymous profile requests (#6491) 2026-10-22 08:26:33 +08:00
johnnyjoygh 9e3a164dff feat(usage): add default limits and explicit rule targets
Move memo content size into usage limits, with 8 KiB content and 32 MiB
upload defaults when settings are absent. Represent stored rule targets
with all_users or a positive user_id, and use that same schema for
deployment configuration.

Rename the memo count metric, remove reserved proto declarations, and
renumber fields and enums for the unreleased schema. Synchronize
enforcement, settings UI, generated clients, and tests.
2026-10-12 22:35:39 +08:00
Johnny d775160283 fix: harden instance admin, health, and mail header handling (#6454) 2026-10-11 10:52:03 +08:00
johnnyjoygh a316e7935b chore(go): modernize source and enforce go fix in CI 2026-10-09 22:07:23 +08:00
ABird af38e75e2d refactor(api)!: drop the v1 version marker (#6447) 2026-10-08 21:49:37 +08:00