Skip to content

[WEB-4787] fix: changed issue to work item in cycles dropdown#7706

Merged
pushya22 merged 2 commits intopreviewfrom
fix-issue-name-corrected
Sep 3, 2025
Merged

[WEB-4787] fix: changed issue to work item in cycles dropdown#7706
pushya22 merged 2 commits intopreviewfrom
fix-issue-name-corrected

Conversation

@gakshita
Copy link
Collaborator

@gakshita gakshita commented Sep 2, 2025

Description

Changed issue to work item in cycle dropdown

Screenshots and Media (if applicable)

Before
image
After
image

Summary by CodeRabbit

  • Bug Fixes
    • The Estimate Type dropdown now displays the user-friendly label for the selected option when collapsed, matching the label shown in the dropdown header for consistent readability.
    • If no matching label exists, the selected value is shown as a fallback instead of leaving the field empty.

Copilot AI review requested due to automatic review settings September 2, 2025 13:36
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 2, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Updated EstimateTypeDropdown's collapsed view to show the human-readable option label for the selected value by looking up cycleEstimateOptions; if no match is found it now renders the raw value. No exported signatures or other logic changed.

Changes

Cohort / File(s) Summary
Estimate type display fix
apps/web/core/components/cycles/dropdowns/estimate-type-dropdown.tsx
In the showDefault path, render the option label via cycleEstimateOptions.find((v) => v.value === value)?.label ?? value instead of rendering the raw value or nothing; other branches and the CustomSelect header fallback remain unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

🐛bug, 🌐frontend

Suggested reviewers

  • prateekshourya29
  • sriramveeraghanta

Poem

A rabbit hops to the dropdown bright,
Swapping surprise for labels right.
I nibble code and twitch with glee,
Now values read as humans see.
A little hop — UI fixed, yippee! 🥕


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 4542d10 and 134d501.

📒 Files selected for processing (1)
  • apps/web/core/components/cycles/dropdowns/estimate-type-dropdown.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/web/core/components/cycles/dropdowns/estimate-type-dropdown.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Build and lint web apps
  • GitHub Check: Analyze (python)
  • GitHub Check: Analyze (javascript)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-issue-name-corrected

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@makeplane
Copy link

makeplane bot commented Sep 2, 2025

Pull Request Linked with Plane Work Items

Comment Automatically Generated by Plane

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the cycles dropdown to display "work item" instead of "issue" in the estimate type dropdown. The change ensures that the user-facing label is properly displayed instead of the raw value.

  • Updated the default display to show proper labels from the cycle estimate options

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
apps/web/core/components/cycles/dropdowns/estimate-type-dropdown.tsx (1)

27-29: DRY the selected label lookup

Compute once and reuse to keep logic consistent across both render paths.

Example:

const selectedLabel = React.useMemo(
  () => cycleEstimateOptions.find((v) => v.value === value)?.label ?? "None",
  [value]
);

// ...
<CustomSelect
  value={value}
  label={<span>{selectedLabel}</span>}
  onChange={onChange}
  // ...
/>

// ...
showDefault ? <span>{selectedLabel}</span> : null

Also applies to: 41-41

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 652a6cc and 4542d10.

📒 Files selected for processing (1)
  • apps/web/core/components/cycles/dropdowns/estimate-type-dropdown.tsx (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
apps/web/core/components/cycles/dropdowns/estimate-type-dropdown.tsx (1)
apps/web/core/components/cycles/analytics-sidebar/issue-progress.tsx (1)
  • cycleEstimateOptions (33-36)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Build and lint web apps
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (1)
apps/web/core/components/cycles/dropdowns/estimate-type-dropdown.tsx (1)

41-41: No remaining user-facing “issue(s)” labels in cycles UI. All literal UI strings now use “Work item(s)”; any remaining matches are imports, variable names, comments, or translation keys.

</div>
) : showDefault ? (
<span className="capitalize">{value}</span>
<span className="capitalize">{cycleEstimateOptions.find((v) => v.value === value)?.label}</span>
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Fix casing + add fallback to avoid blank UI

The "capitalize" class turns "Work items" into "Work Items", diverging from product copy and the dropdown label. Also add a "None" fallback for parity with the select label.

-    <span className="capitalize">{cycleEstimateOptions.find((v) => v.value === value)?.label}</span>
+    <span>{cycleEstimateOptions.find((v) => v.value === value)?.label ?? "None"}</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.

Suggested change
<span className="capitalize">{cycleEstimateOptions.find((v) => v.value === value)?.label}</span>
<span>{cycleEstimateOptions.find((v) => v.value === value)?.label ?? "None"}</span>
🤖 Prompt for AI Agents
In apps/web/core/components/cycles/dropdowns/estimate-type-dropdown.tsx around
line 41, the span currently forces CSS "capitalize" and can render blank when no
matching option exists; remove the "capitalize" class so the label is used
verbatim (preserving product copy) and add a fallback that displays "None" when
cycleEstimateOptions.find(...) returns undefined or value is falsy so the UI
never shows a blank label.

…wn.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@pushya22 pushya22 merged commit 59ace4f into preview Sep 3, 2025
6 of 7 checks passed
@pushya22 pushya22 deleted the fix-issue-name-corrected branch September 3, 2025 08:41
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.

4 participants