Commit Graph
18 Commits
Author SHA1 Message Date
翅膀 b71cd7b6bb fix(logs): scope queries before limiting results
Filter authorized groups in SQL before LIMIT and aggregate only
visible rows. Preserve current group attribution for late writes,
surface read failures and combine related totals in one scan.
2026-10-23 23:22:10 +08:00
RhenCloud 2281c19939 refactor: rebrand WebHooker as Elysola 2026-10-17 11:37:02 +08:00
RhenCloud fbbff669a3 feat(ui): migrate to @recloudstudio/ui, add theme toggle and polish console UX 2026-10-03 22:54:32 +08:00
RhenCloud 1a0500b812 fix: prevent data loss in routes, fragments, and group operations
Found and fixed multiple critical bugs with similar patterns:

1. routeStatements() used DELETE FROM d1_routes before re-inserting
   - Could cause data loss if interrupted or if logic changes
   - Now uses DELETE with WHERE clause + INSERT...ON CONFLICT (upsert)

2. saveFragments() used DELETE FROM d1_fragments before re-inserting
   - Same pattern as routes, fixed with targeted deletes + upsert
   - Added loadFragments() call to determine what to delete

3. adminGroupRename() didn't update fragment groupId
   - When renaming a group, fragments were left pointing to old groupId
   - Now updates fragments alongside routes, secrets, and invites

All changes follow the same safe pattern:
- Load existing data to identify what needs deletion
- Delete only removed items with WHERE clauses
- Use INSERT...ON CONFLICT DO UPDATE for upserts
- Never use bare DELETE FROM table

Testing: All 339 tests pass.
2026-09-10 22:35:43 +08:00
github-actions[bot] 1375db9a20 chore: auto-fix lint & formatting [skip ci] 2026-08-26 16:39:02 +00:00
RhenCloud 4b99f6d33d feat(feishu): add Feishu inbound webhook, /gh commands and card actions
- add feishu_links D1 table and link store helpers
- implement X-Lark-Signature verification, url_verification, /gh login|logout|comment|merge|close and card.action.trigger Merge/Close
- render interactive cards with clickable title link, inline links and callback buttons (no whole-card card_link)
- bind Feishu account in OAuth callback
- document event subscription and required scopes
2026-08-27 00:07:05 +08:00
github-actions[bot] df16dc94f7 chore: auto-fix lint & formatting [skip ci] 2026-08-24 14:52:59 +00:00
RhenCloud c090281cb2 feat(filters): JSONPath field filters, operators, AST groups, fragments, and test-match
Add a field filter type reading any payload value by JSONPath with array expansion, 12 comparison operators (eq/ne/contains/startsWith/endsWith/regex/gt/gte/lt/lte/in/exists), a visual AST builder (all/any/not) in the route editor, chip-based multi-value input, a stateless POST /admin/api/test-match dry-run, and named filter fragments stored in D1 (d1_fragments, migration 0010) inlined into route ASTs on insert.
2026-08-24 22:51:20 +08:00
RhenCloud 47d7c9105b feat(ui): update ui style 2026-08-16 22:46:07 +08:00
RhenCloud 1e9ba3c5dd feat(observability): delivery metrics, admin metrics/delivery endpoints, admin API route wiring 2026-08-15 17:03:45 +08:00
github-actions[bot] c58b800987 chore: auto-fix lint & formatting [skip ci] 2026-08-14 00:51:23 +00:00
RhenCloud 3f6f7f17b5 feat(groups): host-based forge sources with optional display name
- forgeSources entries are now { host, type, name? }: the repository URL's
  hostname is matched case-insensitively against host (github.com for GitHub,
  distinct hosts for multiple Gitea instances); the footer label is the
  optional name, falling back to the host
- GroupEditor renders one row per source: host input + type select + optional
  display name (grid layout); hostname validation mirrors the server
- fix: apiFetch sends Content-Type: application/json — h3's readBody only
  parses JSON bodies with that header, so every PUT/POST from the refactored
  console arrived as a raw string and failed with 'groups must be an array'
- hardening: readJsonBody (admin + actions) JSON-parses string bodies so curl
  and older clients without the content-type header still work
- regression test: groups PUT without content-type + forgeSources round-trip
- docs: groups.md/message-format.md (en/zh), AGENTS.md, config.example.yaml
2026-08-14 08:49:48 +08:00
RhenCloud 3dce114cec feat(groups): optional forge source label in message footers
- Group.forgeLabel (default off, editable per group in the console) shows the
  source forge on every message the group's routes dispatch
- Discord embed footer: forge name next to the repo + the site's favicon as
  icon_url (Gitea instance's own favicon from its origin)
- Telegram footer: hyperlinked site name (GitHub or Gitea hostname); custom
  webhooks render a plain 'Custom' label
- forgeInfo() derives branding from event.provider + repository.html_url;
  dispatch attaches it to the NeutralMessage like mentionRoleIds
- validateGroups accepts forgeLabel booleans; GroupEditor gains the toggle
- tests: forgeInfo unit, discord/telegram footer render, dispatch on/off
- docs: groups.md + message-format.md (en/zh), config.example.yaml, AGENTS.md
- fix: wrangler.jsonc compatibility_date was an incomplete '2026-'
2026-08-14 08:10:04 +08:00
github-actions[bot] 811f8646e0 chore: auto-fix lint & formatting [skip ci] 2026-08-13 22:46:35 +00:00
RhenCloud 6f1a334150 merge: resolve conflicts with origin/main (auto-fix formatting) 2026-08-14 06:45:15 +08:00
RhenCloud db49e1f01c docs: fix factual errors, fill coverage gaps and align zh mirror 2026-08-14 06:17:13 +08:00
github-actions[bot] df51b71121 chore: auto-fix lint & formatting [skip ci] 2026-08-13 12:37:09 +00:00
RhenCloud b139712a91 feat: migrate to Nuxt 4 (Nitro) and Tailwind CSS v3 2026-08-13 17:43:33 +08:00