Commit Graph
27 Commits
Author SHA1 Message Date
Doar Mihai 88aebe298c docs: add design spec for WordPress publishing command
Extends Sites with cms_type + WP Application Password credentials
and adds a posts:publish Artisan command to push a Post to a
WordPress site's REST API, mirroring the reddit-post sidecar's
role for a native, non-browser-automation CMS target.
2026-07-19 16:40:33 +03:00
Doar MihaiandClaude Sonnet 5 0154c058af polish: trim unknown-arg echo, document trace artifacts and unverified selectors
Addresses whole-branch review's minor findings:
- Unknown CLI arguments now echo only the flag name, not its value, so a
  mistyped flag (e.g. --pasword=secret) can't leak a credential into the
  error output.
- README now notes that failed runs retain a screenshot/trace under
  test-results/ (gitignored, may contain the username but not the masked
  password), and points at the UNVERIFIED post-composer selectors as the
  first thing to check during real home-network verification.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-18 19:03:50 +03:00
Doar MihaiandClaude Sonnet 5 a95440751f feat: add CLI wrapper script for the reddit-post sidecar
Implements run.sh with argument parsing (--username, --password, --subreddit,
--title, --body, optional --headed), environment variable mapping to Task 2's
env contract, Playwright invocation with proper exit-code capture via set +e,
and result file output to stdout.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-18 18:42:08 +03:00
Doar MihaiandClaude Sonnet 5 f794a5ae83 docs: annotate verified vs unverified selectors, drop redundant clicks
Addresses reviewer's minor findings on the prior fix commit: makes the
screenshot-verified/unverified boundary explicit in code comments so it
travels with the file rather than living only in commit messages, and
removes redundant .click() calls before .fill() (fill() already focuses).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-18 18:40:54 +03:00
Doar MihaiandClaude Sonnet 5 3edbf3fb26 fix: correct Reddit login selectors and detect network-level blocks
Live verification against a real Reddit login page (from this dev
sandbox) showed:
- The actual submit button has no [type="submit"] attribute; its
  accessible name is "Log In" — switched to getByRole with that name.
- Username/password fields are better targeted via their visible
  labels (getByLabel) than brittle name= attribute selectors.
- A cookie-consent dialog can overlay the form and intercept clicks;
  it's now dismissed via "Reject Optional Cookies" before filling in.
- This sandbox's network is flagged by Reddit's bot detection with a
  "blocked by network security" interstitial before the login form
  even loads — this is unrelated to credentials and unrelated to the
  target account (confirmed reachable fine from a residential
  network/browser). Added explicit detection for this state so it
  reports a clear, distinguishable error instead of a generic
  CAPTCHA/2FA guess. Full live end-to-end verification (successful
  login + post creation) must be run from a network Reddit does not
  block, e.g. the mini PC this app actually runs on.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-18 18:38:04 +03:00
Doar Mihai a6fb5ef1cf fix: preserve specific error message on unexpected test exceptions
The outer catch's overwrite guard checked `!outcome.error`, but outcome.error
is always truthy (even the default placeholder string), so an exception
occurring outside the two explicitly-guarded blocks (e.g. a .fill()/.click()
timeout) would leave the generic "Test did not complete" message instead of
the real error. Replaced with an explicit outcomeFinalized sentinel that is
set exactly where outcome is deliberately finalized (missing env var, login
timeout, post-submission timeout, success), so any other exception correctly
falls through to the catch-all branch with its real message.
2026-07-18 18:15:41 +03:00
Doar Mihai 6982aa56bf feat: add Reddit login and post-creation Playwright test 2026-07-18 18:14:29 +03:00
Doar Mihai 2e53a8767b chore: scaffold reddit-post Playwright sidecar project 2026-07-18 18:08:18 +03:00
Doar MihaiandClaude Sonnet 5 b237617c35 docs: add implementation plan for Reddit post Playwright sidecar
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-18 18:02:49 +03:00
Doar MihaiandClaude Sonnet 5 44040e7c1e docs: add design spec for Reddit post Playwright sidecar
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-18 18:00:20 +03:00
Doar MihaiandClaude Sonnet 5 e0b8f2f924 feat: add full CRUD Posts API
Adds JSON API for Posts (index/show/store/update/destroy) so an AI
agent can draft posts, read what's due for publishing, and report
back publish/fail status. Unlike the existing read-only Sites/Accounts
APIs, this is full CRUD since the app itself never publishes anything.

- PostController with status/site_id/social_account_id/due filters
- StorePostRequest/UpdatePostRequest validate against Post::TYPES/STATUSES
- PostResource shapes the JSON response
- Route::apiResource('posts', ...) registered with ->names('api.posts')
  to avoid colliding with the existing web posts.index route name
- store() calls ->fresh() after create() so the response reflects the
  DB-level default status ('draft') instead of a stale in-memory null

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-18 17:22:16 +03:00
Doar MihaiandClaude Sonnet 5 be8e6e997f feat: add Posts Livewire CRUD page
Adds the Posts index page (list/create/edit/delete) following the
existing Sites/SocialAccounts pattern, and extends the shared nav
layout with a Posts link.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-18 17:13:50 +03:00
Doar MihaiandClaude Sonnet 5 f746c5d6a0 feat: add Post model, migration, and factory
Adds the Post model belonging to Site (required, cascade-deletes with
the site) and SocialAccount (nullable, nulled out on account delete).
Foundation for the Scheduled Posts feature; later tasks build the
Livewire CRUD UI and API on top of this model.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-18 17:07:48 +03:00
Doar MihaiandClaude Sonnet 5 4293475ce1 docs: add implementation plan for Scheduled Posts feature
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-18 16:53:18 +03:00
Doar MihaiandClaude Sonnet 5 6c135ca56f docs: add design spec for Scheduled Posts feature
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-18 16:43:09 +03:00
Doar Mihai 743bba3a65 feat: add home page linking to Sites and Social Accounts 2026-07-18 16:09:37 +03:00
Doar MihaiandClaude Sonnet 5 5c24b6fbe0 feat: add read-only Social Accounts API
Add GET /api/accounts (list with optional ?network= and ?type= filters) and
GET /api/accounts/{socialAccount} (show) endpoints. Include plain-text password
field for AI agent consumption.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-18 15:25:56 +03:00
Doar MihaiandClaude Sonnet 5 20c33f1c23 feat: add read-only Sites API
Add GET /api/sites endpoint for listing sites with optional name filter,
and GET /api/sites/{site} for showing individual sites. Includes API
resource, controller, routes registration, and comprehensive tests.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-18 15:12:44 +03:00
Doar MihaiandClaude Sonnet 5 cee5b1976b feat: add Social Accounts Livewire CRUD page
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-18 15:05:55 +03:00
Doar MihaiandClaude Sonnet 5 3f46eecff8 chore: commit package-lock.json for reproducible npm installs
Generated during Task 5 (first task requiring npm install for the
Vite manifest); committing it so future installs resolve identical
dependency versions.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-18 15:01:32 +03:00
Doar Mihai e75a846a97 feat: add Sites Livewire CRUD page 2026-07-18 14:57:47 +03:00
Doar MihaiandClaude Sonnet 5 b894529b08 feat: add shared app layout with nav
Creates the <x-layouts.app> Blade component that provides the main
application shell, including Livewire styles/scripts, top navigation
linking to Sites and Social Accounts pages, and a slot for page content.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-18 14:52:24 +03:00
Doar MihaiandClaude Sonnet 5 137a15f5ff feat: add SocialAccount model, migration, and factory
Implement SocialAccount model with enum fields for network and type,
along with migration and factory. Includes NETWORKS and TYPES constants
for dropdown usage in Livewire forms and validation.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-18 14:50:00 +03:00
Doar MihaiandClaude Sonnet 5 889ac9b7f9 feat: add Site model, migration, and factory
Implements Task 2: creates the Site model with fillable name, url, and
description fields; the corresponding database migration; and a factory
for generating test data. Includes TDD tests verifying model creation
with and without optional description.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-18 14:45:55 +03:00
Doar MihaiandClaude Sonnet 5 9b8dba5cf5 docs: correct plan tech stack to Livewire 4
Livewire 3 does not support Laravel 13; composer resolved v4.3.3.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-18 14:44:24 +03:00
Doar MihaiandClaude Sonnet 5 80b8142de1 chore: install livewire, enable RefreshDatabase for feature tests
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-18 14:41:24 +03:00
Doar MihaiandClaude Sonnet 5 900e4f0309 Initial commit: Laravel skeleton with sites & accounts spec/plan
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-18 14:35:53 +03:00