feat: briefing auto-generate, pages overhaul (dashboard/screener/report/routines), delete routine

This commit is contained in:
asepharyana
2026-09-15 16:39:27 +07:00
parent ff156112e7
commit 94a7f1dfd9
6 changed files with 244 additions and 130 deletions
+10
View File
@@ -146,6 +146,16 @@ func (e *Engine) deliver(ctx context.Context, r store.Routine, payload string, c
return e.Notifier.SendTo(ctx, e.UserKey, f, string(cc))
}
// BriefingFor runs the morning briefing scoped to owner (watchlist +
// delivery) without needing a routines row.
func (e *Engine) BriefingFor(ctx context.Context, owner string) (string, []model.Citation, error) {
scoped := *e
if owner != "" {
scoped.UserKey = owner
}
return scoped.Briefing(ctx)
}
// tickers returns the user's watchlist (never empty: falls back to demo set).
func (e *Engine) tickers() []string {
wl, err := e.DB.Watchlist(e.UserKey)