Commit Graph
91 Commits
Author SHA1 Message Date
coderabbitai[bot] e5b55986b9 docs(routes): Clarify fallback hints and document group-scoped stop and fallback upgrade behavior 2026-10-17 13:06:02 +00:00
翅膀 1c4639b07d feat(console): confirm leaving unsaved page work
Guard route changes when an editor or changed order draft is open. Cancel superseded questions and restore the shown history entry when repeated Back or Forward navigation is refused; only completed navigation resets page work.
2026-10-17 12:03:27 +08:00
翅膀 535bfa98ce feat(console): give each group its own routes URL
Resolve the selected group from /admin/groups/{groupId}, validate console paths, and use browser history for back navigation. Keep Groups active and let an active mobile-tab tap return to the list. Scope pending route loads to their group and retain the count beside long headings.
2026-10-17 11:13:09 +08:00
翅膀 a2ad4f699e feat(dispatch)!: scope stop and fallback to each group
A match in one group must not suppress delivery in another group. Track regular matches and stopped scopes independently, and document the routing-table boundary.

BREAKING CHANGE: stop and fallback no longer apply globally across
groups. Put mutually exclusive routes in the same group and define
fallback routes in each group that needs its own catch-all.
2026-10-17 08:39:16 +08:00
翅膀 a8418c06d9 fix(editors): ignore accidental backdrop dismissal
Do not discard unsaved route or group edits when the user clicks outside the dialog. Preserve Escape, Cancel and explicit close, including popovers and confirmation dialogs stacked above the editor.
2026-10-17 08:12:55 +08:00
翅膀 54b2944dd4 fix(filters): preserve regex meaning when changing operators
Swap wrapped and raw regex sources only when both compile identically after saving. Leave literal, glob, multiline and Unicode-sensitive comparisons unchanged rather than inventing non-equivalent conversions.
2026-10-17 07:47:03 +08:00
翅膀 2717ab49dc fix(filters): adapt suggestions to the selected operator
Offer literal prefixes and suffixes for substring operators, escaped anchored patterns for regex, and numeric suggestions only for comparisons. Suggestion syntax must mean what the selected matcher actually reads.
2026-10-17 07:21:36 +08:00
翅膀 00387c3afa feat(filters): split pasted values without breaking regexes
Accept multiple values separated by commas or lines while retaining commas inside wrapped expressions and raw regex patterns. Pasting replaces the selected range and keeps rejected values as an explicit draft.
2026-10-17 06:58:12 +08:00
翅膀 d693f70612 feat(filter-editor): integrate searchable condition inputs
Replace chip-only values with context-aware bilingual inputs and a compact condition grid. Preserve drafts across tree changes, block saves and tests until drafts are resolved, and keep keyword filters free of hidden operators.
2026-10-17 06:29:41 +08:00
翅膀 08dfac52cd feat(console): reorder a group's routes by drag or keyboard
The per-card up/down arrows saved after every single step, so moving a
route five places took five writes. A Reorder mode on the group page now
swaps each card's switch for a drag handle: pointer drags (mouse and
touch) slide the neighbours out of the way and auto-scroll near the
viewport edges, Arrow Up/Down on a focused handle moves a card by one
and is announced to screen readers, and nothing is written until Save
order. Cancel or Escape (unless a dialog or list owns it) drops the
draft.

The cards move into a new RouteList component that owns the drag state.
2026-10-17 02:52:14 +08:00
翅膀 84fc63663e feat(console): confirm removing filled editor rows
Filter conditions and groups, delivery targets, saved fragments and forge
hosts vanished on a single click, taking whatever had been typed with
them. Rows holding content now ask first, while empty, never-filled
rows (`isBlankNode`: default operator, no path, no values, not negated)
are still removed directly.
2026-10-17 00:58:24 +08:00
翅膀 85f8cb74bc feat(console): confirm member and webhook removal
Removing a member, revoking an invite link and disabling a group's
webhook endpoint took effect on the first click. They now ask first;
disabling the webhook explains that senders still using the secret will
be rejected, and its button is styled as destructive.
2026-10-17 00:29:51 +08:00
翅膀 24f5d0477c feat(console): add in-app destructive-action confirmation
Deleting a route or a group used `window.confirm`, which blocks the page
and ignores the console theme. A promise-based `useConfirm()` now drives
one <ConfirmDialog /> built on the reka-ui AlertDialog that
@elysola/ui ships; reka-ui is pre-bundled so dev keeps a single copy and
the dialog stacks with the Rc dialogs.

A request never outlives its asker: one made after the asking component
unmounted resolves false, and one still open when it unmounts is
cancelled.
2026-10-17 00:12:36 +08:00
翅膀 d57e5c29c4 feat(storage): persist the per-group route order
Routes used to load in id order, so the order saved from the console
was lost on the next read. Migration 0012 adds `d1_routes.position`:
saving writes each route's index within its own group (saving one group
never shifts another), and routes load by `group_id, position, id`.

A database without the column keeps working: only a "no such column" /
"has no column named" error falls back to the legacy statements, and
nothing is cached, so a later migration is picked up on the next call.
2026-10-16 23:24:09 +08:00
翅膀 24d85fd2e6 docs(deployment): list the fragments and feishu link migrations
The manual `d1 execute` fallback stopped at 0008, and AGENTS.md named
0001..0010 although 0011 already exists.
2026-10-16 22:38:42 +08:00
github-actions[bot] 29b15f4933 chore: auto-fix lint & formatting [skip ci] 2026-10-17 03:37:45 +00: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 3567c6d321 fix(formatter): link branch and tag titles 2026-10-01 18:40:02 +08:00
RhenCloud b7fd31a665 fix(push): handle unresolved bot authors 2026-10-01 18:33:17 +08:00
RhenCloud 1057a60de7 fix(push): show differing commit author 2026-09-30 18:52:07 +08:00
RhenCloud 2db56d63c7 feat(brand): add fishhook logo and wire up favicon 2026-09-26 17:00:51 +08:00
RhenCloud 04352c3a19 feat(github): fetch workflow_run jobs via jobs_url enrichment
The workflow_run webhook payload carries no jobs array, only jobs_url,
so the Jobs field never populated for real GitHub events. Fetch the job
list from the GitHub API once per delivery (lazy, memoized across
routes) and inject it into the payload before formatting.

- app-token.ts: shared getInstallationToken (App JWT -> installation
  token) + GITHUB_API_VERSION; check-run.ts now reuses it
- workflow-jobs.ts: getWorkflowRunJobs, App token when configured else
  unauthenticated (public repos), per_page=100, best-effort
- docs: GitHub App needs Actions: read; note API enrichment in the
  message-format and supported-events guides (en + zh)
2026-09-26 15:33:06 +08:00
RhenCloud e607d41432 feat(workflow): render workflow_run jobs as colored diff block
List each job on its own line with a status emoji and, for completed
jobs, the duration. Discord colors the diff fence: '+' green for
success, '-' red for other finished conclusions, plain for
running/queued/pending. Telegram/Feishu collapse it to inline code.

Sync AGENTS.md, README(s), docs guide and supported-events tables.
2026-09-26 14:58:00 +08:00
RhenCloud fd6ccda411 fix(check): key check_run in-place edits on check name + head_sha
Providers that emit a fresh check run id per phase (e.g. Cloudflare Pages)
no longer post a new message for each status change; same name + commit
SHA now edits the existing message. Falls back to the run id when name or
head_sha is absent. Docs updated in sync.
2026-08-31 01:17:13 +08:00
RhenCloud cc8bb4182f fix(push): render created tags/branches as create events instead of 0 commits 2026-08-29 16:47:00 +08:00
github-actions[bot] 1375db9a20 chore: auto-fix lint & formatting [skip ci] 2026-08-26 16:39:02 +00:00
RhenCloud c75567cf15 feat: migrate to Tailwind CSS v4
Replace @nuxtjs/tailwindcss with @tailwindcss/vite, move theme
tokens into @theme inline in main.css, drop tailwind.config.ts.
2026-08-27 00:26:17 +08: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
github-actions[bot] 7c37f5d8b6 chore: auto-fix lint & formatting [skip ci] 2026-08-17 07:51:36 +00:00
RhenCloud 25ebae4ae5 feat(storage): migrate config, dedup and delivery state to D1
- Move oversized queue payloads from KV to R2 (PAYLOAD binding, webhooks/YYYY/MM/DD/*.json, KV queue:payload:* fallback)
- Persist routes/groups to D1 (d1_routes/d1_groups) with memory -> KV -> D1 three-tier cache, seeded from legacy KV config keys
- Move webhook dedup (dedup_keys), delivery state (delivery_state) and message tracking (message_tracking) to D1 via canUseD1 probe with automatic KV fallback
- Batch send_logs inserts (recordSendBatch) and add group_id/ts index
- Add storage-prune scheduled task for expired dedup/state/tracking rows
- Add TTL to invite:group:{id} index and audit all ephemeral KV keys
- Add D1 indexes for the new tables
- Sync AGENTS.md, README.md/zh and docs/ (en/zh) with the new storage layout
2026-08-17 15:01:20 +08:00
github-actions[bot] 3bcc98efc8 chore: auto-fix lint & formatting [skip ci] 2026-08-16 14:47:01 +00:00
RhenCloud 47d7c9105b feat(ui): update ui style 2026-08-16 22:46:07 +08:00
RhenCloud 320e825bf8 chore(quality): provider fixtures, formatter snapshots, platform contract tests, CI, CodeQL, dependabot 2026-08-15 17:30:51 +08:00
github-actions[bot] a1ee756d1d chore: auto-fix lint & formatting [skip ci] 2026-08-15 09:04:41 +00:00
RhenCloud 1e9ba3c5dd feat(observability): delivery metrics, admin metrics/delivery endpoints, admin API route wiring 2026-08-15 17:03:45 +08:00
RhenCloud 486f38365f feat(queue): async delivery via Cloudflare Queues with retry backoff and DLQ 2026-08-15 17:03:35 +08:00
RhenCloud 737dd7af98 feat(reliability): idempotency store, custom webhook replay protection, correlation ids
Add LICENSE (MIT), an IdempotencyStore abstraction with a KV implementation and provider-scoped delivery keys, optional replay protection for custom webhooks (X-WebHooker-Timestamp + X-WebHooker-Nonce), and per-request correlation ids in webhook responses and logs.
2026-08-15 17:03:32 +08:00
RhenCloud c982356e0c fix(formatters): use raster PNG forge icons Discord renders
- GitHub footer icon now uses fluidicon.png instead of favicon.ico —
  Discord silently drops .ico embed footer icons (png/jpg/webp/gif only)
- Gitea instances use {origin}/assets/img/favicon.png (verified on
  codeberg.org and gitea.com); links are still derived from the repo URL
- tests + docs updated to the new icon URLs
2026-08-14 08:59:51 +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
github-actions[bot] 17d10db845 chore: auto-fix lint & formatting [skip ci] 2026-08-14 00:10:56 +00: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
RhenCloud a5324fb0ea fix(formatters): localize PR buttons, cap oversized content, dedupe status logic
- PR merge/close button labels now follow the group language (actions.merge/close)
  instead of hardcoded Chinese
- clamp content to Discord embed limits (title 256, description 4096, field value
  1024, 25 fields) in formatters plus a render-layer safety net; Telegram gets a
  tag-safe 4096-char cap (capHtml closes dangling tags)
- raise commit subject truncation from 72 to 200 chars (MAX_COMMIT_SUBJECT)
- extract workflowStatus/workflowRunStatus/statusColorKey helpers shared by
  check_run/check_suite/workflow_run/workflow_job
- dedupe deployment ref/sha fields via addDeploymentRefFields
- commit_comment without a commit id uses title_plain (no dangling ???????)
- tag pushes now report 'Tag created'; zh push title includes the {ref}
- sender profile link derives from the repo's forge origin instead of github.com
- group webhook log emoji injected via emojiPrefix, removed from locale files
- dispatchEvent accepts preloaded groups (single KV read per webhook)
- webhook 401 logs distinguish 'secret not configured' from 'invalid signature'
2026-08-14 07:41:19 +08:00
RhenCloud c438fe96dc Merge branch 'main' of https://github.com/ReCloudStudio/WebHooker 2026-08-14 06:52:17 +08:00
RhenCloud 44f534e71d fix(docs): standalone tsconfig for vitepress config loading 2026-08-14 06:52:05 +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