Commit Graph
418 Commits
Author SHA1 Message Date
retoorandClaude Sonnet 5.5 695be8ba9a Docs: update root CLAUDE.md, DEFINITION_OF_DONE, README and gitignore
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 01:51:53 +01:00
retoorandClaude Sonnet 5.5 1a9201cb91 Admin pages: one shared specification, builders, fragments, caps and live refresh
Adds admin_sections registry, shared admin partials, WorkspaceList, admin CLAUDE.md spec,
capped node/flag listings, and api/unit tests enforcing the spec.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 01:50:50 +01:00
retoorandClaude Sonnet 5.5 8d4d06de61 Gateway: refine routing, vision and request handling, update docs and tests
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 01:50:50 +01:00
retoorandClaude Sonnet 5.5 8e36807926 Gateway: per-target circuit breaker trips on first AI error and notifies all admins
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 01:07:47 +01:00
retoorandClaude Sonnet 5.5 151476125f Gateway: auto-resolve request shape per provider and model
An upstream that rejects a key the gateway adds (e.g. thinking) now gets
retried with other shapes on a parsable 400/422; the working method is
stored per (provider, target model) and applied first-try from then on.
Fallback attempts are re-shaped per attempt. Admin list/reset, Devii
tools, audit event and ledger resolved_method included.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 11:34:26 +01:00
retoorandClaude Sonnet 5.5 3f6e83c753 Position the More action menu under its trigger and align form-wrapped items
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-12 15:42:48 +01:00
retoor 8a48e3ef85 Keep composers usable, group actions and notifications, and drop the tool-count cap
DevPlace CI / test (push) Failing after 3h10m39s
Comment and post layouts stay full width on small screens. Secondary actions live in the More menu. Notifications can be grouped and throttled, and Enter can submit when that profile setting is on. Emulated-tool models accept large catalogs, with reserved names aliased on the wire and the catalog cached per owner. A dropped service-worker navigation is retried once. The test server waits 120s to finish importing before it is stopped.
2026-11-12 15:29:27 +01:00
retoor dbdd0d29dd Auth: username+password, email+password and API key everywhere; key returns carry username and email
POST /auth/login (form and JSON) now accepts the username in the email field, like HTTP Basic and POST /auth/token always did; the token endpoint no longer lowercases the identifier before the username lookup, fixing mixed-case usernames. The login field is relabelled and type=text so browsers accept a username.

Every JSON return of the personal API key now also returns the account username and email: the profile JSON gains a can_view_api_key-gated email beside api_key (username already rides profile_user), and POST /profile/regenerate-api-key returns {api_key, username, email}. A client holding only its DEVPLACE_API_KEY value can now fetch its full account via GET /profile in one call.

Documented fully: authentication prose page (three credentials, precedence, DEVPLACE_API_KEY, account fetch, separate DevRant/WebSocket auth domains), new auth-token docs_api card, regenerated-key sample, conventions, README, CLAUDE.md, OpenAPI description, corrected profile key hint. Summary in changes.md (left unversioned per request).

Tests: username/mixed-case/uppercase-email login and token cases, API-key account fetch via X-API-KEY and Bearer, owner/admin vs stranger/guest email gating, regenerate shape, browser login by username. Failing-first observed red, green after.
2026-11-11 16:07:43 +01:00
retoor 33eb090e27 Slim root CLAUDE.md to global-only rules, move subsystem detail to nested files
DevPlace CI / test (push) Failing after 1h1m39s
2026-11-08 20:33:09 +01:00
retoor 078d0657ff Merge pull request 'Messages: Facebook-style Chats panel and docked chat windows' (#191) from blindxfish/devplacepy:messenger-chat into master
DevPlace CI / test (push) Failing after 1h4m14s
Reviewed-on: #191
2026-11-07 18:10:30 +01:00
blindxfishandClaude Opus 5.5 17da9cb30c Messages: Facebook-style Chats panel and docked chat windows
DevPlace CI / test (pull_request) Failing after 1h7m10s
The topnav Messages icon opens a Chats panel (people search, recent
conversations, New message, link to the full page). Picking a person
opens a small chat window docked bottom-right; windows minimize to
avatar heads with unread counts and survive navigation within the tab.
Profile Send Message, the live message toast and message notifications
on /notifications open the same window. Phones and /messages keep the
full page.

Each window is dp-chat in mode="window", sharing one WebSocket through
chat/ChatSocketHub.js; chat/ConversationItem.js is the shared row
builder. No server changes.

The message input becomes [+] [text + emoji] [send] everywhere: + reveals
the attach and GIF buttons, which tuck away while typing.

Also fixes linked toasts never receiving clicks (pointer-events).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 13:21:29 +01:00
retoorandClaude Sonnet 5.5 920a679dcf Keep GIF picker tiles at a fixed row height so thumbnails are not squashed
DevPlace CI / test (push) Failing after 11m24s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-05 20:02:46 +01:00
retoorandClaude Sonnet 5.5 05d6633204 Render markdown in gist and project sidebar titles; add content visibility and GIF picker
DevPlace CI / test (push) Failing after 1h5m29s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-05 17:59:21 +01:00
retoorandClaude Sonnet 5.5 bc11475f29 Send per-app provider attribution titles from one gateway app registry
Add openai_gateway/apps.py as the single list of internal gateway apps and
send X-OpenRouter-Title (plus legacy X-Title and HTTP-Referer) per app to
every upstream. Label the Devii agent, bots, modifier, quiz grading, SEO
metadata, community and sync callers. Shorten two app references that
exceeded the 30 character limit and were recorded as default.
Also includes the pending Muse Code, route health and Responses work.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-04 18:45:09 +01:00
retoorandClaude Sonnet 5.5 ec30ed408c Open the profile actions menu before clicking Unblock in the report e2e test
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 11:53:55 +01:00
retoorandClaude Sonnet 5.5 f705099928 Inline YouTube Music embeds with one shared embed spec
YouTube Music has no player of its own and music.youtube.com sends
X-Frame-Options SAMEORIGIN, so music links render YouTube's own player
with an Open in YouTube Music caption. Tracks, playlists and OLAK5uy
albums embed; browse, channel, search and library stay plain links.

- embeds.py is the single URL spec (exact host allowlists, query-order
  independent, validated ids only); embed-spec.js is generated from it by
  the embeds-sync CLI command and drift is tested
- rendering.py and ContentRenderer.js both follow it; the old duplicate
  YouTube regexes are removed
- max 3 music embeds per content item, overflow stays a plain link
- fixes evilyoutube.com matching and watch?feature=share&v=ID links
- fixes the invalid unicode CSS escape that printed u2197 after every
  external link in rendered content
- docs, privacy third-party row, parser table tests, server/client parity

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 11:53:55 +01:00
retoor 762c06886c Ok
DevPlace CI / test (push) Failing after 47m21s
2026-10-26 02:55:25 +01:00
retoor 3bfde87fdb Introduce Devii agents subsystem with supervisor, policy, and evals
- Add agents package: controller, runner, store, tools, actions, evals, policy
- Wire agents into Devii service, session, registry, CLI, and dispatcher
- Extend database schema and config for agent persistence
- Add news and telegram bridge updates plus landing UI and docs
- Cover agents, news, and telegram flows with unit tests
2026-10-26 02:54:44 +01:00
retoor 407673bf57 Nodes
DevPlace CI / test (push) Failing after 45m44s
2026-10-20 16:58:31 +02:00
retoor 52a4ebbe58 Merge pull request 'Code Farm: front-view server rack and API-backed terminal' (#176) from blindxfish/devplacepy:codex/code-farm-rack-terminal into master
DevPlace CI / test (push) Failing after 45m36s
Reviewed-on: #176
2026-10-20 16:52:54 +02:00
blindxfish 213cb833ef Verify live game panels and leaderboard API contents
DevPlace CI / test (pull_request) Failing after 46m7s
2026-10-19 21:46:36 +02:00
blindxfish 8155f394bd Code Farm: add front-view server rack and API-backed terminal
DevPlace CI / test (pull_request) Failing after 46m19s
2026-10-19 21:32:45 +02:00
retoor 7274cc1840 Party Hardy
DevPlace CI / test (push) Failing after 45m54s
2026-10-17 07:33:08 +02:00
retoorandClaude Sonnet 5.5 d84e4cf3d3 Code Farm docs: Continuous Delivery for bots, exact formulas, accuracy fixes
DevPlace CI / test (push) Failing after 46m24s
Document auto-replant and POST /game/plot/stop in detail for automation authors
(exact conditions, quest/audit differences, race behavior, rotation recipe),
add an Exact formulas section (build time, rewards, raid payout, quests,
contracts, market supply), document the remaining crop/perk/legacy state fields.
Fix: Golden Parachute carry-over is up to 60%, crops reward_xp is base XP, and
stale game CLAUDE.md notes (Mastery step 5, raid notification names the raider).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 03:30:31 +02:00
retoor d326c6b3f1 Dit is hoe wij doen in oost
DevPlace CI / test (push) Failing after 46m20s
2026-10-17 03:18:43 +02:00
retoorandClaude Sonnet 5.5 02ab747cd0 Code Farm: per-plot auto-replant pause and crop-lock check; community sync and node work
DevPlace CI / test (push) Failing after 44m45s
Continuous Delivery could never be turned off once a crop was planted. Add a
one-shot per-plot "stop after harvest" flag (POST /game/plot/stop, Devii tool
game_plot_stop, game_plots.stop_after_harvest), cleared by the next plant,
autoreplant claim or Refactor. Autoreplant now also respects crop locks through
the shared _crop_lock predicate. Plan and measurements in happyplanting.md.

Also includes the pending community sync, node network and related work in the
tree; the full suite passed (4999) with all of it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 02:23:43 +02:00
retoor ce899fc5e1 Nice
DevPlace CI / test (push) Failing after 36m50s
2026-10-16 09:51:52 +02:00
retoorandClaude Sonnet 5.5 8d18994c2e Community sync: fix comment, identity and refusal bugs; add per-record sync ledger
Fixes found by investigating the live lobste.rs run:
- Comments came back 0: the learner probed the external article, not the
  discussion page. A comments_url field (RSS <comments>, JSON key, or an HTML
  "comments" anchor) now drives comment learning; the article is still used
  for the post body.
- HTML id selectors collapsed every story into one identity (constant /login
  vote link). Id/url selectors must now be distinct; no distinct selector
  rejects the feed.
- Over-long posts were rejected; title, post and comment are truncated to the
  sync limits and reported as a warning.
- A failed article fetch is a warning, not a run error.
- A gate refusal (sync disabled, origin not allowed, aliasing off) ends the run
  as skipped and no longer counts toward the failure floor.
- The same story from two feeds becomes one post, comments attached to it.
- HTML comments follow rel=next up to max_comment_pages.
- A dry run now predicts an unknown-record tombstone as unchanged, like a live
  run.
- /nodes is exempt from the happy-404 decoy so a missing download is a real 404.

Sync log (admin): every run stores a verdict, exact per-outcome counts and one
row per record needing an explanation, with the reason in plain words, at
/admin/communities/{slug}/ledger (HTML, JSON, Devii tool, docs entry).
Bounded: 2000 routine + 2000 problem rows per run, 50 per page, detail kept for
the 10 newest runs, four indexes matching every ORDER BY (asserted by an
EXPLAIN QUERY PLAN test). Measured worst case 37 ms at the 40000-row ceiling.

Also: privacy disclosure for imported community content, status colour channel
tokens, and tests/unit/cli/nodes.py renamed to fix a duplicate-basename
collection error.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 09:26:08 +02:00
retoor 6f80a820da Zo doen wijdat in oost
DevPlace CI / test (push) Failing after 3m13s
2026-10-16 07:20:44 +02:00
retoorandClaude Sonnet 5.5 25d9cb1c7d Gateway: drop strict on a tool whose schema cannot meet strict mode instead of failing the call with 400
Chat clients such as AIRI send strict: true with looser schemas; the Responses
upstream answers 400 unless every object has additionalProperties false and
every property is required. The transpiler now downgrades that tool to
non-strict and reports it in the warnings list.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 18:40:13 +02:00
retoorandClaude Sonnet 5.5 42b81271b8 Add community node socket: devices, tickets, consent gate, kill switch
Phase 3 of plan.md. Device registration with one-time secrets, scoped single-use
socket tickets, the lock-owner WS /nodes/ws with handshake and heartbeat eviction,
a single batch ConsentGate, and NodesService which disconnects nodes within one tick
when consent, device or the nodes_enabled kill switch changes. A reconcile of 2000
sessions measured about 110 ms after replacing per-session queries with batches.
Devii may withdraw but never grant bandwidth_sharing.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 09:14:53 +02:00
retoorandClaude Sonnet 5.5 fad41d0fbe Document that pravda.education is no longer DevPlace and what this host runs
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 08:37:37 +02:00
retoorandClaude Sonnet 5.5 b616bce0ea Add community node data layer: tables, usage ledger, bandwidth_sharing consent
Phase 2 of plan.md. Seven node_* tables with atomic device, bandwidth and XP caps,
a transactional job ledger whose lifetime totals survive pruning, clamped donor
settings, and the bandwidth_sharing consent kind. The acceptance service now has
an explicit exclusion list so it can never grant that consent.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 08:32:17 +02:00
retoorandClaude Sonnet 5.5 f55c7ee5f4 Add community node protocol spec, Agent Skills, and make the failing tests hermetic
DevPlace CI / test (push) Failing after 31m42s
Community nodes (Phase 1 of plan.md): the protocol specification in
services/nodes/spec.py as the single source of truth, GET /nodes/spec.json,
a generated protocol docs page, the Community nodes API docs group, and the
implementation plan plus the residential proxy research. The no-open-proxy rule
is enforced in the spec (open_proxy cannot be set).

Agent Skills: register the Skills API docs group, cascade skills on account
deletion, add the nested CLAUDE.md, README and routes docs, and cover the
parser, the fetcher (end to end against a mock origin), the data layer and the
routes with 73 unit and 16 api tests.

Tests made hermetic with the repo's existing patterns instead of ambient
environment: embeddings tests set OPENROUTER_API_KEY via monkeypatch, the
workspace tests install FakeBackend via runtime.set_backend, and the skills
install tests use run_async. DockerCliBackend now returns 127 (command not
found) when the CLI is missing instead of raising FileNotFoundError, so a host
without docker answers with a clean error rather than a 500. The Providers tab
empty state no longer names the Model routes tab.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 07:13:25 +02:00
retoor cae139ead9 Add personal notes, DeepSearch history, backup offload, and gateway auth throttling
DevPlace CI / test (push) Failing after 28m20s
Also streamline the top navigation: drop the Tools dropdown, make Quizzes
and Battles icon-only entries, and remove the Workspace, Containers and
Editor entry points from the project detail page.
2026-09-12 20:32:31 +02:00
retoor c4f7d01b2d Update werkend 2026-09-10 15:09:22 +02:00
retoorandClaude Sonnet 5 569f1dcc64 Add OpenCode Zen support, model health/stats dashboard, and gateway fallback fixes
AI gateway:
- Add a generic, admin-selectable `client_profile` field on gateway_providers
  (e.g. "opencode") so a provider needing special request headers (OpenCode
  Zen's client-identity spoofing) is configured like any other provider, not
  hardcoded by name.
- Track per-(provider, model) reliability/speed/latency health in memory,
  seeded from the existing gateway_usage_ledger at startup - purely
  observational, never influences routing.
- New Stats tab on /admin/gateway: request volume, latency, per-model
  breakdowns, and reliability weight, charted with a vendored Chart.js and
  devplace's own theme tokens.
- Record which model a failed request actually fell back to
  (fallback_used_route), surfaced in the Recent Failures table.
- Stop excluding context_length errors from fallback, and skip a primary
  attempt outright when its known context window is already too small for
  the estimated request size, going straight to the fallback.
- gateway_usage_ledger's provider/fallback_used_route columns and indexes
  are ensured centrally in database/schema.py's init_db(), the single point
  of truth for this table's schema.
- Non-OpenAI upstream routing and client-model passthrough; trust only the
  upstream's own X-Gateway-Model header for served-model attribution.

Devii agent:
- Fix a real lockup: plan/verify tools could be individually disabled via
  the admin tool toggles while still being required by the protocol gate,
  permanently bricking any task that needed tools. They can no longer be
  disabled, and the gate now also checks the tool is actually offered.
- Fix compaction being silently calibrated for a 1M-token model while
  running a much smaller one: context budget is now percentage-based and
  the summarizer's own request is sized to fit the real model.
- Give a specific, actionable retry message when plan()'s own arguments get
  cut off by the output limit, and tighten its schema to discourage
  overlong plans.

Other:
- Backup service: offload completed backups to a remote Hetzner Storage Box.
- Container manager: fix orphan blob leaks from sync races, add a two-phase
  plan/execute `system prune` CLI command.
- Admin gateway UI: replace the JS-rendered model/provider tables with
  server-rendered forms and pages.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DhmEkvutuwtzFVcLbTrhdo
2026-09-09 07:38:24 +02:00
retoorandClaude Sonnet 5 b475e7d6ed Revert sticky-column max-height capping - it truncated shorter columns
The previous fix (d88b3cea) gave every sticky sidebar/rail a
viewport-derived max-height + internal overflow-y:auto so a tall
column's content couldn't get skipped during a fast sticky unstick.
That solved reachability but broke something more visible: on any
page where a side column is naturally SHORTER than the page's tallest
column (the common case - main content usually exceeds the sidebars),
the row/page still grows to the tallest column's height, but the
capped side column's own box now stops at its cap and never continues,
leaving a large empty gap below it for the remainder of the row. On
the reported post page this cut "Related Discussions"/"Projects from"
off mid-list with dead space underneath, i.e. the site was no longer
"at least as long as its longest section" in the sense that mattered:
a shorter section's own rendered box stopped short of the room the
page actually had for it.

Verified empirically (not just by reasoning about sticky/grid
semantics, which are easy to get wrong) that plain `position: sticky`
with no cap already guarantees every part of a column becomes visible
at some point during ordinary page scroll, for any pair of column
heights on a page whose main content is bounded (post, profile,
leaderboard, docs, quiz scoreboard) - the browser's native stuck ->
released transition is smooth and passes the element's full content
through the viewport once its own natural height's worth of scroll
distance has elapsed, regardless of how much taller the other columns
are. Removed max-height/overflow-y/overscroll-behavior/scrollbar-
hiding from .sidebar-card, .feed-right, .leaderboard-page > aside,
.post-page-sidebar, .profile-sidebar, and .dashboard-sidebar, back to
plain sticky; simplified the nested-.sidebar-card overrides (needed
only to stop double-nested stickiness) to just `position: static`.
.ds-chat-log and .pf-tree keep their scrollbar-hiding - those are
genuinely bounded, self-contained widget panes (not page-scroll sticky
columns) and were never part of this problem.

Verified on the exact reported URL (devplace.net/posts/
607ebbd19b95-...): document height now matches the tallest column
(1494px, driven by the 1265px main column), every one of the 11
related-title entries across all three sidebar sections becomes
visible during a full incremental scroll, and the full-page screenshot
shows no truncation or dead space. Also verified full reachability
(every item seen, nothing capped) on profile, leaderboard, docs nav,
and the quiz scoreboard.

Known residual trade-off, not fixed here: on a page whose main column
is effectively unbounded (the feed's post listing), a side column
taller than one viewport only fully reveals its tail in the scroll
range immediately before the very end of that (very long) page, which
real users rarely reach. Fixing that would need an actual
independent-scroll-pane architecture (JS-driven), not a CSS-only
sticky pattern, and reintroduces the same capped/dead-space trade-off
this commit just removed - flagging it rather than silently
overclaiming full coverage.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vnp7vzE4hvsytMo5YjszJm
2026-09-08 21:02:45 +02:00
retoorandClaude Sonnet 5 891c15e8e2 Fix related-post sidebar preview text overflowing its card
.related-title/.related-meta (the "Gists from X"/"Projects from X"/
"Related Discussions" preview lines in the post-page sidebar) had no
overflow protection at all - no overflow, word-break, text-overflow,
or min-width. They're plain-text previews from content_preview(), not
run through the render_content markdown pipeline that normal post/
comment bodies get (which already has word-break: break-word) - so
this bug was unique to these sidebar previews. Combined with
.related-link being a flex-direction: column container with
align-items: flex-start, each line sizes to its own content width
instead of the card's, so one long unbroken token (a URL) runs past
the card edge with nothing to stop it.

Reported case (a project description ending in a bare GitHub URL)
happens to fit by half a pixel in one exact browser/width/font
combination, which is why it doesn't always reproduce - proved the
underlying CSS is still unsafe by reproducing the real content in an
isolated harness against the actual CSS and forcing a worst-case
unbroken string: it overflowed the card by 72px.

Added min-width: 0 to .related-link and single-line ellipsis
truncation (max-width: 100%, overflow: hidden, text-overflow:
ellipsis, white-space: nowrap) to both .related-title and
.related-meta - the same pattern already used correctly by the
messages conversation list. Checked every other consumer of
content_preview() and every visually similar flex-column card
sitewide; this was the only remaining gap.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vnp7vzE4hvsytMo5YjszJm
2026-09-08 20:49:14 +02:00
retoorandClaude Sonnet 5 d88b3cea8e Make sticky sidebar/rail columns independently scrollable
Every sidebar/rail column across the app (feed's left filter panel and
right rail, post detail's left/right rails, profile's sidebar, the
leaderboard's two rails, the dashboard sidebar, and the DeepSearch
citations pane) is `position: sticky` with no max-height or overflow
of its own. When a column's content is taller than the viewport, it
doesn't scroll with the page while pinned - it renders past the
bottom of the screen, unreachable until it "un-sticks" and flies past
during a fast page scroll. Confirmed live: the docs nav sidebar alone
is ~4300px of links against a ~900px viewport.

Each sticky column now gets a max-height matched to its own top
offset, `overflow-y: auto`, `overscroll-behavior: contain`, and a
hidden scrollbar (scrollbar-width/-ms-overflow-style/::-webkit-
scrollbar), the same invisible-scroll recipe already used by the
messages page. Purely additive CSS - no template changes, since every
target already had a distinguishing class.

Fixing the shared `.sidebar-card` component in sidebar.css covers
feed, admin, docs, gists, projects, battles, quizzes, and every
/tools/* page in one place. Also caught and fixed a latent bug along
the way: post.css already neutralized nested `.sidebar-card`s inside
`.post-page-sidebar` (position: static) to stop them independently
double-sticking, but the identical setup on the quiz page
(`.feed-right` wrapping the scoreboard's two `.sidebar-card`s) never
got that override - added the matching `.feed-right .sidebar-card`
rule.

Verified live with Playwright at a squeezed viewport height on feed,
post, profile, leaderboard, docs, and the quiz scoreboard: every
column's scrollTop reaches its true end independently, the center
column never moves, and no scrollbar is visible in any screenshot.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vnp7vzE4hvsytMo5YjszJm
2026-09-08 20:48:54 +02:00
retoorandClaude Sonnet 5 82d6628af1 Fix low-contrast links, inline code, and warning badges on dark surfaces
Two independent contrast bugs, both from a token being used somewhere
it was never validated as a text color:

- Links/inline code used --accent as their text color against dark
  card surfaces, measuring 2.8-3.6:1 (below the 4.5:1 AA threshold for
  normal text) depending on the surface. Worst case: the sender's own
  DM chat bubble uses --accent as its *background*, so a link inside
  your own message was the exact same color as the bubble - 1.0:1,
  functionally invisible. Added --link/--link-hover (same hue/
  saturation as --accent, lightened until they clear 4.5:1 against the
  darkest realistic surface) and repointed the sitewide `a`/`a:hover`
  default, `.rendered-content a`/`code`, `.docs-chat-bubble a`, and
  `.ds-chat-citations a`. The DM chat bubble additionally needed
  bubble-scoped overrides (link, AI-adjusted note, attachment-pending
  placeholder, failed-send outline/retry-hint) since its background
  *is* --accent, which --link alone doesn't fix.
- `background: var(--warning); color: var(--white)` (chat's connection
  banner, a container badge, a service-status badge, and docs' PUT/4xx
  badges) measured ~1.7:1 - yellow needs dark text. Added --on-warning
  mirroring the existing --on-accent pattern and repointed just the
  warning-backed variants, leaving sibling info/success/danger badges
  untouched (they have the same underlying issue but are out of scope
  for this pass).

--accent itself is untouched, so every button/badge/nav element using
it as a solid fill is unchanged. Verified with computed WCAG contrast
ratios and Playwright screenshots against a live render of the real
CSS, plus the production homepage to confirm no regression to brand
colors.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vnp7vzE4hvsytMo5YjszJm
2026-09-08 20:48:30 +02:00
retoorandClaude Sonnet 5 eec1b3e3de Quiet routine per-tick service logs, surface real failures at WARNING
BaseService logged "Next run in Ns" at INFO on every single execution
of every service, including the 1-2s-interval pub/sub bridges
(presence/notification/live-view relays), drowning the console in
routine noise while actual failures (run_once errors, loop errors,
on_disable errors) were logged at the same INFO level and got lost in
it. log() now takes an optional level (default INFO, unchanged for
existing callers); the routine tick line drops to DEBUG and the three
failure paths move to WARNING. Added DEVPLACE_LOG_LEVEL (default INFO)
so DEBUG-level ticks stay available on demand without a code change.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vnp7vzE4hvsytMo5YjszJm
2026-09-08 20:47:16 +02:00
retoor 36e5378f19 iUpdate
DevPlace CI / test (push) Failing after 1h35m45s
2026-09-08 05:10:33 +02:00
retoorandClaude Sonnet 5 68a7c3b002 Give the system-prune CLI command a two-phase plan/execute report
Restructures the disk-cleanup command to show location, current on-disk
size, and an estimated reclaim per area (attachments, project files,
container workspaces) before touching anything - --dry-run stops there.
A real run re-executes each check, reports actual items/bytes freed,
an "After" size per area, and a final total with elapsed time, flagging
any drift between the estimate and execution passes (e.g. the live
server wrote something in between).

store.gc_workspaces() now reports bytes freed alongside the removed
count (previously count-only), so the containers gc-workspaces CLI
action picks up the same reporting for free.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W5tFWkm3UbcstcbPKFE5gP
2026-09-08 05:07:31 +02:00
retoorandClaude Sonnet 5 3c69de9d55 Add Happy 404, featured/related sidebars, and next-post nav to the post page
Happy 404: an HTML 404 (unmatched route, or an explicit not-found inside a
real route) now renders a random existing post instead of the error page,
using the exact same context builder as a real post view. Toggle is the
happy_404_enabled site setting (default on, /admin/settings); JSON/API
requests and a handful of excluded prefixes are never affected. The pool of
candidate slugs is cached in-process and resampled periodically so it stays
fast and eventually cycles the whole posts table; on any internal failure it
falls straight through to the real 404 page.

Applying this everywhere surfaced ~60 existing tests that asserted a literal
404 for a legitimate resource-not-found flow (deleted post, unknown
container, wrong project slug, etc.) - each now disables the setting for the
duration of that specific check and restores it after, so the underlying
not-found behavior stays covered independently of the new feature.

Post page also gained, all built on the same shared post_page_context() so
they render identically on both a real post and a happy-404 page:
- A left sidebar (three separate cards, matching /feed's sidebar-card
  convention) for "Gists from {author}", "Projects from {author}" (private
  projects filtered through the normal visibility check), and "Related
  Discussions" - each cached per author and invalidated on create/edit/
  delete so new content shows up immediately.
- A right column reusing /feed's exact Daily Topic widget class for up to
  three "Featured" articles (the existing but previously-unused `featured`
  news flag), cached as a pool with per-request random sampling.
- A "Next post -> " link beside "Back to Feed", pointing at the next older
  post site-wide (blocked authors skipped). Wired through the same next_url
  mechanism already used for listing pagination, so it emits a real
  backend-rendered <link rel="next"> tag for SEO, not just a visible link.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BWJy6PrMMt5hwWxQwia2rd
2026-09-08 03:44:30 +02:00
retoorandClaude Sonnet 5 c0e6abb923 Trust only the upstream X-Gateway-Model header in the AI gateway
An upstream the gateway forwards to may itself emit X-Gateway-* headers
(e.g. another DevPlace-style gateway), which can collide with the ones
about to be built for the response. Only X-Gateway-Model is ever trusted
from upstream and relayed as-is - it is the one field an upstream can
legitimately know better than we do (it may have resolved an alias or
served a different pinned version). Every other header (cost, tokens,
latency, context, app-reference) is always our own measurement and is
never overwritten, since blending in an upstream's own accounting would
corrupt the usage ledger's per-model rollups and the quota math built on
top of it.

usage.upstream_reported_model() extracts that one header defensively
(case-insensitive lookup, rejects anything oversized or containing a
control character) and gateway._apply_served_model() applies it, display-
only, at the tail of every response-header build across chat, streaming,
embeddings, images, and passthrough.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BWJy6PrMMt5hwWxQwia2rd
2026-09-08 03:44:06 +02:00
retoorandClaude Sonnet 5 7880bf4b31 Fix container sync races that leaked orphan blobs; add a system-prune CLI command
sync_workspace (user-triggered) and the reconciler's sync_bidirectional_sync
could run concurrently for the same project, and store_upload's read-then-
write on a changed path meant two racing imports each wrote their own blob
while only one ever got referenced - the loser leaked forever. Combined with
no build-artifact exclusion, an actively-compiling workspace hit this
constantly and leaked 5.9M orphan blobs (~96GB) in production before it was
caught.

Closes it at the root: api._sync_dir_bidirectional_locked serializes both
call sites per-project (non-blocking - a project already mid-sync is simply
skipped until the next tick), and IMPORT_SKIP_NAMES/IMPORT_SKIP_EXTENSIONS
keep build output (build/, dist/, *.o, *.pyc, ...) out of the walk entirely.

Recovering what already leaked is a separate concern: a new CLI subcommand
(plus matching make targets) sweeps soft-deleted attachment/project-file
blobs and any blob with zero DB reference at all, plus orphaned container
workspace directories. run_maintenance_cleanup.sh wraps the existing
prune/clear commands for routine disk upkeep.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BWJy6PrMMt5hwWxQwia2rd
2026-09-08 03:43:49 +02:00
retoorandClaude Sonnet 5 85bd8fad47 Unify static asset cache-busting with the auto-bumped app version
DevPlace CI / test (push) Failing after 27m37s
config.STATIC_VERSION becomes f"{APP_VERSION}-{BOOT_ID}": APP_VERSION is
read live from pyproject.toml's version (auto-bumped on every commit by
.githooks/pre-commit), BOOT_ID is the same per-process launch marker as
before (DEVPLACE_STATIC_VERSION env or a wall-clock fallback). The static
asset URL /static/v<version>/... now names the actual commit's version
alongside the boot marker, instead of a bare timestamp.

Fixes nginx/nginx.conf.template's versioned-mount location regex, which
matched digits only (^/static/v\d+/) and would have silently dropped the
immutable, max-age=31536000 cache header for every asset in production
once the version segment carried a dot or hyphen. Verified live against a
running instance that the header still applies to the new URL shape.

Updates README, devplacepy/static/js/CLAUDE.md, and the
/docs/static-caching.html page to describe the new APP_VERSION/BOOT_ID
composition.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TwLhnueWrsK15wrieXE5m7
2026-09-07 16:27:28 +02:00
retoorandClaude Sonnet 5 6b9c48661a Use the shared run_async test helper instead of bare asyncio.run in provision tests
asyncio.run() opens and tears down its own event loop per call, bypassing
the shared background loop tests/conftest.py's run_async uses to refresh
the snapshot cache after each coroutine. Switch provision.py's editor_ready
and view tests to run_async for consistency with the rest of the async
test suite.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TwLhnueWrsK15wrieXE5m7
2026-09-07 16:27:15 +02:00
retoorandClaude Sonnet 5 78023d36ab Add automatic patch-version bumping via a tracked git pre-commit hook
pyproject.toml's version has never moved past the 1.0.0 scaffold value
across 368 commits; there was no bump mechanism at all, Claude-driven or
otherwise. Add .githooks/pre-commit (stdlib Python, no dependencies) that
increments the patch version on every commit and stages it automatically,
deferring to a deliberate version edit already staged in the same commit
and skipping merge commits. Wire it in via `make install` (git config
core.hooksPath .githooks) so it activates for every clone without
requiring any change to existing workflows.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TwLhnueWrsK15wrieXE5m7
2026-09-07 15:22:23 +02:00