Skip to content

feat: implement domain-centric discussion interface#183

Merged
iamfj merged 6 commits intonextfrom
issue-146-discussion-design
Apr 25, 2026
Merged

feat: implement domain-centric discussion interface#183
iamfj merged 6 commits intonextfrom
issue-146-discussion-design

Conversation

@iamfj
Copy link
Copy Markdown
Member

@iamfj iamfj commented Apr 25, 2026

What does this PR do?

Implements issue #146 discussion interface redesign by introducing domain-centric discussion commands across issues, projects, and initiatives, while keeping comments as a deprecated compatibility façade.

Key changes:

  • adds dedicated GraphQL discussion queries/mutations and regenerates typed operations
  • adds discussion-service for:
    • listing root discussions for issues, projects, and initiatives
    • listing thread replies, including arbitrarily deep nested replies
    • starting discussions and replying to root threads
    • editing and deleting root/reply comments
    • resolving and unresolving discussion threads
    • enforcing domain-scoped thread operations so issue/project/initiative commands reject mixed-domain thread IDs
  • adds domain-centric discussion commands across issues, projects, and initiatives:
    • discuss, discussions, replies, reply, edit, delete-comment, edit-reply, delete-reply, resolve, unresolve
  • keeps entity delete commands intact while adding non-conflicting discussion deletion via delete-comment
  • routes legacy comments commands through discussion service with explicit deprecation + migration guidance
  • updates README examples and migration docs to discussion-first workflows
  • adds/updates unit tests for service behavior, command wiring, validation, compatibility, nested replies, and deprecation help text

Closes #146

Type of change

  • Bug fix
  • New feature
  • Refactor (no behavior change)
  • Documentation
  • Tests
  • Build / CI

Checklist

  • npm run check:ci passes (lint + format)
  • npx tsc --noEmit passes (type check)
  • npm test passes (unit tests)
  • New code has tests (happy path + primary error case)
  • Commit messages follow Conventional Commits

Testing

Executed in worktree branch:

npm run check:ci
npx tsc --noEmit
npm test
npm run build

Results:

  • all commands exit 0
  • npm test: 53 files / 654 tests passing

Targeted verification additionally run during implementation:

  • npx vitest run tests/unit/services/discussion-service.test.ts
  • npx vitest run tests/unit/commands/issues.test.ts tests/unit/commands/projects.test.ts tests/unit/commands/initiatives.test.ts
  • npx vitest run tests/unit/commands/comments.test.ts

Notes for reviewers

Docs note:

  • README migration guidance documents root-thread vs reply workflows, nested reply listing, and the generic root/reply edit plus delete-comment commands.

Risk note:

  • This change expands discussion command surface across three domains. Main regression risk is CLI discoverability/compatibility, especially around command naming, nested reply pagination, and deprecated comments behavior. Entity delete commands remain unchanged, and discussion deletion uses delete-comment to avoid command collisions.

Additional notes:

  • comments remains available for backward compatibility but is explicitly deprecated in help/meta text.
  • Compatibility scope remains intentionally narrowed for replies: comments reply expects a root discussion thread ID; nested reply targets are not supported in compatibility mode.
  • Generic edit <comment> accepts root discussion IDs and reply IDs.
  • delete-comment <comment> was added instead of overloading existing entity delete commands, preserving backward compatibility for issues delete, projects delete, and initiatives delete.
  • Initiative discussion listing preserves not-found behavior with an explicit existence check.
  • Domain-scoped commands now validate that the supplied thread/comment ID belongs to the expected issue/project/initiative discussion domain.

@iamfj iamfj force-pushed the issue-146-discussion-design branch from bade2a5 to d1d8ba4 Compare April 25, 2026 15:43
@iamfj iamfj changed the base branch from main to next April 25, 2026 15:43
@iamfj iamfj force-pushed the issue-146-discussion-design branch from d1d8ba4 to 3977b58 Compare April 25, 2026 15:44
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bade2a57a4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/services/discussion-service.ts Outdated
Comment thread graphql/queries/discussions.graphql Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4bc9c91f13

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread graphql/queries/discussions.graphql Outdated
@iamfj iamfj force-pushed the issue-146-discussion-design branch from 4bc9c91 to 94f18a9 Compare April 25, 2026 17:47
@iamfj
Copy link
Copy Markdown
Member Author

iamfj commented Apr 25, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 61ca0607bc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread graphql/queries/discussions.graphql Outdated
@iamfj
Copy link
Copy Markdown
Member Author

iamfj commented Apr 25, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4599a0479c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/services/discussion-service.ts
Comment thread src/services/discussion-service.ts Outdated
@iamfj
Copy link
Copy Markdown
Member Author

iamfj commented Apr 25, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

iamfj added 6 commits April 25, 2026 21:00
Add GraphQL operations for discussion roots, replies,
and resolve state changes.

Implement discussion service helpers for listing root
threads and replies, creating root discussions and
replies, editing and deleting root/reply comments,
and resolving or unresolving threads.

Add service tests covering happy paths, nested reply
retrieval, domain validation, pagination behavior,
and primary error cases.
Add issue-scoped discussion commands for starting root
threads, listing roots and replies, replying, editing,
deleting, resolving, and unresolving discussions.

Preserve issue delete behavior by using
for discussion deletion and keep reply-specific commands
alongside generic root-or-reply edit and delete flows.

Add command tests for wiring, validation, pagination,
and output behavior.
Add project-scoped discussion commands for starting
root threads, listing roots and replies, replying,
editing, deleting, resolving, and unresolving
project discussions.

Keep entity deletion separate by using discussion-specific
delete commands and preserve reply-specific edit/delete
operations beside generic root-or-reply flows.

Add command tests for wiring, validation, pagination,
and output behavior.
Add initiative-scoped discussion commands for starting
root threads, listing roots and replies, replying,
editing, deleting, resolving, and unresolving
initiative discussions.

Align initiative discussion UX and validation with the
issue and project command surfaces, including domain-
scoped discussion safety checks.

Add command tests for wiring, validation, pagination,
and output behavior.
Keep legacy  command group available as a
deprecated compatibility facade over the discussion
service.

Make deprecation and migration guidance explicit in help
text and metadata, while preserving narrowed root-thread
reply compatibility and root-or-reply edit/delete support.

Add command tests for compatibility delegation, help
text, validation, and root-versus-reply behavior.
Document domain-centric discussion workflows in the
README, including root-thread listing, nested reply
listing, and reply examples.

Add migration guidance from deprecated
commands to the newer issue discussion commands and
note compatibility limits where they still apply.
@iamfj iamfj force-pushed the issue-146-discussion-design branch from 3cf434f to 7631b38 Compare April 25, 2026 19:01
@iamfj iamfj merged commit 08af46c into next Apr 25, 2026
8 checks passed
@iamfj iamfj deleted the issue-146-discussion-design branch April 25, 2026 19:04
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7631b38090

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/commands/comments.ts
Comment thread src/services/discussion-service.ts
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.

feat(issues): add discussion-oriented thread commands

1 participant