Skip to content

fix: remove redundant upload optional chaining#336

Open
pragnyanramtha wants to merge 1 commit into
PSMRI:mainfrom
pragnyanramtha:fix/build-warnings
Open

fix: remove redundant upload optional chaining#336
pragnyanramtha wants to merge 1 commit into
PSMRI:mainfrom
pragnyanramtha:fix/build-warnings

Conversation

@pragnyanramtha
Copy link
Copy Markdown

@pragnyanramtha pragnyanramtha commented May 4, 2026

Summary

  • Remove redundant optional chaining from the upload button disabled binding in the gynecological examination template.
  • Rebase the PR onto current main and drop stale lockfile, submodule, and TypeScript config churn.

Validation

  • git diff --check

Summary by CodeRabbit

  • Refactor
    • Updated file input validation logic for the Upload button in the gynecological examination form.

Review Change Stack

Copilot AI review requested due to automatic review settings May 4, 2026 07:48
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 4, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a74d74e8-345e-4e9d-9cf5-b7708c2bdc3c

📥 Commits

Reviewing files that changed from the base of the PR and between d8c4d2a and 2885cd5.

📒 Files selected for processing (1)
  • src/app/app-modules/nurse-doctor/examination/cancer-examination/gynecological-examination/gynecological-examination.component.html

📝 Walkthrough

Walkthrough

The PR updates the gynecological examination component template by removing optional chaining from the Upload button's disabled state binding—changing fileData?.length to fileData.length—and adjusts the template's final closing container element.

Changes

Gynecological Examination Template Update

Layer / File(s) Summary
Gynecological Examination Component Template
src/app/app-modules/nurse-doctor/examination/cancer-examination/gynecological-examination/gynecological-examination.component.html
Upload button disabled binding is refactored from fileData?.length to direct property access fileData.length, and the template's final container closing element is adjusted.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A button binds without the \?\\ today,
Optional chaining melts away,
Direct access takes the stage,
The template turns a cleaner page.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: remove redundant upload optional chaining' accurately describes the main change—removing optional chaining from the upload button's disabled binding in the gynecological-examination template.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

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 is described as a fix for Angular/CSS build warnings, but the actual diff only changes TypeScript module-resolution config in tsconfig.json. In the current form, it does not align with the stated purpose of fixing the cited CSS and template warnings.

Changes:

  • Added a paths mapping for Common-UI/src/* in the root TypeScript config.
  • Did not include the CSS/template file edits referenced in the PR description.
  • Leaves the intended warning-removal scope unclear because the implementation is config-only.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

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

Copilot reviewed 2 out of 4 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

@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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
tsconfig.json (1)

11-11: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Remove duplicate noImplicitReturns configuration.

The noImplicitReturns option appears twice in the compilerOptions object (lines 11 and 26). While both are set to the same value, duplicate keys in JSON objects should be avoided as they create maintenance issues and potential confusion. In JSON, when duplicate keys exist, the last occurrence typically overrides earlier ones.

🔧 Proposed fix

Remove the duplicate on line 26:

     "noFallthroughCasesInSwitch": true,
     "sourceMap": true,
     "declaration": false,
     "downlevelIteration": true,
     "experimentalDecorators": true,
     "moduleResolution": "node",
     "importHelpers": true,
     "target": "es5",
     "module": "ES2022",
     "useDefineForClassFields": false,
     "lib": [
       "ES2022",
       "dom"
     ],
-    "noImplicitReturns": false,
     "paths": {
       "Common-UI/src/*": ["Common-UI/src/*"]
     }

Also applies to: 26-26

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tsconfig.json` at line 11, Remove the duplicate JSON key in the
compilerOptions object by deleting the redundant "noImplicitReturns" entry so
only a single "noImplicitReturns" setting remains; locate the duplicate entries
under compilerOptions (the symbol name "noImplicitReturns") and keep the
intended value while removing the extra occurrence to avoid JSON key shadowing.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Common-UI`:
- Line 1: The Common-UI submodule pointer references commit
5b6fe40846d39eb88b35bed20add07ae7e5b4077 which cannot be found; verify and fix
by checking the Common-UI repository to confirm that commit or the intended
merge (e.g., the PR `#45` merge) exists, then either push the missing commit to
the Common-UI repo or update the submodule pointer in the parent repo to a valid
commit; ensure you update the submodule via the Common-UI submodule entry
(Common-UI) and commit the updated gitlink so the parent repo points to an
existing SHA.

---

Outside diff comments:
In `@tsconfig.json`:
- Line 11: Remove the duplicate JSON key in the compilerOptions object by
deleting the redundant "noImplicitReturns" entry so only a single
"noImplicitReturns" setting remains; locate the duplicate entries under
compilerOptions (the symbol name "noImplicitReturns") and keep the intended
value while removing the extra occurrence to avoid JSON key shadowing.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c1ff6921-58cc-4349-865f-3a593c20835f

📥 Commits

Reviewing files that changed from the base of the PR and between 22509ad and d8c4d2a.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • Common-UI
  • src/app/app-modules/nurse-doctor/examination/cancer-examination/gynecological-examination/gynecological-examination.component.html
  • tsconfig.json

Comment thread Common-UI Outdated
@pragnyanramtha pragnyanramtha changed the title fix: resolve build warnings in CSS and templates fix: remove redundant upload optional chaining May 20, 2026
@sonarqubecloud
Copy link
Copy Markdown

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