Skip to content

fix: bug#2853

Merged
HarshMN2345 merged 1 commit intomainfrom
fix-bug-with-input-number
Feb 13, 2026
Merged

fix: bug#2853
HarshMN2345 merged 1 commit intomainfrom
fix-bug-with-input-number

Conversation

@HarshMN2345
Copy link
Member

@HarshMN2345 HarshMN2345 commented Feb 13, 2026

What does this PR do?

(Provide a description of what this PR does.)

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)

Related PRs and Issues

(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)

Have you read the Contributing Guidelines on issues?

(Write your answer here.)

Summary by CodeRabbit

  • New Features

    • Added new design system components and expanded icon library to enhance visual consistency and user interface quality.
  • Bug Fixes

    • Improved number input field to properly validate and normalize user-entered values for accurate data handling.

@appwrite
Copy link

appwrite bot commented Feb 13, 2026

Console (appwrite/console)

Project ID: 688b7bf400350cbd60e9

Sites (1)
Site Status Logs Preview QR
 console-stage
688b7cf6003b1842c9dc
Ready Ready View Logs Preview URL QR Code

Tip

MCP server integration brings LLM superpowers to Claude Desktop and Cursor IDE

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 13, 2026

Walkthrough

The pull request adds two new Svelte dependencies to package.json (pink-icons-svelte and pink-svelte) pointing to remote pkg.vc URLs. Additionally, it introduces a reactive normalization block in the inputNumber component to handle event-like objects from the Pink Svelte library, converting extracted values to numbers or null as needed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'fix: bug' is vague and generic, providing no meaningful information about what bug was fixed or which component was affected. Replace with a descriptive title that specifies the bug and affected component, e.g., 'fix: normalize input value in inputNumber component for Pink Svelte compatibility'.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-bug-with-input-number

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
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: 2

🤖 Fix all issues with AI agents
In `@package.json`:
- Around line 41-42: Remove the malformed dependency entries where the package
key is the full URL
("https://pkg.vc/-/@appwrite/@appwrite.io/pink-icons-svelte@a4067bf" and
"https://pkg.vc/-/@appwrite/@appwrite.io/pink-svelte@a4067bf") and either delete
them or replace them by updating the existing dependency declarations for
`@appwrite.io/pink-icons-svelte` and `@appwrite.io/pink-svelte` to the intended
commit/hash (if you meant to upgrade to `@a4067bf`) so the dependency keys remain
the valid package names (`@appwrite.io/pink-icons-svelte`,
`@appwrite.io/pink-svelte`) rather than full URLs.

In `@src/lib/elements/forms/inputNumber.svelte`:
- Around line 22-32: Update the TODO above the reactive block that handles
synthetic event objects (the $: reactive statement referencing value and casting
to Event and HTMLInputElement) to include the upstream Pink Svelte issue tracker
link so it's clear when the workaround can be removed; modify the comment that
currently reads "// TODO: Remove this once Pink Svelte is fixed" to add a "See:
https://github.com/appwrite/pink-svelte/issues/<number>" (or equivalent issue
URL) immediately below it, so the reactive block (the value handling logic) is
traceable to the upstream issue.
🧹 Nitpick comments (1)
src/lib/elements/forms/inputNumber.svelte (1)

22-32: Workaround is functionally sound but consider tightening the type guard.

The reactive normalization logic is correct and avoids infinite re-triggering since the reassigned value is always number | null. The TODO comment appropriately flags this as temporary.

One minor concern: the cast chain value as Event then event.target as HTMLInputElement is somewhat loose. Since value is typed as number | bigint, TypeScript wouldn't normally allow this — the as object intermediate cast suppresses the error. Consider adding a more explicit runtime check (e.g., value instanceof Event) to avoid accidentally matching other object shapes if the library behavior changes.

Optional tightening
-    $: if (value !== null && typeof value === 'object' && 'target' in (value as object)) {
-        const event = value as Event;
-        const target = event.target as HTMLInputElement;
+    $: if (value !== null && value instanceof Event) {
+        const target = (value as Event).target as HTMLInputElement;

Comment on lines +41 to +42
"https://pkg.vc/-/@appwrite/@appwrite.io/pink-icons-svelte@a4067bf": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-icons-svelte@a4067bf",
"https://pkg.vc/-/@appwrite/@appwrite.io/pink-svelte@a4067bf": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-svelte@a4067bf",
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Malformed duplicate dependency entries — likely accidental.

Lines 25 and 27 already declare @appwrite.io/pink-icons-svelte and @appwrite.io/pink-svelte (at @df765cc). These new lines use the full URL as the package key, which is not a valid dependency identifier, and point to a different commit (@a4067bf). This looks like a lockfile artifact or accidental paste that will either be ignored, cause resolution conflicts, or shadow the existing entries.

If the intent is to upgrade, update the existing entries on lines 25 and 27 to the new commit hash instead.

Proposed fix
-        "@appwrite.io/pink-icons-svelte": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-icons-svelte@df765cc",
+        "@appwrite.io/pink-icons-svelte": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-icons-svelte@a4067bf",
         "@appwrite.io/pink-legacy": "^1.0.3",
-        "@appwrite.io/pink-svelte": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-svelte@df765cc",
+        "@appwrite.io/pink-svelte": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-svelte@a4067bf",
         ...
-        "https://pkg.vc/-/@appwrite/@appwrite.io/pink-icons-svelte@a4067bf": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-icons-svelte@a4067bf",
-        "https://pkg.vc/-/@appwrite/@appwrite.io/pink-svelte@a4067bf": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-svelte@a4067bf",
🤖 Prompt for AI Agents
In `@package.json` around lines 41 - 42, Remove the malformed dependency entries
where the package key is the full URL
("https://pkg.vc/-/@appwrite/@appwrite.io/pink-icons-svelte@a4067bf" and
"https://pkg.vc/-/@appwrite/@appwrite.io/pink-svelte@a4067bf") and either delete
them or replace them by updating the existing dependency declarations for
`@appwrite.io/pink-icons-svelte` and `@appwrite.io/pink-svelte` to the intended
commit/hash (if you meant to upgrade to `@a4067bf`) so the dependency keys remain
the valid package names (`@appwrite.io/pink-icons-svelte`,
`@appwrite.io/pink-svelte`) rather than full URLs.

Comment on lines +22 to +32
// TODO: Remove this once Pink Svelte is fixed
$: if (value !== null && typeof value === 'object' && 'target' in (value as object)) {
const event = value as Event;
const target = event.target as HTMLInputElement;
if (target?.value !== undefined) {
const parsedValue = target.value === '' ? null : Number(target.value);
value = Number.isNaN(parsedValue) ? null : parsedValue;
} else {
value = null;
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if there's an existing issue referencing this workaround or the pink-svelte input event bug
rg -rn "pink" -i --type=svelte || true
rg -rn "TODO.*Pink" -i || true
# Also check for any github/issue links in the codebase related to svelte input
rg -rn "github.*issue\|#[0-9]+.*pink\|pink.*#[0-9]+" -i || true

Repository: appwrite/console

Length of output: 50422


🏁 Script executed:

#!/bin/bash
# Read the inputNumber.svelte file to see the exact TODO
head -40 src/lib/elements/forms/inputNumber.svelte | cat -n

# Also check for any issue references in the file
grep -i "issue\|github\|#[0-9]\|bug\|pink" src/lib/elements/forms/inputNumber.svelte || echo "No issue references found"

Repository: appwrite/console

Length of output: 1920


🏁 Script executed:

#!/bin/bash
# Check for any references to Pink Svelte issues or GitHub in the repo
find . -type f \( -name "*.md" -o -name ".github" -o -name "*.json" \) 2>/dev/null | head -20

# Search for any GitHub issues or Pink Svelte issue tracking
rg -i "pink.?svelte.*issue|pink.?svelte.*github|appwrite.*pink" --max-count=20 || echo "No GitHub references found"

# Check if there's a package.json or dependency file that might reference Pink Svelte version
rg "pink-svelte" -A2 -B2 || echo "No package references"
</parameter>

Repository: appwrite/console

Length of output: 50498


🏁 Script executed:

#!/bin/bash
# Check for any comment with issue/bug references near the TODO
grep -B5 -A10 "TODO.*Pink Svelte" src/lib/elements/forms/inputNumber.svelte

# Check if there are any issue references in common places
grep -r "pink-svelte" .github 2>/dev/null || echo "No .github references"

# Check the package.json to understand the Pink Svelte version/status
grep -A2 -B2 "pink-svelte" package.json | head -10

Repository: appwrite/console

Length of output: 1429


Reference the upstream Pink Svelte issue in the TODO comment.

The TODO comment lacks a link to a tracked upstream issue. Without this reference, the workaround on lines 23-32 may become permanent. Add the GitHub issue URL (or issue tracker link) to the comment so it's clear what needs to be resolved before this code can be removed.

For example:

// TODO: Remove this once Pink Svelte is fixed
// See: https://github.com/appwrite/pink-svelte/issues/<number>
🤖 Prompt for AI Agents
In `@src/lib/elements/forms/inputNumber.svelte` around lines 22 - 32, Update the
TODO above the reactive block that handles synthetic event objects (the $:
reactive statement referencing value and casting to Event and HTMLInputElement)
to include the upstream Pink Svelte issue tracker link so it's clear when the
workaround can be removed; modify the comment that currently reads "// TODO:
Remove this once Pink Svelte is fixed" to add a "See:
https://github.com/appwrite/pink-svelte/issues/<number>" (or equivalent issue
URL) immediately below it, so the reactive block (the value handling logic) is
traceable to the upstream issue.

@HarshMN2345 HarshMN2345 merged commit dd37695 into main Feb 13, 2026
4 checks passed
@HarshMN2345 HarshMN2345 deleted the fix-bug-with-input-number branch February 13, 2026 22:45
Comment on lines 11 to 15
"@appwrite.io/pink-icons-svelte": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-icons-svelte@df765cc",
"@appwrite.io/pink-icons-svelte": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-icons-svelte@df765cc",
"@appwrite.io/pink-legacy": "^1.0.3",
"@appwrite.io/pink-svelte": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-svelte@df765cc",
"@appwrite.io/pink-svelte": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-svelte@df765cc",
Copy link
Contributor

Choose a reason for hiding this comment

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

There are duplicate lines here.

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