Repository navigation
feat(tools/discourse): list category topics by latest activity - #24
Draft
MakerFlyFly wants to merge 4 commits into
Draft
MakerFlyFly wants to merge 4 commits into
MakerFlyFly wants to merge 4 commits into
Conversation
Projects using Discourse need to discover category discussions before fetching individual topics. Resolve category IDs and catalog paths, then read explicit activity-ordered lists through the existing GET client. Filter on bumped_at without substituting the last-message timestamp. Deduplicate matches and look ahead for an additional match so truncation reports evidence rather than assuming that another page contains results. Fail incomplete reads through the existing CLI error channel, and keep the adapter partial until the remaining archive operations are available. Generated-by: Codex (GPT-6)
5 tasks
Use the requested native descending activity order to stop when an explicitly non-pinned topic is older than since. Missing pin evidence must not be replaced by the output default when deciding the cutoff. Keep category metadata separate from slug matching so an empty or unusable slug does not block numeric ID reads or unrelated selections. Resolve bare slugs only at the catalog root, requiring full ancestry or a numeric ID for subcategories and incomplete catalogs. Retain evidence-based truncation and the integer-conversion error channel. Add regressions and clarify the supported CLI behavior. Generated-by: Codex (GPT-6)
Resolve category IDs from native references and restrict catalog lookup to top-level slugs. Treat continuations as signals while rebuilding every request with the fixed category and activity order. Keep whole-page validation and exact truncation, consolidate regressions, and clarify that pinned category topics count toward the result limit. Generated-by: Codex (GPT-6)
Resolve category paths against the configured forum without duplicating its base path. Keep full URL boundaries and reject protocol-relative references before any request. Clarify unsupported list-view suffixes and cover rooted paths on root and subfolder installations. Generated-by: Codex (GPT-6)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
magpie-discourse topic list --category <id|slug|url|slug/.../id> [--since <ISO-8601>] [--limit N]so projects can discover category discussions before reading individual topics. Include subcategories and reuse the existing GET client.bumped_atand preserve native pinned positions. Look ahead for an extra unique match to prove truncation; pinned topics, including category About topics, count toward the limit.Coverage: partial.Type of change
Test plan
RFC-AI-0004 compliance
Linked issues
Owner audit: MakerFlyFly/magpie#23.
Refs apache/magpie#307, following merged apache/magpie#1755.
This slice does not close the broader request.
Notes for reviewers
b9e14009367f37efce807e473b95c331286036a1(audit/discourse-topic-list-base). Head:a3794eff6acfb9e9a2635da28fa3632ac65fe8ab(feat/discourse-topic-list). The complete PR contains PR2 only: 10 files, +1018/-9.parent/childsyntax is removed. Use an ID, a same-forum category URL orslug/.../IDfor descendants; top-level slug lookup can be incomplete and suggests an ID when unresolved.--since, there is no fixed recent-time window. Filtering returned pinned topics does not refill the result. With since, only an older topic explicitly markedpinned: falseestablishes a cutoff.AI disclosure
AI-generated draft for owner audit. Codex (GPT-6) assisted implementation, review-response analysis, tests and validation.
This draft does not claim completed contributor manual review.