Files
paseo/public-docs/hub/self-hosting/slack-app.zh-CN.md
T
Mohamed Boudra bd15e40e94 Serve paseo.sh in Simplified Chinese (#7373)
* feat(website): serve paseo.sh in Simplified Chinese

Every page of the website now has a Simplified Chinese version under
/zh-CN: the interface, docs, blog posts, comparison pages, legal pages,
all changelog releases and the homepage mockup. English URLs are unchanged.

The URL alone decides the language. There is no browser-language redirect
and no stored preference, because either would have to redirect the
unprefixed English URLs that people share and search engines index.
Internal links carry the page's language instead, and hreflang alternates
point Chinese search results at /zh-CN.

Translated headings pin the English anchor with {#id}, so section links
work in both languages. content-translations.test.ts fails when a page
has no translation or a translation's headings drift from the English.
Changelog releases and plugin listings without a translation render
whole in English under a notice, so a release never waits on one.

Plugin manifests and the registry gain optional translations and
OVERVIEW.zh-CN.md fields; older clients and registries ignore them.

* feat(website): replace the native language select with an EN/ZH menu

The header showed an OS-native select whose popup did not match the site.
The trigger now shows the language abbreviated (EN, ZH) and opens a menu in
the app's dropdown style that names each language in itself, with its name
in the page language underneath. Rows are real links to the same page in
that language; arrows, Escape, outside presses and taps behave as a menu
button, and the menu keeps itself on screen when a narrow header pushes the
trigger toward an edge.

Also drops the stray space after the full-width comma in the Chinese
homepage subtitle.

* docs(website): translate main's new docs and 0.12.0 release notes

Main added Keep run workspaces to the schedules docs, rewrote plugin icons
around inline SVG, and promoted 0.12.0 with new entries. Bring the Chinese
pages and changelog in line so no section falls back to English.

* fix(server): leave plugin listing translations to the registry

The daemon rejected manifests whose translations the registry would refuse,
so a plugin main installs could fail to load here. Paseo never reads
translations; the registry validates them at publish. Docs now say which
checks are automated at publish and which are human review.

* docs(plugins): describe the registry's final overview translation discovery

* style(server): format manifest test

* test(app): measure sidebar rows one at a time

After a reload the developer error toast appears while expectVerticalOrder
measures every row at once. Each concurrent boundingBox runs the toast
locator handler, and only one of them resumes, so the poll timed out on
every attempt since #7424. Measuring sequentially keeps one action in flight.

* test(app): return sidebar row measuring to main

#7480 hides the developer toast instead of running a locator handler, so
measuring the rows concurrently no longer races it. Reverts 41ac23016.

* test(app): wait for the compact shell before opening compact Changes

The shell survives the breakpoint, so right after the resize the wide
Explorer could still be visible: the test skipped the Explorer toggle and
the tab then disappeared, or toggled at the wrong time. Wait for the
compact-shell marker, as the composer helpers do since #7424.

* docs(website): translate main's plugin file panel docs

* test(app): edit the code font size after the font family remount

A committed appearance change remounts the settings screen through
AppearanceStyleBoundary, and the new form starts from the stored size.
Filling the size before that remount lost the edit in CI.

* docs(website): translate main's client/ui import docs

Follows #7474: one /client/ui entry, StreamedText instead of useRevealedText,
SettingsGroup dropped from the settings table, and the new
'UI imports in v0.13' migration section.

* test(app): wait for the previous layout's file panel picker to leave

After a resize the old layout's picker animates out while the new one is
already mounted, so the Use button matched two elements and the strict
locator failed. Wait for the shell's layout and a single picker first.
2026-10-21 13:13:03 +07:00

2.9 KiB
Raw Blame History

title, description, nav
title description nav
在 Hub 中使用 Slack 通过 Socket Mode 连接 Slack,或从公开的 Hub 使用 webhook。 Slack 应用

在 Hub 中使用 Slack

Slack 可以通过两种方式连接 Hub:

传输方式 需要公开 HTTPS 适用场景
Socket Mode 否 本地、个人和单进程的 Hub
Webhooks 是 公开服务器部署

浏览器设置中默认使用 Socket Mode。两种传输方式产生相同的 slack.mention 触发器和线程回复。

设置 Socket Mode

在 Hub 中打开 Apps → Slack,保持选中 Socket Mode。Hub 会给出 Slack manifest 以及具体步骤:

  1. 用 manifest 创建 Slack 应用。
  2. 生成带有 connections:write 的 App-level token。
  3. 安装应用并复制它的 Bot User OAuth Token。

把两个 token 粘贴到 Hub 中,然后选择 Connect Slack。Hub 会验证安装,为当前组织保存它,并打开出站的 Socket Mode 连接。

把机器人邀请到每个它需要关注的频道:

/invite @Paseo

现在编写一个 Slack 触发器。

Socket Mode 在 Hub 进程中保持一条活动连接。使用这种传输方式时,请只运行一个 Hub 进程并保持它运行;它停止期间到达的事件会丢失。

使用 webhook

当 Slack 应该把事件发送到一个稳定的公开 Hub 时,选择 Webhooks。设置之前,Hub 必须已经在其公开 HTTPS 地址上打开,这样生成的重定向 URL 和请求 URL 才正确。

Apps 指南会给出一份 webhook manifest,并要求填写 App ID、Client ID、Client Secret 和 Signing Secret。保存后会跳转到 Slack,以便你把应用安装到某个 Slack 工作区。

Slack 调用:

Provider 设置 Hub URL
Redirect URL <PASEO_HUB_APP_URL>/api/integrations/slack/callback
Request URL <PASEO_HUB_APP_URL>/api/integrations/slack/events

请从 Hub 发起安装。只从 Slack 发起的安装不会绑定到任何 Hub 组织。

通过环境变量配置

把应用密钥保存在 Hub 之外的部署可以使用一套完整的传输配置。

Socket Mode:

SLACK_TRANSPORT=socket
SLACK_APP_ID=A01234567
SLACK_APP_TOKEN=xapp-...

Bot User OAuth Token 仍然附加在每个已保存的 Slack 工作区连接上;它不属于 Socket Mode 的环境变量配置。

Webhooks:

SLACK_TRANSPORT=webhook
SLACK_APP_ID=A01234567
SLACK_CLIENT_ID=...
SLACK_CLIENT_SECRET=...
SLACK_SIGNING_SECRET=...

环境变量配置优先于已保存的 Slack 应用,并在 Apps 下显示为 Managed by environment。