added bug - #5
Conversation
📝 WalkthroughWalkthroughAdds acceptance-state handling across the extension: GraphQL-based detection of accepted suggestions, manual acceptance toggles with persistence, data enrichment with acceptance metadata, and combined priority+acceptance filtering wired into popup and sidepanel UIs. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant UI as UI Layer<br/>(popup/sidepanel.js)
participant Filter as Filter Utils<br/>(filter-utils.js)
participant Storage as Local Storage
participant API as GitHub API<br/>(github-api.js)
User->>UI: Selects acceptance filter (All/Accepted/Not Accepted)
UI->>Filter: applyCombinedFilters(data, priorities, acceptanceStatus)
Filter->>Filter: Combine priority + acceptance logic
Filter->>UI: displayTitles callback with filtered groups
UI->>UI: Render titles with acceptance toggles
User->>UI: Clicks acceptance toggle on a title
UI->>Filter: toggleManualAcceptance(url, currentData)
Filter->>Storage: saveManualAcceptanceState(updatedState)
Storage-->>Filter: persisted
Filter->>UI: onAcceptanceToggle callback
UI->>Filter: applyCombinedFilters(re-apply filters)
UI->>UI: Update display and counts
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 📜 Recent review detailsConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (2)
🧰 Additional context used🧬 Code graph analysis (1)extension/popup.js (2)
🔇 Additional comments (12)
✏️ Tip: You can disable this entire section by setting Comment |
There was a problem hiding this comment.
Actionable comments posted: 8
🤖 Fix all issues with AI agents
In `@extension/filter-utils.js`:
- Around line 568-579: The callback signature mismatch: update
toggleManualAcceptance to call the provided onToggle with the expected arguments
(e.g., onToggle(url, newState)) instead of calling onToggle() with no args;
locate the function named toggleManualAcceptance and change the invocation of
onToggle() (and any place that determines acceptance state) to pass the URL and
the new/current acceptance state so the onAcceptanceToggle callback receives
(url, currentState) as implemented in popup.js; keep the event handler that
passes onAcceptanceToggle unchanged.
- Around line 11-12: Remove the intentional division-by-zero debug lines (the
variables zero and errors) from extension/filter-utils.js that run during
extractTitles; delete the two lines "var zero = 0;" and "var errors = 5 / zero;"
so no runtime Infinity is produced, and if a placeholder variable is needed
replace with a properly scoped const/let used by the function — ensure there are
no references to errors or zero elsewhere (search for zero/errors) and run tests
for extractTitles after removing them.
- Around line 621-656: toggleManualAcceptance currently overwrites the original
GraphQL-detected acceptance when applying or removing a manual override; modify
it to persist the original acceptance info before setting manual and restore
that info when removing manual override: when you set state[url] for manual
acceptance (in toggleManualAcceptance and where
loadManualAcceptanceState/saveManualAcceptanceState are used) save the
originalAccepted and originalAcceptanceMethod (e.g.,
state[url].originalAccepted, state[url].originalAcceptanceMethod) populated from
the matching issue in currentData.pullRequests, and when toggling off use those
stored fields to restore issue.accepted and issue.acceptanceMethod instead of
hardcoding false/null; ensure saveManualAcceptanceState persists the original
fields and update the currentData iteration (currentData.pullRequests.forEach ->
pr.actionableIssues.forEach) to prefer state[url].original* when clearing the
manual override.
In `@extension/github-api.js`:
- Around line 422-428: Remove the dead local variable in the else branch: the
call that assigns const hasSuggestion =
this.detectSuggestionInComment(comment.body) is never used, so delete that
assignment (and optionally the surrounding explanatory comment if it serves no
purpose) inside the else block of the relevant method in
extension/github-api.js; keep the detectSuggestionInComment method intact for
future use or call it later only when its result is actually consumed.
In `@extension/popup.css`:
- Around line 438-443: There are two conflicting CSS rules for the
.title-occurrence class; remove the duplicate definition (the one that only sets
padding: 4px 0) and consolidate any differing properties into the single
.title-occurrence rule so all intended styles live in one place (search for
.title-occurrence to find both definitions), keeping the more complete set of
properties and ensuring no other selectors rely on the removed duplicate.
In `@extension/popup.js`:
- Around line 371-377: onAcceptanceToggle is calling toggleManualAcceptance with
the wrong arguments and expecting a return; change the call to pass the PR data
object and a callback instead of a boolean and don't use its return value.
Specifically, in onAcceptanceToggle use toggleManualAcceptance(url, currentData,
() => { applyCombinedFilters(currentData, selectedPriorities,
selectedAcceptanceStatus, displayTitles); }) (or pass onAcceptanceToggle itself
where displayTitles already does) so toggleManualAcceptance(url, currentData,
onToggle) gets the correct currentData and an onToggle to reapply filters;
remove any code that treats toggleManualAcceptance as returning the new state.
In `@extension/sidepanel.html`:
- Around line 106-121: The span elements inside the acceptance filter buttons
currently use class "priority-count" which is semantically inconsistent; change
those spans to a clearer class like "acceptance-count" (or a generic
"filter-count") while keeping their existing IDs (acceptanceCountAll,
acceptanceCountAccepted, acceptanceCountNotAccepted) and update any CSS
selectors and JS code that reference ".priority-count" to use the new class name
(e.g., document.querySelectorAll or stylesheet rules targeting the
acceptance-count/filter-count class and any event handlers that read/update
those counts).
In `@extension/sidepanel.js`:
- Around line 294-300: The onAcceptanceToggle callback is calling
toggleManualAcceptance with the wrong signature (it currently passes (url,
currentState)); update onAcceptanceToggle to call toggleManualAcceptance(url,
currentData, onToggle) — pass the currentData variable as the second argument
and provide a third callback (e.g., a function that reapplies filters or calls
applyCombinedFilters(currentData, selectedPriorities, selectedAcceptanceStatus,
displayTitles)) so toggleManualAcceptance receives (url, currentData, onToggle)
as expected; keep the existing applyCombinedFilters call in the onToggle or
immediately after the awaited toggle to refresh the UI.
📜 Review details
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (7)
extension/filter-utils.jsextension/github-api.jsextension/popup.cssextension/popup.htmlextension/popup.jsextension/sidepanel.htmlextension/sidepanel.js
🧰 Additional context used
🧬 Code graph analysis (3)
extension/sidepanel.js (2)
extension/popup.js (5)
currentData(17-17)selectedPriorities(19-19)selectedAcceptanceStatus(20-20)onAcceptanceToggle(372-377)url(417-417)extension/filter-utils.js (5)
applyCombinedFilters(361-399)displayTitles(438-580)toggleManualAcceptance(621-656)filteredTitles(208-208)filteredTitles(371-395)
extension/filter-utils.js (2)
extension/sidepanel.js (6)
data(236-241)currentData(17-17)selectedPriorities(18-18)selectedAcceptanceStatus(19-19)onAcceptanceToggle(295-300)url(340-340)extension/popup.js (5)
currentData(17-17)selectedPriorities(19-19)selectedAcceptanceStatus(20-20)onAcceptanceToggle(372-377)url(417-417)
extension/github-api.js (1)
extension/sidepanel.js (1)
data(236-241)
🔇 Additional comments (9)
extension/popup.css (1)
356-443: LGTM for the Acceptance Filter styling.The new CSS classes for acceptance filter UI (
.acceptance-filter-section,.acceptance-filter-btn,.acceptance-toggle) are well-structured and follow the existing patterns established for priority filters. The hover and active states are appropriately styled.extension/github-api.js (2)
249-315: LGTM for GraphQL thread fetching implementation.The
fetchGraphQLThreadsmethod correctly queries GitHub's GraphQL API to retrieve review thread resolution status. Error handling returns an empty array gracefully, and the query structure is appropriate for the use case.
214-217: LGTM for extended issue data structure.The addition of
timestamp,accepted, andacceptanceMethodfields to the parsed issue structure properly supports the new acceptance filtering feature.extension/filter-utils.js (2)
222-277: LGTM for acceptance filter initialization.The
initializeAcceptanceFilterfunction correctly counts accepted/not-accepted issues, updates the UI counts, and wires up click handlers for the filter buttons with proper state management.
354-399: LGTM for combined filter logic.The
applyCombinedFiltersfunction correctly implements AND logic for priority and acceptance filters, updates counts viaupdateFilterCounts, and properly filters occurrences before passing to the display callback.extension/popup.html (1)
107-121: LGTM for the Acceptance Filter UI structure.The acceptance filter UI is correctly structured and mirrors the sidepanel implementation. The same
priority-countclass naming inconsistency exists here as insidepanel.html, but it's functional.extension/popup.js (2)
9-15: LGTM for the new imports.The imports for acceptance filter functionality are correctly added and align with the new filtering features.
332-349: LGTM for async displayResults with manual acceptance state.Converting
displayResultsto async and callingapplyManualAcceptanceState(data)before rendering ensures persisted manual acceptance states are applied correctly.extension/sidepanel.js (1)
255-292: LGTM for the acceptance filter integration.The async
displayResultsfunction correctly applies manual acceptance state before rendering, initializes both priority and acceptance filters, and wires up the combined filter callbacks appropriately.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
| var zero = 0; | ||
| var errors = 5 / zero; |
There was a problem hiding this comment.
Critical: Intentional division by zero bug detected.
These lines introduce a deliberate division by zero operation. While JavaScript doesn't throw an error (it produces Infinity), this is clearly debugging/test code that should not be merged:
- The variable
errorsis never used anywhere - Using
varinstead ofconst/letis inconsistent with the codebase - The PR title "added bug" confirms this is intentional sabotage
This will execute on every call to extractTitles, impacting all filtering operations.
🐛 Proposed fix: Remove the intentional bug
export function extractTitles(data) {
const titleGroups = {};
- var zero = 0;
- var errors = 5 / zero;
data.pullRequests.forEach(pr => {📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| var zero = 0; | |
| var errors = 5 / zero; | |
| export function extractTitles(data) { | |
| const titleGroups = {}; | |
| data.pullRequests.forEach(pr => { |
🤖 Prompt for AI Agents
In `@extension/filter-utils.js` around lines 11 - 12, Remove the intentional
division-by-zero debug lines (the variables zero and errors) from
extension/filter-utils.js that run during extractTitles; delete the two lines
"var zero = 0;" and "var errors = 5 / zero;" so no runtime Infinity is produced,
and if a placeholder variable is needed replace with a properly scoped const/let
used by the function — ensure there are no references to errors or zero
elsewhere (search for zero/errors) and run tests for extractTitles after
removing them.
|
|
||
| // Initialize acceptance toggle buttons if currentData is provided | ||
| if (currentData && onAcceptanceToggle) { | ||
| const toggleButtons = container.querySelectorAll('.acceptance-toggle'); | ||
| toggleButtons.forEach(button => { | ||
| button.addEventListener('click', async (e) => { | ||
| e.preventDefault(); | ||
| const url = button.getAttribute('data-url'); | ||
| await toggleManualAcceptance(url, currentData, onAcceptanceToggle); | ||
| }); | ||
| }); | ||
| } |
There was a problem hiding this comment.
Acceptance toggle callback signature mismatch.
The toggleManualAcceptance function expects (url, currentData, onToggle) parameters, but the event handler passes different arguments. Looking at the function signature at line 621: toggleManualAcceptance(url, currentData, onToggle), the call at line 576 passes (url, currentData, onAcceptanceToggle) which is correct.
However, the onAcceptanceToggle callback in popup.js (line 372-377) has signature (url, currentState) but toggleManualAcceptance calls onToggle() with no arguments (line 653-655). This inconsistency won't cause a crash but the return value logic in popup.js is broken.
🤖 Prompt for AI Agents
In `@extension/filter-utils.js` around lines 568 - 579, The callback signature
mismatch: update toggleManualAcceptance to call the provided onToggle with the
expected arguments (e.g., onToggle(url, newState)) instead of calling onToggle()
with no args; locate the function named toggleManualAcceptance and change the
invocation of onToggle() (and any place that determines acceptance state) to
pass the URL and the new/current acceptance state so the onAcceptanceToggle
callback receives (url, currentState) as implemented in popup.js; keep the event
handler that passes onAcceptanceToggle unchanged.
| export async function toggleManualAcceptance(url, currentData, onToggle) { | ||
| const state = await loadManualAcceptanceState(); | ||
|
|
||
| // Toggle the state | ||
| if (state[url]) { | ||
| delete state[url]; | ||
| } else { | ||
| state[url] = { | ||
| accepted: true, | ||
| acceptanceMethod: 'manual', | ||
| timestamp: new Date().toISOString() | ||
| }; | ||
| } | ||
|
|
||
| await saveManualAcceptanceState(state); | ||
|
|
||
| // Update the issue in currentData | ||
| currentData.pullRequests.forEach(pr => { | ||
| pr.actionableIssues.forEach(issue => { | ||
| if (issue.url === url) { | ||
| if (state[url]) { | ||
| issue.accepted = true; | ||
| issue.acceptanceMethod = 'manual'; | ||
| } else { | ||
| // Revert to automated detection state or default | ||
| issue.accepted = false; | ||
| issue.acceptanceMethod = null; | ||
| } | ||
| } | ||
| }); | ||
| }); | ||
|
|
||
| if (onToggle) { | ||
| onToggle(); | ||
| } | ||
| } |
There was a problem hiding this comment.
When manual acceptance is removed, original GraphQL state is lost.
When toggling off manual acceptance (lines 644-648), the code resets to accepted: false and acceptanceMethod: null instead of restoring the original GraphQL-detected state. If a comment was marked as accepted via GraphQL resolution, removing the manual override will incorrectly show it as not accepted.
🔧 Proposed fix: Store and restore original state
Consider storing the original acceptance state before applying manual override, or re-fetch/re-compute the GraphQL state when removing manual override:
// Update the issue in currentData
currentData.pullRequests.forEach(pr => {
pr.actionableIssues.forEach(issue => {
if (issue.url === url) {
if (state[url]) {
issue.accepted = true;
issue.acceptanceMethod = 'manual';
} else {
- // Revert to automated detection state or default
- issue.accepted = false;
- issue.acceptanceMethod = null;
+ // Revert to original automated detection state if available
+ issue.accepted = issue.originalAccepted || false;
+ issue.acceptanceMethod = issue.originalAcceptanceMethod || null;
}
}
});
});This requires storing originalAccepted and originalAcceptanceMethod when first applying manual state.
🤖 Prompt for AI Agents
In `@extension/filter-utils.js` around lines 621 - 656, toggleManualAcceptance
currently overwrites the original GraphQL-detected acceptance when applying or
removing a manual override; modify it to persist the original acceptance info
before setting manual and restore that info when removing manual override: when
you set state[url] for manual acceptance (in toggleManualAcceptance and where
loadManualAcceptanceState/saveManualAcceptanceState are used) save the
originalAccepted and originalAcceptanceMethod (e.g.,
state[url].originalAccepted, state[url].originalAcceptanceMethod) populated from
the matching issue in currentData.pullRequests, and when toggling off use those
stored fields to restore issue.accepted and issue.acceptanceMethod instead of
hardcoding false/null; ensure saveManualAcceptanceState persists the original
fields and update the currentData iteration (currentData.pullRequests.forEach ->
pr.actionableIssues.forEach) to prefer state[url].original* when clearing the
manual override.
| } else { | ||
| // Fallback to comment body parsing | ||
| const hasSuggestion = this.detectSuggestionInComment(comment.body); | ||
| // Note: This only detects if a suggestion exists, not if it was applied | ||
| // So we don't mark as accepted based on parsing alone | ||
| // This is just for future reference or manual override | ||
| } |
There was a problem hiding this comment.
Dead code: hasSuggestion is computed but never used.
The detectSuggestionInComment call result is stored in hasSuggestion but is never used. The comment indicates this is "just for future reference or manual override," but the variable should either be removed or actually used.
🧹 Proposed fix: Remove dead code
} else {
- // Fallback to comment body parsing
- const hasSuggestion = this.detectSuggestionInComment(comment.body);
- // Note: This only detects if a suggestion exists, not if it was applied
- // So we don't mark as accepted based on parsing alone
- // This is just for future reference or manual override
+ // No matching GraphQL thread found - leave as not accepted
+ // Manual override can be applied via UI
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| } else { | |
| // Fallback to comment body parsing | |
| const hasSuggestion = this.detectSuggestionInComment(comment.body); | |
| // Note: This only detects if a suggestion exists, not if it was applied | |
| // So we don't mark as accepted based on parsing alone | |
| // This is just for future reference or manual override | |
| } | |
| } else { | |
| // No matching GraphQL thread found - leave as not accepted | |
| // Manual override can be applied via UI | |
| } |
🤖 Prompt for AI Agents
In `@extension/github-api.js` around lines 422 - 428, Remove the dead local
variable in the else branch: the call that assigns const hasSuggestion =
this.detectSuggestionInComment(comment.body) is never used, so delete that
assignment (and optionally the surrounding explanatory comment if it serves no
purpose) inside the else block of the relevant method in
extension/github-api.js; keep the detectSuggestionInComment method intact for
future use or call it later only when its result is actually consumed.
| .title-occurrence { | ||
| display: flex; | ||
| align-items: center; | ||
| padding: 4px 0; | ||
| } | ||
|
|
There was a problem hiding this comment.
Duplicate .title-occurrence CSS rule will cause styling conflicts.
The .title-occurrence class is defined here at lines 438-442 and again at lines 575-577. The second definition has different properties (padding: 4px 0) and will partially override this one, causing unexpected styling behavior.
🔧 Proposed fix: Remove the duplicate definition
Remove the duplicate at lines 575-577 and consolidate the styles here:
.title-occurrence {
display: flex;
align-items: center;
padding: 4px 0;
}🤖 Prompt for AI Agents
In `@extension/popup.css` around lines 438 - 443, There are two conflicting CSS
rules for the .title-occurrence class; remove the duplicate definition (the one
that only sets padding: 4px 0) and consolidate any differing properties into the
single .title-occurrence rule so all intended styles live in one place (search
for .title-occurrence to find both definitions), keeping the more complete set
of properties and ensuring no other selectors rely on the removed duplicate.
| // Define acceptance toggle callback | ||
| const onAcceptanceToggle = async (url, currentState) => { | ||
| const newState = await toggleManualAcceptance(url, currentState); | ||
| // Reapply filters to update the display | ||
| applyCombinedFilters(currentData, selectedPriorities, selectedAcceptanceStatus, displayTitles); | ||
| return newState; | ||
| }; |
There was a problem hiding this comment.
Incorrect arguments passed to toggleManualAcceptance.
The toggleManualAcceptance function signature (from filter-utils.js line 621) is toggleManualAcceptance(url, currentData, onToggle), but this callback passes (url, currentState) where currentState appears to be a boolean. This will cause the toggle functionality to fail because:
currentState(a boolean) is passed wherecurrentData(the PR data object) is expected- No
onTogglecallback is passed - The return value expectation doesn't match -
toggleManualAcceptancedoesn't return the new state
🐛 Proposed fix: Correct the function call
// Define acceptance toggle callback
- const onAcceptanceToggle = async (url, currentState) => {
- const newState = await toggleManualAcceptance(url, currentState);
+ const onAcceptanceToggle = async () => {
// Reapply filters to update the display
applyCombinedFilters(currentData, selectedPriorities, selectedAcceptanceStatus, displayTitles);
- return newState;
};Note: The displayTitles function in filter-utils.js already calls toggleManualAcceptance(url, currentData, onAcceptanceToggle) with the correct arguments (line 576), so this callback should just handle the post-toggle refresh.
🤖 Prompt for AI Agents
In `@extension/popup.js` around lines 371 - 377, onAcceptanceToggle is calling
toggleManualAcceptance with the wrong arguments and expecting a return; change
the call to pass the PR data object and a callback instead of a boolean and
don't use its return value. Specifically, in onAcceptanceToggle use
toggleManualAcceptance(url, currentData, () => {
applyCombinedFilters(currentData, selectedPriorities, selectedAcceptanceStatus,
displayTitles); }) (or pass onAcceptanceToggle itself where displayTitles
already does) so toggleManualAcceptance(url, currentData, onToggle) gets the
correct currentData and an onToggle to reapply filters; remove any code that
treats toggleManualAcceptance as returning the new state.
| <!-- Acceptance Filter --> | ||
| <div class="acceptance-filter-section" id="acceptanceFilterSection" style="display: none;"> | ||
| <div class="acceptance-filter-label">Filter by Acceptance:</div> | ||
| <div class="acceptance-filter-controls" id="acceptanceFilterControls"> | ||
| <button class="acceptance-filter-btn active" data-acceptance="all"> | ||
| All (<span class="priority-count" id="acceptanceCountAll">0</span>) | ||
| </button> | ||
| <button class="acceptance-filter-btn" data-acceptance="accepted"> | ||
| ✓ Accepted (<span class="priority-count" id="acceptanceCountAccepted">0</span>) | ||
| </button> | ||
| <button class="acceptance-filter-btn" data-acceptance="not-accepted"> | ||
| ○ Not Accepted (<span class="priority-count" id="acceptanceCountNotAccepted">0</span>) | ||
| </button> | ||
| </div> | ||
| </div> | ||
|
|
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
Consider using consistent class naming for acceptance count spans.
The acceptance filter count spans use the priority-count class (lines 111, 114, 117), which works but is semantically inconsistent. Consider using an acceptance-count class or a more generic filter-count class for clarity.
♻️ Optional: Use semantic class naming
- All (<span class="priority-count" id="acceptanceCountAll">0</span>)
+ All (<span class="filter-count" id="acceptanceCountAll">0</span>)
</button>
<button class="acceptance-filter-btn" data-acceptance="accepted">
- ✓ Accepted (<span class="priority-count" id="acceptanceCountAccepted">0</span>)
+ ✓ Accepted (<span class="filter-count" id="acceptanceCountAccepted">0</span>)
</button>
<button class="acceptance-filter-btn" data-acceptance="not-accepted">
- ○ Not Accepted (<span class="priority-count" id="acceptanceCountNotAccepted">0</span>)
+ ○ Not Accepted (<span class="filter-count" id="acceptanceCountNotAccepted">0</span>)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <!-- Acceptance Filter --> | |
| <div class="acceptance-filter-section" id="acceptanceFilterSection" style="display: none;"> | |
| <div class="acceptance-filter-label">Filter by Acceptance:</div> | |
| <div class="acceptance-filter-controls" id="acceptanceFilterControls"> | |
| <button class="acceptance-filter-btn active" data-acceptance="all"> | |
| All (<span class="priority-count" id="acceptanceCountAll">0</span>) | |
| </button> | |
| <button class="acceptance-filter-btn" data-acceptance="accepted"> | |
| ✓ Accepted (<span class="priority-count" id="acceptanceCountAccepted">0</span>) | |
| </button> | |
| <button class="acceptance-filter-btn" data-acceptance="not-accepted"> | |
| ○ Not Accepted (<span class="priority-count" id="acceptanceCountNotAccepted">0</span>) | |
| </button> | |
| </div> | |
| </div> | |
| <!-- Acceptance Filter --> | |
| <div class="acceptance-filter-section" id="acceptanceFilterSection" style="display: none;"> | |
| <div class="acceptance-filter-label">Filter by Acceptance:</div> | |
| <div class="acceptance-filter-controls" id="acceptanceFilterControls"> | |
| <button class="acceptance-filter-btn active" data-acceptance="all"> | |
| All (<span class="filter-count" id="acceptanceCountAll">0</span>) | |
| </button> | |
| <button class="acceptance-filter-btn" data-acceptance="accepted"> | |
| ✓ Accepted (<span class="filter-count" id="acceptanceCountAccepted">0</span>) | |
| </button> | |
| <button class="acceptance-filter-btn" data-acceptance="not-accepted"> | |
| ○ Not Accepted (<span class="filter-count" id="acceptanceCountNotAccepted">0</span>) | |
| </button> | |
| </div> | |
| </div> |
🤖 Prompt for AI Agents
In `@extension/sidepanel.html` around lines 106 - 121, The span elements inside
the acceptance filter buttons currently use class "priority-count" which is
semantically inconsistent; change those spans to a clearer class like
"acceptance-count" (or a generic "filter-count") while keeping their existing
IDs (acceptanceCountAll, acceptanceCountAccepted, acceptanceCountNotAccepted)
and update any CSS selectors and JS code that reference ".priority-count" to use
the new class name (e.g., document.querySelectorAll or stylesheet rules
targeting the acceptance-count/filter-count class and any event handlers that
read/update those counts).
Summary by CodeRabbit
New Features
Style