feat(run,notifications,profiles): stop sending prompts nobody typed, and fix notification + profile delivery
Run console:
- Picking a pipeline no longer pre-writes anything into the prompt box
(`promptPrefill` in `LaneConsolePane.tsx` is gone — it wrote the driving
slash command on a claude lane and a stage checklist on a codex one).
Whatever sits in that box is sent as a real prompt the moment the run
starts, so the box is the user's alone now.
- Resuming a session sends NO prompt at all (`handleStart` in `RunSetup.tsx`):
the resumed session carries its own transcript, and leftover text in the box
fired an extra turn into it.
Notifications:
- `client/src/lib/notify.ts` is now the ONE sender, used by both
`useNotifications` and Settings' test button, and it reports where the
notification landed: `POST /api/push/send` answering `{native:false,pushed:0}`
means it went NOWHERE, so the client falls back to a local notification
instead of counting the 200 as delivered.
- A notification carries the lane that raised it (`/workspace?lane=<id>`), and
Workspace selects that lane on arrival.
Profiles:
- `server/lib/cc-profiles.js` reads and writes the macOS login Keychain item
`Claude Code-credentials`, where the `claude` CLI actually keeps
`claudeAiOauth` on darwin — a switch used to rewrite a file nothing reads.
The file stays the fallback, is kept in step only when it already exists, and
`AGENTHUB_CC_KEYCHAIN=0` pins it (tests set it).
Tests: npm run test:server (1820 pass), client vitest (553 pass).
This commit is contained in:
@@ -34,7 +34,7 @@ router.delete("/subscribe", (req, res) => {
|
||||
});
|
||||
|
||||
router.post("/send", async (req, res) => {
|
||||
const { title, body } = req.body;
|
||||
const { title, body, url } = req.body;
|
||||
if (!title || !body) {
|
||||
return res.status(400).json({ error: { message: "Missing title or body" } });
|
||||
}
|
||||
@@ -43,7 +43,7 @@ router.post("/send", async (req, res) => {
|
||||
// { native: true|false, pushed: <count>, failed: <count> }
|
||||
// so a silent "no subscribers, no Electron host" no-op stops looking like
|
||||
// success on the client side.
|
||||
const result = await sendPushToAll(db, title, body);
|
||||
const result = await sendPushToAll(db, title, body, typeof url === "string" ? url : undefined);
|
||||
res.json({ ok: true, ...result });
|
||||
} catch (err) {
|
||||
res.status(500).json({ error: { message: err.message } });
|
||||
|
||||
Reference in New Issue
Block a user