chaitin / chaitin/MonkeyCode

Terminal Copy-Paste Issue in Cloud IDE Environment

Open
#1,230 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
4.7k
Forks
719
Avg merge
4h 30m
Merged PRs (30d)
83

Description

سلام تیم MonkeyCode،

من هنگام کار با محیط ابری (Cloud IDE) در بخش Terminal با مشکل جدی در کپی و پیست کردن مواجه هستم. این مشکل به‌خصوص هنگام کار با دستورات طولانی و پیچیده بسیار آزاردهنده است و روند توسعه را کند می‌کند.

مراحل بازتولید مشکل (Steps to Reproduce):

یک Task جدید در MonkeyCode ایجاد کنید.

ترمینال را باز کنید.

سعی کنید یک دستور طولانی (مثلاً composer require laravel/sanctum) را از جای دیگری کپی کرده و در ترمینال پیست کنید.

متوجه می‌شوید که گاهی هیچ اتفاقی نمی‌افتد و گاهی کاراکترها به‌درستی وارد نمی‌شوند.

مشاهدات من:

میانبرهای استاندارد (Ctrl+C و Ctrl+V) معمولاً کار نمی‌کنند.

گاهی Ctrl+Shift+V کار می‌کند، اما نه همیشه.

کلیک راست و انتخاب «Paste» از منوی مرورگر نیز گاهی با مشکل مواجه می‌شود.

این مشکل در مرورگرهای مختلف (کروم، فایرفاکس، اج) تکرار می‌شود.

مشکل به‌ویژه هنگام کار با دستورات طولانی و شامل کاراکترهای خاص (مثل |, >, &) بیشتر دیده می‌شود.

تأثیر بر کارایی:
این مشکل باعث می‌شود که توسعه‌دهندگان مجبور شوند دستورات طولانی را به‌صورت دستی تایپ کنند که هم وقت‌گیر است و هم احتمال خطا را افزایش می‌دهد. در محیط‌های ابری مثل MonkeyCode که هدف اصلی آن‌ها سرعت و سهولت کار است، این موضوع یک نقص جدی محسوب می‌شود.

نتیجه‌ی مورد انتظار (Expected result):
انتظار می‌رود که ترمینال MonkeyCode از روش‌های استاندارد کپی و پیست پشتیبانی کامل کند، یعنی:

Ctrl+C و Ctrl+V (یا Cmd+C و Cmd+V در مک) به‌درستی کار کنند.

کلیک راست و انتخاب Copy/Paste از منوی مرورگر بدون مشکل عمل کند.

پیست کردن دستورات طولانی و شامل کاراکترهای خاص به‌درستی انجام شود.

این قابلیت در همه‌ی مرورگرهای اصلی پایدار باشد.

پیشنهاد راه‌حل (Suggested Fix):
به نظر می‌رسد مشکل از نحوه‌ی پیاده‌سازی Clipboard API در ترمینال وب‌محور MonkeyCode باشد. پیشنهاد می‌کنم:

از یک کتابخانه‌ی استاندارد و پایدار برای مدیریت Clipboard در ترمینال استفاده کنید (مثل xterm.js که به‌خوبی از کپی‌پیست پشتیبانی می‌کند).

در صورت نیاز، یک دکمه‌ی «Paste» در کنار ترمینال اضافه کنید تا کاربران بتوانند با یک کلیک، محتوای کلیپ‌بورد را پیست کنند.

پیاده‌سازی یک راهنمای کوتاه (Tooltip) در مورد روش‌های صحیح کپی‌پیست در ترمینال برای کاربران جدید.

شماره کاربری (UID): 6f5e8686-42bb-4da1-a2da-e9be84ed397f

با تشکر از توجه شما به این مشکل. امیدوارم که این بازخورد بتواند به بهبود تجربه‌ی کاربری MonkeyCode کمک کند.

Hello MonkeyCode Team,

I'm experiencing a significant issue with copy-paste functionality in the Terminal within the Cloud IDE environment. This problem is particularly frustrating when working with long and complex commands, slowing down the development process.

Steps to Reproduce:

    Create a new Task in MonkeyCode.

    Open the terminal.

    Try to copy a long command (e.g., composer require laravel/sanctum) from somewhere else and paste it into the terminal.

    Notice that sometimes nothing happens, and sometimes characters are not entered correctly.

My Observations:

    Standard shortcuts (Ctrl+C and Ctrl+V) usually don't work.

    Sometimes Ctrl+Shift+V works, but not always.

    Right-clicking and selecting "Paste" from the browser menu also sometimes fails.

    This issue is reproducible in different browsers (Chrome, Firefox, Edge).

    The problem is more pronounced with long commands containing special characters (e.g., |, >, &).

Impact on Productivity:
This issue forces developers to type long commands manually, which is both time-consuming and error-prone. In a cloud environment like MonkeyCode, where speed and ease of use are key, this is a significant drawback.

Expected Result:
The terminal should fully support standard copy-paste methods, meaning:

    Ctrl+C and Ctrl+V (or Cmd+C and Cmd+V on Mac) should work properly.

    Right-click and selecting Copy/Paste from the browser menu should work without issues.

    Pasting long commands with special characters should work correctly.

    This functionality should be stable across all major browsers.

Suggested Fix:
It seems the issue is related to the Clipboard API implementation in the web-based terminal. I suggest:

    Using a standard and stable library for Clipboard management in the terminal (e.g., xterm.js, which supports copy-paste well).

    Adding a "Paste" button next to the terminal as a fallback.

    Implementing a brief tooltip guide on proper copy-paste methods for new users.

UID: 6f5e8686-42bb-4da1-a2da-e9be84ed397f

Thank you for your attention to this issue. I hope this feedback helps improve the MonkeyCode user experience.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Terminal entry point in the Cloud IDE and reproduce the issue with a long command containing special characters, using the listed browser shortcuts and context-menu paste. Trace the terminal's clipboard handling and verify the behavior across Chrome, Firefox, and Edge. Done means standard copy-paste methods reliably insert the complete command.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli, developer-experience
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.