Phase 1, part 1: fetch, write and publish posts from the web app
Brings back posting, which Phase 0 removed with the terminal interface. - Content page: per inventory entry, fetch its X account, X hashtag search, YouTube channel and RSS/Atom feeds (new), then select, dismiss or restore the fetched items, which are kept in the database. - Writing: one AI call returns a draft per channel (X and LinkedIn), prompted from the company profile, the entry's relationship, talking points and mention policy, and each channel's rules. Fetched text is quoted as untrusted. An over-long X draft gets one request to shorten. - Drafts page: edit with a live length counter that counts like X, then publish each draft on its own. A draft is claimed before posting so it can't go out twice; failures are kept on the draft for a retry; X tokens are refreshed and saved. - Migration 2 adds content_items and drafts, and turns queued posts into drafts for the platforms they hadn't reached. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
{{define "content"}}{{with .Data}}
|
||||
<nav class="tabs">
|
||||
<a href="/content" aria-current="page">Sources</a>
|
||||
<a href="/drafts">Drafts{{if .Drafts}} ({{.Drafts}}){{end}}</a>
|
||||
</nav>
|
||||
<h1>Content</h1>
|
||||
<p class="lede">Pick an inventory entry to fetch its latest news, choose what to write about, and get a draft for each channel to review on the <a href="/drafts">Drafts</a> page.</p>
|
||||
|
||||
{{if .Rows}}
|
||||
<table class="list">
|
||||
<thead><tr><th>Entry</th><th>Relationship</th><th>Sources</th><th>Waiting</th><th>Last fetched</th></tr></thead>
|
||||
<tbody>
|
||||
{{range .Rows}}
|
||||
<tr>
|
||||
<td><a href="/content/{{.Entry.ID}}">{{.Entry.Name}}</a></td>
|
||||
<td><span class="badge {{.Entry.Relationship}}">{{.Entry.Relationship}}</span></td>
|
||||
<td>{{if .Sources}}{{join .Sources ", "}}{{else}}<span class="muted">none: <a href="/inventory/{{.Entry.ID}}">add some</a></span>{{end}}</td>
|
||||
<td>{{if .Waiting}}{{.Waiting}}{{end}}</td>
|
||||
<td>{{ago .LastChecked}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{else}}
|
||||
<section class="card empty">
|
||||
<p>Add the partners and competitors you post about to the <a href="/inventory">Inventory</a> first.</p>
|
||||
</section>
|
||||
{{end}}
|
||||
{{end}}{{end}}
|
||||
Reference in New Issue
Block a user