Skip to content

feat(rm-handlers): W6 — News + WikiPage handlers#16

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/w6-news-wiki-handlers
Jun 21, 2026
Merged

feat(rm-handlers): W6 — News + WikiPage handlers#16
AdaWorldAPI merged 1 commit into
mainfrom
claude/w6-news-wiki-handlers

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

W6 from the Redmine Integration Plan

First comms-track concepts. Two top-level content-browsing pages.

Route class_id URL key
GET /news[+/:id] 0x0114 project_news record-key (no slug field)
GET /wiki[+/:title] 0x010C project_wiki_page title slug, percent-encoded

Scope split

W6 in the plan groups News + WikiPage + Comment + Message + Forum + Attachment. This PR ships the two top-level content-browsing concepts; the others nest or sidecar:

  • Comment threads under Issue / News (lands with Issue journal embedding)
  • Message + Forum are a nest pair (W6 followup)
  • Attachment is polymorphic sidecar — lands with D5 custom fields' file uploads

Notable

  • News follows Redmine's integer-PK URL (/news/:id — we hash a stable u64 from the SurrealDB record key for data-record-id)
  • WikiPage uses Redmine's slug URL (/wiki/:title) — multi-project nesting (/projects/:proj/wiki/:title) waits for Member/Membership join in a W2 followup
  • Both go through common::html_escape + common::encode_path_segment from fix(handlers): XSS in titles/headlines + URL-encode slugs + RM_BIND fail-fast #14, so XSS + URL-reserved chars are handled

DoD pinned by 14 new tests

Where Count What
rm-store/src/news.rs 3 round-trip, NotFound, list 0/2
rm-store/src/wiki_page.rs 3 round-trip by title, NotFound, list 0/2
rm-handlers/src/news.rs 4 empty-state 0x0114, list with hrefs, detail by key, 404
rm-handlers/src/wiki_pages.rs 4 empty-state 0x010C, detail by title, 404, percent-encoded title in href

All three CI gates green: fmt + clippy + cargo test --workspace (141 tests across 5 crates).

Status

6 of 8 width tracks shipped. W1 ✓ W2 ✓ W3 ✓ W4 (User+Role) ✓ W5 (3/4) ✓ W6 (2/6) ✓. Remaining: W4 nested, W6 nested, W7 SCM-light, W8 Queries/Relations.

🤖 Generated with Claude Code

W6 of the Redmine Integration Plan, first comms-track concepts.

# Routes

- GET /news       + /news/:id      News list / detail (0x0114)
- GET /wiki       + /wiki/:title   WikiPage list / detail (0x010C)

# Scope split

W6 in the plan groups Comment + News + Message + Forum + WikiPage +
Attachment. This PR ships the two TOP-LEVEL content-browsing
concepts. The other four are nested or sidecar:
- Comment → threads under an Issue or News (W6 followup, lands
  with the Issue detail journal embedding)
- Message + Forum (Board) → forum/thread nest pair (W6 followup)
- Attachment → polymorphic sidecar on Issue/Document/Project (W6
  followup, also unblocks D5 custom-fields file uploads)

# News URL convention

News uses record-keyed URL (`/news/:id`) following Redmine's
`/news/:id` integer-PK convention — no slug field on the row.

# WikiPage URL convention

WikiPage uses slug-keyed URL (`/wiki/:title`) following Redmine's
`/projects/:proj/wiki/:title` shape, flattened to the top level
for MVP since multi-project nesting needs the Member/Membership
join that lands in a W2-followup.

# DoD pinned by 14 new tests

Store (6):
- News + WikiPage round-trip
- find returns NotFound for unknown
- list empty/populated

Handlers (8):
- News list empty-state w/ class_id 0x0114
- News list with 1 entry visible + record-key href
- News detail by record key
- News detail 404
- WikiPage list empty-state w/ 0x010C
- WikiPage detail by title
- WikiPage detail 404
- WikiPage list percent-encodes `A/B testing` → `A%2FB%20testing`

# Status: 6/8 width tracks shipped

W1 ✓ W2 ✓ W3 ✓ W4 (User+Role) ✓ W5 (3/4) ✓ W6 (2/6) ✓.
Remaining: W4 nested (Member/MemberRole/Watcher), W6 nested
(Comment/Message/Forum/Attachment), W7 SCM-light, W8 Queries.

cargo fmt --check + cargo clippy --all-targets -- -D warnings +
cargo test --workspace all green locally; 141 tests across 5 crates.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@AdaWorldAPI AdaWorldAPI merged commit 65d33c2 into main Jun 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant