Add offline `economist demo` mode to economist-tui Go CLI
Session from economist-tui-sessions on Hugging Face by thomasmustier · MIT · condensed by Coders Talk
Implement GitHub issue #4: add a safe, offline demo mode to the economist-tui terminal app that renders placeholder content without needing login or hitting the paywall, usable for README/docs screenshots.
- +0Prompt · +0Review gh issue #4, read relevant files, and agree on intent/approach before implementing
- +0mAgent did · +0mWorked around gh auth failure using the GitHub REST API to fetch the issue, then read through cmd/, internal/browse, internal/rss, internal/fetch, internal/article, internal/ui and docs to understand the codebase before proposing a demo-mode design
- Break · 33m away, not counted
- +34mPrompt · +34mJust have `economist demo` open browse with a DataSource abstraction, demo data labeled 'Leaders - demo', built to avoid debt for future section/rendering work
- +37mAgent did · +37mAdded a DataSource interface to decouple browse.go/model.go from live fetching, created internal/demo package with a static feed and demo command, bumped version, updated README/release notes, and passed go test ./...
- +43mPrompt · +43mDiscussed what real-world text could be used for demo/test fixtures without copyright risk, eventually deciding to use OCR text from a 1940 public-domain Economist issue on archive.org
- +1h 8mAgent did · +1h 8mDownloaded the 1940 djvu OCR text, extracted two articles ('Fair Exchange' and 'German Europe'), saved them as local fixtures with a provenance README, wired demo.go to embed and use them, and tightened demo tests
- +1h 22mPrompt · +1h 22mFast-forward and build - there have been PRs merged upstream
- +1h 22mAgent did · +1h 22mStashed local changes, fast-forwarded main to origin, reapplied demo work, resolved merge conflicts in browse.go/model.go/RELEASE_NOTES.md, bumped version and reran tests
- +1h 26mIntervention · +1h 26mDeveloper noticed the version bump was stale after the fast-forward pullWhy: Upstream had moved further while I was merging, so the version number needed to reflect that, not just my own change.
- +1h 26mAgent did · +1h 26mBumped version to 0.2.3, updated homebrew-tap formula and sha256, built and installed locally via make, fixed incorrect dates on the two real 1940 fixture articles, then committed/pushed both repos after resolving a second rebase conflict
- +1h 44mOutcome · +1h 44meconomist demo shipped: new DataSource abstraction, internal/demo package with two real 1940 public-domain fixtures plus synthetic articles, version bumped to 0.2.3, homebrew-tap formula updated and pushed, all changes committed and pushed to main after resolving two rebase conflicts
I'd start the first prompt by naming the exact command shape I want (`economist demo`, no flags) and flagging up front that I want a clean DataSource abstraction so future section/rendering changes don't create debt — that's what I ended up asking for mid-session anyway. The correction that did the most work was pushing back on 'copyrighted' being interpreted too literally, which led us to real public-domain 1940 Economist text instead of synthetic filler, making the demo genuinely nice. Catching the stale version number after the upstream fast-forward also mattered, since it would've shipped the wrong homebrew formula otherwise.