Stop committing credentials; fix posting length, partial posts, and data safety
- Untrack config.yaml (now gitignored) and add config.example.yaml with blank credentials; install.sh copies the example and sets mode 600 - Reserve room for the appended source link when asking Claude for a post, count length the way X does, and refuse over-length tweets before posting - Return https://x.com/i/status/<id> for posted tweets - Track which platforms each queued post reached so a partial failure can be retried without double-posting - Write config, state, posts and dismissed files atomically with 0600 - Keep refreshed Twitter tokens in memory if saving them fails, and log the failure instead of writing to the hidden stderr - Exit with a clear message on corrupt data files instead of panicking - Surface save errors in the UI; show status/error messages on home - Add tests for X length counting, the post store, and token updates Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,13 +3,13 @@ package ui
|
||||
import "github.com/charmbracelet/lipgloss"
|
||||
|
||||
var (
|
||||
colorPurple = lipgloss.Color("135")
|
||||
colorGreen = lipgloss.Color("82")
|
||||
colorRed = lipgloss.Color("196")
|
||||
colorYellow = lipgloss.Color("226")
|
||||
colorGray = lipgloss.Color("240")
|
||||
colorFaint = lipgloss.Color("238")
|
||||
colorWhite = lipgloss.Color("255")
|
||||
colorPurple = lipgloss.Color("135")
|
||||
colorGreen = lipgloss.Color("82")
|
||||
colorRed = lipgloss.Color("196")
|
||||
colorYellow = lipgloss.Color("226")
|
||||
colorGray = lipgloss.Color("240")
|
||||
colorFaint = lipgloss.Color("238")
|
||||
colorWhite = lipgloss.Color("255")
|
||||
|
||||
titleStyle = lipgloss.NewStyle().
|
||||
Bold(true).
|
||||
@@ -71,7 +71,7 @@ var (
|
||||
warningStyle = lipgloss.NewStyle().
|
||||
Foreground(colorYellow)
|
||||
|
||||
charCountOK = lipgloss.NewStyle().Foreground(colorGreen)
|
||||
charCountOK = lipgloss.NewStyle().Foreground(colorGreen)
|
||||
charCountWarn = lipgloss.NewStyle().Foreground(colorYellow)
|
||||
charCountOver = lipgloss.NewStyle().Foreground(colorRed).Bold(true)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user