Skip to content

Add CONTRIBUTING.md guide - #217

Merged
cryppadotta merged 1 commit into
paperclipai:masterfrom
aaaaron:CONTRIBUTING
Mar 7, 2026
Merged

Add CONTRIBUTING.md guide#217
cryppadotta merged 1 commit into
paperclipai:masterfrom
aaaaron:CONTRIBUTING

Conversation

@aaaaron

@aaaaron aaaaron commented Mar 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a CONTRIBUTING.md with clear guidance for new contributors
  • Two paths: small focused fixes (fast merge) vs larger changes (discuss in Discord first)
  • General rules for commit messages, PR hygiene, and testing

🤖 Generated with Claude Code

@cryppadotta

Copy link
Copy Markdown
Contributor

did you mean to put the onboarding wizard changes in this commit

@aaaaron

aaaaron commented Mar 7, 2026

Copy link
Copy Markdown
Collaborator Author

Nope, and was already fixing it

@cryppadotta
cryppadotta merged commit 3b08d4d into paperclipai:master Mar 7, 2026
1 of 2 checks passed
@greptile-apps

greptile-apps Bot commented Mar 7, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a CONTRIBUTING.md guide outlining two contribution paths for new contributors, and bundles an unrelated fix to the OnboardingWizard adapter-selection click handler.

Key changes:

  • CONTRIBUTING.md – new file with clear contribution guidelines, two contribution paths (small focused fixes vs. larger Discord-discussed changes), and general PR hygiene rules.
  • OnboardingWizard.tsx – click handler for adapter-type selection is refactored:
    • Adds an early-return guard when the same adapter type is re-clicked (if (nextType === adapterType) return).
    • Rewrites two separate if blocks into a single if / else if / else chain — this fixes a subtle React state-batching bug in the original code where setModel("") (at the bottom) always ran last and silently overrode the setModel(DEFAULT_CODEX_LOCAL_MODEL) / setModel(DEFAULT_CURSOR_LOCAL_MODEL) calls above it.
    • Removes the && !model guards, so the default model is now always applied whenever the user switches to codex_local or cursor — a behavioral change that may affect users who had previously entered a custom model string.

Notable concern: the PR inadvertently violates the "One PR = one logical change" rule it introduces in CONTRIBUTING.md, as the documentation and the OnboardingWizard fix are unrelated.

Confidence Score: 4/5

  • Safe to merge with minor caveats — the OnboardingWizard logic fix is an improvement, but the unconditional model reset on adapter switch is a deliberate UX change that should be confirmed.
  • The CONTRIBUTING.md is pure documentation with no risk. The OnboardingWizard change fixes a real state-batching bug and is logically sound, but removes the !model guard, which changes visible UX behavior (model always resets to default on adapter switch). No tests appear to cover this component's click logic, so the change can't be automatically verified. Otherwise the change is small and well-scoped.
  • ui/src/components/OnboardingWizard.tsx — confirm the intentional UX change of always resetting the model on adapter switch.

Important Files Changed

Filename Overview
CONTRIBUTING.md New documentation file outlining two contribution paths (small fixes vs. larger changes), general commit/PR hygiene rules, and a Discord contact pointer. Content is clear and low-risk.
ui/src/components/OnboardingWizard.tsx Refactors the adapter-type selection click handler: adds an early-return guard for same-type re-clicks, rewrites separate if-blocks into a single if-else chain (fixing a state-batching bug where setModel("") always ran last), and removes && !model guards — meaning the default model is now always applied on every adapter switch, which is a behavioral change worth confirming.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A([User clicks adapter option]) --> B{opt.comingSoon?}
    B -- Yes --> Z([return — no-op])
    B -- No --> C{nextType === adapterType?}
    C -- Yes --> Z
    C -- No --> D[setAdapterType nextType]
    D --> E{Which adapter type?}
    E -- codex_local --> F[setModel DEFAULT_CODEX_LOCAL_MODEL]
    E -- cursor --> G[setModel DEFAULT_CURSOR_LOCAL_MODEL]
    E -- opencode_local --> H{model includes '/'}
    H -- Yes --> I([keep existing model])
    H -- No --> J[setModel empty string]
    E -- anything else --> K[setModel empty string]
Loading

Comments Outside Diff (1)

  1. ui/src/components/OnboardingWizard.tsx, line 707-723 (link)

    Model reset on every adapter switch

    The old code guarded setModel(DEFAULT_CODEX_LOCAL_MODEL) and setModel(DEFAULT_CURSOR_LOCAL_MODEL) with && !model, hinting the intent was to preserve a user's previously entered model when they switch back to a familiar adapter type. With the !model check removed, every switch to codex_local or cursor now unconditionally resets the model to the hard-coded default.

    In practice this means: a user who picks codex_local, types in a custom model string, navigates to a different adapter to compare options, then returns to codex_local will silently lose their custom entry — it is always overwritten with DEFAULT_CODEX_LOCAL_MODEL.

    (The early-return guard if (nextType === adapterType) return prevents the reset when clicking the same option twice, but it does nothing when the user switches away and back.)

    If the intent is to always start fresh with the default when the adapter changes, that is reasonable UX — but it is worth confirming this is deliberate, since it is a visible behavior change for returning users.

Last reviewed commit: 049f768

Comment thread CONTRIBUTING.md
## General Rules (both paths)
- Write clear commit messages
- Keep PR title + description meaningful
- One PR = one logical change (unless it's a small related group)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PR itself violates the rule it introduces

This PR's own CONTRIBUTING.md says "One PR = one logical change", yet this same PR bundles two unrelated changes: adding the CONTRIBUTING.md guide and fixing the OnboardingWizard.tsx model-reset logic. While neither change is large, they are completely unrelated and would ideally be separate PRs (or at least the description should acknowledge the grouping).

tmartin2113 pushed a commit to tmartin2113/paperclip that referenced this pull request Mar 15, 2026
nydamon added a commit to nydamon/paperclip-1 that referenced this pull request Apr 9, 2026
…avior (paperclipai#217)

Agents using pi_local adapter resume conversations from session files.
When these sessions are days old, the LLM echoes stale conclusions
("Fleet clean") instead of re-checking its inbox. The CEO had 321
stale task sessions and a 2-day-old runtime session, causing it to
ignore all reopened/unblocked tasks.

New sweeper expireStaleAgentSessions() runs every ~30s:
- Clears runtime session pointers (agent_runtime_state.session_id)
  older than 4 hours, forcing fresh conversations
- Prunes agent_task_sessions older than 48 hours to prevent
  unbounded table growth

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
a13xperi pushed a commit to a13xperi/paperclip that referenced this pull request Apr 9, 2026
a13xperi added a commit to a13xperi/paperclip that referenced this pull request Apr 11, 2026
…lipai#216 paperclipai#217) (#2)

* feat(paperclip): claude_api adapter + per-agent model routing (paperclipai#216 paperclipai#217)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* ci: add claude-api package.json to Dockerfile deps stages

The claude-api adapter introduced in dd14f5c is a new workspace
package but wasn't copied in the deps stage of Dockerfile or
Dockerfile.railway. pnpm install in the deps stage therefore
never registered it, so packages/adapters/claude-api/node_modules
had no symlink to @paperclipai/adapter-utils.

When ui's tsc -b walked into claude-api/src/ui/* (re-exported via
package.json exports), resolving adapter-utils failed with TS2307,
breaking both the fork PR verify workflow and the pr.yml policy
check that validates every workspace package is copied in the
deps stage.

Fix: COPY packages/adapters/claude-api/package.json in both deps
stages, just after adapter-utils, so the shape matches claude-local.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Alex Peri <aitkenassociates@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
p4w4n pushed a commit to p4w4n/paperclip that referenced this pull request May 8, 2026
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.

2 participants