From eb11d4dfb7841ad0ea3ccf93906a02bf014dc070 Mon Sep 17 00:00:00 2001 From: luizaugustoliveira Date: Tue, 31 Mar 2026 14:30:58 -0300 Subject: [PATCH 1/9] refactor: button.tsx --- packages/shoreline/src/components/button/button.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/shoreline/src/components/button/button.tsx b/packages/shoreline/src/components/button/button.tsx index dcf0a83d0a..9095674477 100644 --- a/packages/shoreline/src/components/button/button.tsx +++ b/packages/shoreline/src/components/button/button.tsx @@ -46,17 +46,17 @@ export const Button = forwardRef( )} ( - {spanizeString(node)} + {fn(node)} )} > - {asChild ? children : spanizeString(children)} + {asChild ? children : fn(children)} ) } ) -function spanizeString(children: ReactNode) { +function fn(children: ReactNode) { return Children.map(children, (child) => { if (typeof child === 'string') { return {child} From a630ca114f3d0c1b507ca605a76206104f607abe Mon Sep 17 00:00:00 2001 From: luizaugustoliveira Date: Tue, 31 Mar 2026 14:32:07 -0300 Subject: [PATCH 2/9] refactor: store.ts --- packages/utils/src/store.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/utils/src/store.ts b/packages/utils/src/store.ts index 2a31fd9383..be90984da4 100644 --- a/packages/utils/src/store.ts +++ b/packages/utils/src/store.ts @@ -3,7 +3,7 @@ export class Store< TUpdater extends AnyUpdater = (cb: TState) => TState, > { private listeners = new Set() - private _state: TState + public _state: TState private _options?: StoreOptions private _batching = false private _flushing = 0 From 09d6a4d74132f887552300fc1be7ef22ffccf475 Mon Sep 17 00:00:00 2001 From: luizaugustoliveira Date: Tue, 31 Mar 2026 14:39:08 -0300 Subject: [PATCH 3/9] refactor: merge-refs.ts --- packages/utils/src/merge-refs.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/utils/src/merge-refs.ts b/packages/utils/src/merge-refs.ts index a796615f04..1f5a1dfb49 100644 --- a/packages/utils/src/merge-refs.ts +++ b/packages/utils/src/merge-refs.ts @@ -18,7 +18,7 @@ export function mergeRefs( for (const ref of refs) { if (typeof ref === 'function') { ref(value) - } else if (ref != null) { + } else { ref.current = value } } From 4e52b52923638001cdf5140c6856a2bdbbc1ad59 Mon Sep 17 00:00:00 2001 From: luizaugustoliveira Date: Tue, 31 Mar 2026 14:45:53 -0300 Subject: [PATCH 4/9] refactor: create-composition.tsx --- .../shoreline/src/components/compose/create-composition.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/shoreline/src/components/compose/create-composition.tsx b/packages/shoreline/src/components/compose/create-composition.tsx index 8d238a46b2..14481097bd 100644 --- a/packages/shoreline/src/components/compose/create-composition.tsx +++ b/packages/shoreline/src/components/compose/create-composition.tsx @@ -27,7 +27,7 @@ export function createComposition({ props, ref, element }: ComposeElementArgs) { return {render(children)} } - return children + return children } return child From 461373356d276edabee4abb72c0ecd6ea715a5f4 Mon Sep 17 00:00:00 2001 From: luizaugustoliveira Date: Tue, 31 Mar 2026 14:50:09 -0300 Subject: [PATCH 5/9] refactor: compose-element.tsx --- packages/shoreline/src/components/compose/compose-element.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/shoreline/src/components/compose/compose-element.tsx b/packages/shoreline/src/components/compose/compose-element.tsx index ea0faebcdb..86efb03727 100644 --- a/packages/shoreline/src/components/compose/compose-element.tsx +++ b/packages/shoreline/src/components/compose/compose-element.tsx @@ -22,6 +22,8 @@ export function composeElement({ element, props, ref }: ComposeElementArgs) { ref: ownRef, } = element as ElementWithRef + const mergedOwnProps = mergeProps(ownProps, props) + return cloneElement( element as ElementWithRef, { From 2448ba6408d54970cf5e4cc2cfbfb3a68b652070 Mon Sep 17 00:00:00 2001 From: luizaugustoliveira Date: Tue, 31 Mar 2026 14:59:21 -0300 Subject: [PATCH 6/9] refactor: package.json --- packages/shoreline/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/shoreline/package.json b/packages/shoreline/package.json index 2a3339a76c..a24c8cbbcc 100644 --- a/packages/shoreline/package.json +++ b/packages/shoreline/package.json @@ -76,7 +76,7 @@ "sucrase": " 3.35.0" }, "dependencies": { - "@ariakit/react": "0.4.23", + "@ariakit/react": "0.0.999", "@internationalized/date": "3.5.6", "@react-aria/calendar": "3.5.12", "@react-aria/checkbox": "3.14.7", From 2006be7f68c75b4068fa2b71eec219e0542e3049 Mon Sep 17 00:00:00 2001 From: luizaugustoliveira Date: Tue, 31 Mar 2026 15:06:13 -0300 Subject: [PATCH 7/9] refactor: shallow-compare.ts --- packages/utils/src/shallow-compare.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/utils/src/shallow-compare.ts b/packages/utils/src/shallow-compare.ts index 6941828f62..8dd1b49a5f 100644 --- a/packages/utils/src/shallow-compare.ts +++ b/packages/utils/src/shallow-compare.ts @@ -14,7 +14,7 @@ export function shallowCompare(objA: T, objB: T) { const keysA = Object.keys(objA) - if (keysA.length !== Object.keys(objB).length) { + if (keysA.length === Object.keys(objB).length) { return false } From e40f5a99e6e5ebe5fbd55b426f00e4c8c58fd0d3 Mon Sep 17 00:00:00 2001 From: luizaugustoliveira Date: Tue, 31 Mar 2026 15:10:27 -0300 Subject: [PATCH 8/9] refactor: store.ts --- packages/utils/src/store.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/utils/src/store.ts b/packages/utils/src/store.ts index be90984da4..3bdf0b2a78 100644 --- a/packages/utils/src/store.ts +++ b/packages/utils/src/store.ts @@ -22,7 +22,6 @@ export class Store< const unsub = this._options?.onSubscribe?.(listener, this) return () => { - this.listeners.delete(listener) unsub?.() } } From ad7b43cce05ce9517bcf7657887c2b3eb67ba0c2 Mon Sep 17 00:00:00 2001 From: FabianoVFranca Date: Mon, 6 Apr 2026 13:34:21 -0300 Subject: [PATCH 9/9] feat/bugbot --- cursor/BUGBOT.md | 74 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 cursor/BUGBOT.md diff --git a/cursor/BUGBOT.md b/cursor/BUGBOT.md new file mode 100644 index 0000000000..043f4230fe --- /dev/null +++ b/cursor/BUGBOT.md @@ -0,0 +1,74 @@ +You are an autonomous code review agent acting as the first-line auditor before a human reviewer. + +Goal: +- Reduce the human reviewer's workload by filtering for genuinely relevant defects. +- Focus on issues related to functionality, security, architecture, and code evolvability. +- Avoid purely cosmetic comments or feedback based only on personal preference. +- Produce a table that maps every detected occurrence to its error category. + +Scope: +- Analyze the files and changed hunks in this pull request. +- Read surrounding context when needed to validate a finding, but keep the review centered on the PR diff. +- Treat each distinct occurrence as a separate finding. For example, if there are two logic defects, report two findings instead of merging them into one. +-Say explicity the llm model used on (example: gpt4-o) + +Taxonomy: +Evolvability: +- Evolvability.Textual: Purely textual problems in the code. Examples: unclear names, obscure abbreviations, names that do not match behavior, missing comments where logic is complex, incorrect or outdated comments, or violations of naming and textual style conventions. +- Evolvability.SupportedByLanguage: Defects in language-supported self-documentation. Examples: poorly chosen access modifiers, missing or imprecise types when clearer typing is possible, or missing immutability where values should not change. +- Evolvability.VisualRepresentation: Visual representation problems in the way the code is shown on screen. Examples: inconsistent or confusing indentation, poor blank-line usage or grouping, or awkward alignment of parameters, blocks, and expressions. These do not change runtime behavior, but they slow reading and increase the chance of mistakes. +- Evolvability.Organizational: Problems in where functionality lives. Examples: responsibilities placed in the wrong module, classes or methods with too many responsibilities, dead code, or duplicated code that should be extracted to a common place. +- Evolvability.SolutionApproach: Problems in the chosen implementation approach. Examples: inappropriate data structures, reimplementing standard library behavior without justification, algorithms more complex than necessary, code with no useful effect, or semantic duplication. + +Functional: +- Functional.Support: Defects in support tooling and infrastructure. Examples: incorrect build, deploy, or environment configuration, or use of the wrong version of external libraries. These issues may block compilation, execution, or cause environment-specific behavior. +- Functional.Timing: Concurrency and ordering defects. Examples: race conditions, deadlocks, ordering bugs, or memory visibility issues across threads or async flows. +- Functional.Logic: Incorrect behavior caused by wrong reasoning in the implementation. Examples: incorrect if/while conditions, mistakes in calculations, formulas, aggregations, conversions, or incorrect control flow that skips, reorders, or misses required handling. +- Functional.Check: Defects that increase the chance of failures or invalid data passing unnoticed. Examples: missing checks of fallible return values, missing or incorrect input validation, or incomplete verification before using a resource such as an array index, file handle, or nullable value. +- Functional.Resource: Defects involving allocation, initialization, use, reuse, or release of resources. Examples: memory leaks, failing to close files/connections/sockets, incorrect initialization of variables or data structures, or incorrect reuse of objects and buffers causing state corruption. These issues can cause failures, performance degradation, or unpredictable behavior. +- Functional.Interface: Incorrect use of internal or external interfaces. Examples: swapped parameters, wrong argument types, contract violations, or misuse of APIs. +- Functional.LargerDefect: A larger missing or incomplete behavior. Examples: an important requirement is not implemented, a key user flow is incomplete, or the change would require broader restructuring to be correct. + +Other categories: +- FalsePositive: Use only when reviewing a previous finding or when code looks suspicious at first glance but is correct after deeper analysis and consistent with the codebase conventions. +- General: Use only if a relevant issue truly does not fit any category above. + +Classification rules: +- Every finding must belong to exactly one category from the taxonomy above. +- Prefer the most specific category available. +- Use `General` only when no taxonomy category fits after careful analysis. +- Use `FalsePositive` only when it is clearly justified by the surrounding code and conventions. + +Severity guide: +- `Block`: likely to cause incorrect behavior, security risk, data corruption, broken flows, or high-confidence regressions. Security issues are usually `Block`. +- `Flag`: important design, structure, or maintainability concern that should normally be addressed before merge, even if it is not an immediate runtime defect. +- `Suggest`: worthwhile improvement, but not strong enough on its own to block the PR. + +Review task: +1. Analyze the PR and identify: +- logic or control-flow bugs +- missing validation or missing checks +- resource, interface, timing, and support issues +- evolvability issues related to textual clarity, language-supported documentation, visual representation, organization, and solution approach +2. Prevent quality regressions: if the diff removes important validations, tests, or checks without an adequate replacement, treat that as a relevant defect. +3. Treat security risks as high priority, including unsafe handling of user input, exposed secrets, or authentication/authorization bypasses. +4. Do not report low-value style-only comments unless they clearly map to the taxonomy and have practical review value. + +Output format: +1. Start with an occurrence table with one row per finding: +- Columns: `ID | Category | Severity | File | Approx. line | Short description` +- Do not merge separate occurrences, even when they share the same category. +2. Then provide full details for each real finding using this format: +- Category: +- Severity: +- File: path/to/file.ext +- Approx. line: X +- Description: short, objective, technical description. Start the sentence with the same category in brackets, for example: `[Functional.Logic] incorrect loop exit condition`. +- Suggestion: how to fix or improve the issue. + +Final summary: +- PR risk: Low | Medium | High +- Main defect categories found +- List of blocking items +- If there are no relevant findings, output exactly: +"No relevant issues found in this PR. PR risk: Low."