fix(ui): contributions list style#593
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
WalkthroughThe Contributions.vue component was modified to adjust layout behavior and reduce DOM nesting. The page container now includes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
frontend/src/pages/Contributions.vue (2)
123-130:⚠️ Potential issue | 🟠 MajorMissing
wiki_spacefield causes broken navigation for Draft/Changes Requested rows.The
getRowRoutefunction (line 170) referencesrow.wiki_spaceto build the SpaceDetails route, but onlywiki_space.space_nameis fetched—which returns asspace_name, not the link field value itself. This will passundefinedas thespaceIdparam.🐛 Proposed fix: add wiki_space to fields
const myChangeRequests = createListResource({ doctype: 'Wiki Change Request', - fields: ['name', 'title', 'wiki_space.space_name', 'status', 'modified', 'archived_at', 'merged_at'], + fields: ['name', 'title', 'wiki_space', 'wiki_space.space_name', 'status', 'modified', 'archived_at', 'merged_at'], filters: { owner: ['=', userStore.user] }, orderBy: 'modified desc', pageLength: 25, auto: true, });🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@frontend/src/pages/Contributions.vue` around lines 123 - 130, The list resource myChangeRequests is only fetching nested wiki_space.space_name so row.wiki_space is undefined in getRowRoute; update the createListResource call for myChangeRequests to include the link field "wiki_space" (in addition to "wiki_space.space_name") so getRowRoute can read row.wiki_space and build the SpaceDetails route correctly.
132-139:⚠️ Potential issue | 🟠 MajorFix
autoproperty to use a plain boolean instead of a ComputedRef.The
autoproperty increateListResourceexpects a plain boolean value, butcomputed(() => isManager.value)passes a ComputedRef object. This causes the resource to always auto-fetch (since the object is truthy) regardless of whetherisManager.valuechanges, breaking the intended conditional fetch behavior.Use
auto: isManager.valueto pass the plain boolean directly.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@frontend/src/pages/Contributions.vue` around lines 132 - 139, The pendingReviews resource passes a ComputedRef to createListResource via auto: computed(() => isManager.value), which results in truthy object behavior; change the auto property to a plain boolean by using isManager.value directly (i.e., set auto to isManager.value) so createListResource receives a boolean and will only auto-fetch when the manager flag is true.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@frontend/src/pages/Contributions.vue`:
- Around line 123-130: The list resource myChangeRequests is only fetching
nested wiki_space.space_name so row.wiki_space is undefined in getRowRoute;
update the createListResource call for myChangeRequests to include the link
field "wiki_space" (in addition to "wiki_space.space_name") so getRowRoute can
read row.wiki_space and build the SpaceDetails route correctly.
- Around line 132-139: The pendingReviews resource passes a ComputedRef to
createListResource via auto: computed(() => isManager.value), which results in
truthy object behavior; change the auto property to a plain boolean by using
isManager.value directly (i.e., set auto to isManager.value) so
createListResource receives a boolean and will only auto-fetch when the manager
flag is true.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 45c887ab-021f-4f45-aa72-a44cc2b3c216
📒 Files selected for processing (1)
frontend/src/pages/Contributions.vue
No description provided.