Skip to content

feat: webhooks listen/logs, phonenumbers set - #29

Merged
abhiramkast merged 6 commits into
pr1-shared-lines-corefrom
pr2-webhooks-phonenumbers
Apr 15, 2026
Merged

feat: webhooks listen/logs, phonenumbers set#29
abhiramkast merged 6 commits into
pr1-shared-lines-corefrom
pr2-webhooks-phonenumbers

Conversation

@abhiramkast

Copy link
Copy Markdown
Contributor

Summary

  • webhooks listen: WebSocket relay with --forward-to for local webhook development
  • webhooks logs: view recent webhook delivery logs
  • webhooks events: improved output formatting
  • phonenumbers set: pick default phone for MULTI lines
  • voicememo: added from flag support

PR Chain

This is PR 2 of 3 (depends on #28). Merge order: PR 1 → PR 2 → PR 3

@abhiramkast
abhiramkast requested a review from jflayhart as a code owner April 14, 2026 16:20
@abhiramkast
abhiramkast force-pushed the pr2-webhooks-phonenumbers branch 2 times, most recently from 62d0cf7 to 21fa7e0 Compare April 14, 2026 19:25
Comment thread src/commands/webhooks/logs.ts Outdated
Comment on lines +179 to +184
// Prevent seenIds from growing unbounded
if (seenIds.size > 5000) {
const entries = [...seenIds];
for (let i = 0; i < 2500; i++) {
seenIds.delete(entries[i]);
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not simply pop oldest off the queue when we reach max size? for example this is constant time lookup and a more stable memory ceiling:

  const key = log.event_id + ':' + log.attempt;                                                                                                                                                                  
  if (seenIds.has(key)) continue;                                                                                                                                                                                
  seenIds.add(key);                                                                                                                                                                                              
                                                                                                                                                                                                                 
  if (seenIds.size > 5000) { 
    seenIds.delete(seenIds.values().next().value);
  }  

@abhiramkast
abhiramkast force-pushed the pr2-webhooks-phonenumbers branch from 21fa7e0 to d9b5555 Compare April 14, 2026 20:27

@jflayhart jflayhart left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left a comment simpler queue/unbounded growth management

- webhooks listen: WebSocket relay with --forward-to for local dev
- webhooks logs: view recent webhook delivery logs
- webhooks events: improved output formatting
- phonenumbers set: pick default phone for MULTI lines
- voicememo: added from flag support
@abhiramkast
abhiramkast force-pushed the pr2-webhooks-phonenumbers branch from d9b5555 to de62ea7 Compare April 15, 2026 00:06
* chore: command audit, error handling cleanup, and test updates

- chats create: dynamic error messages based on account type, telemetry
- format.ts: improved output formatting across commands
- doctor.ts: updated diagnostics
- init.ts: cleanup
- All commands: consistent error handling, clean flag descriptions
- Test updates for new error messages and SDK methods
- Removed dead signup tests (replaced by OTP flow)

* refactor: extract shared auth flow into auth-flow.ts

Login and signup now call the same runAuthFlow() function.
Both handle existing users (welcome back) and new users
(provision) identically. Removes duplicate code.

* feat: session check, whoami cleanup, unhide init/profile, attachment-url

- auth-flow: check existing session before signup/login, block if logged in
- auth-flow: remove phone number prompt (unused for shared lines)
- whoami: only show fields that exist, no misleading "phone not set"
- unhide init and all profile commands
- config: remove dead sandbox profile check from saveProfile
- chats create + messages send: add --attachment-url flag
@abhiramkast
abhiramkast merged commit 54a167b into pr1-shared-lines-core Apr 15, 2026
@abhiramkast
abhiramkast deleted the pr2-webhooks-phonenumbers branch April 15, 2026 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants