Duo Chat Web UI: The input field breaks when inserting large strings
The input field breaks when inserting large strings in the Duo Chat Web UI.
Large string inserted:
"{\"data\": {\"id\": 128440335, \"title\": \"Guest users are not able to subscribe to work items\", \"author_id\": 3860200, \"project_id\": 278964, \"created_at\": \"2023-05-24 09:55:52 UTC\", \"updated_at\": \"2023-10-24 13:56:16 UTC\", \"description\": \"A user with guest access should be able to subscribe/unsubscribe from work item notifications despite not having permissions to update the work item.\\n\\nWe are observing this bug because the GraphQL mutation that updates all widgets [checks `update_work_item` permission](https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/graphql/mutations/work_items/update.rb#L13) when this particular widget requires the more lenient `update_subscription` permission.\\n\\n### Steps to replicate\\n\\n- Log in as a `Guest` user and visit an issue in the project, for example `https://gdk.test:3000/gitlab-org/gitlab-test/-/issues/1`\\n- The user should be able to reveal the notifications toggle in the top menu\\n- Visit the same issue using the work item view for example `https://gdk.test:3000/gitlab-org/gitlab-test/-/work_items/1`\\n- The option to toggle notifications is not displayed\\n\\n![Screen_Recording_2023-05-24_at_11.32.13](/uploads/b28defc97c9690f78748f45df4b4a387/Screen_Recording_2023-05-24_at_11.32.13.mov)\", \"milestone_id\": 2969682, \"iid\": 412831, \"updated_by_id\": 3860200, \"weight\": 2, \"confidential\": false, \"moved_to_id\": null, \"due_date\": null, \"lock_version\": 0, \"time_estimate\": 0, \"relative_position\": -194466693, \"service_desk_reply_to\": null, \"last_edited_at\": null, \"last_edited_by_id\": null, \"discussion_locked\": null, \"closed_at\": \"2023-07-31 08:59:23 UTC\", \"closed_by_id\": 3860200, \"state_id\": 2, \"duplicated_to_id\": null, \"promoted_to_epic_id\": null, \"health_status\": \"on_track\", \"external_key\": null, \"sprint_id\": null, \"blocking_issues_count\": 0, \"upvotes_count\": 0, \"work_item_type_id\": 1, \"namespace_id\": 15846663, \"start_date\": null}, \"author\": {\"id\": 3860200, \"username\": \"egrieff\", \"name\": \"Eugenia Grieff\"}, \"labels\": [{\"id\": 992791, \"title\": \"Deliverable\", \"color\": \"#428BCA\", \"project_id\": null, \"created_at\": \"2016-11-18 17:02:50 UTC\", \"updated_at\": \"2019-04-17 18:49:16 UTC\", \"template\": false, \"description\": \"Issues scheduled for the current milestone.\", \"type\": \"GroupLabel\", \"group_id\": 9970, \"lock_on_merge\": false}, {\"id\": 10413872, \"title\": \"SLO::Missed\", \"color\": \"#CC0000\", \"project_id\": null, \"created_at\": \"2019-04-28 18:18:21 UTC\", \"updated_at\": \"2023-02-16 18:38:39 UTC\", \"template\": false, \"description\": \"Label to signify that a bug issue has missed its targeted SLO (Service Level Objective). See https://docs.gitlab.com/ee/development/contributing/issue_workflow.html#priority-labels. Previously titled as missed-SLO\", \"type\": \"GroupLabel\", \"group_id\": 9970, \"lock_on_merge\": false}, {\"id\": 2492649, \"title\": \"backend\", \"color\": \"#D10069\", \"project_id\": null, \"created_at\": \"2017-08-15 14:49:42 UTC\", \"updated_at\": \"2018-06-11 10:34:33 UTC\", \"template\": false, \"description\": \"Issues that require backend work\", \"type\": \"GroupLabel\", \"group_id\": 9970, \"lock_on_merge\": false}, {\"id\": 26460213, \"title\": \"bug::functional\", \"color\": \"#CC0000\", \"project_id\": null, \"created_at\": \"2022-08-16 19:56:26 UTC\", \"updated_at\": \"2022-08-16 19:56:26 UTC\", \"template\": false, \"description\": \"Functional defects resulting from feature changes\", \"type\": \"GroupLabel\", \"group_id\": 9970, \"lock_on_merge\": false}, {\"id\": 3103451, \"title\": \"devops::plan\", \"color\": \"#E44D2A\", \"project_id\": null, \"created_at\": \"2017-12-01 19:00:23 UTC\", \"updated_at\": \"2022-05-11 06:40:37 UTC\", \"template\": false, \"description\": \"Issues for the Plan stage of the DevOps lifecycle (e.g. Project Management, Agile Portfolio Management, Requirements Management)\", \"type\": \"GroupLabel\", \"group_id\": 9970, \"lock_on_merge\": false}, {\"id\": 3412464, \"title\": \"frontend\", \"color\": \"#3cb371\", \"project_id\": null, \"created_at\": \"2018-01-30 21:42:37 UTC\", \"updated_at\": \"2022-05-13 09:23:38 UTC\", \"template\": false, \"description\": \"Issues for the Frontend team. Covers everything related to the way GitLab behaves (and, to an extent, looks) inside your browser.\", \"type\": \"GroupLabel\", \"group_id\": 9970, \"lock_on_merge\": false}, {\"id\": 10690700, \"title\": \"group::product planning\", \"color\": \"#A8D695\", \"project_id\": null, \"created_at\": \"2019-05-22 19:55:52 UTC\", \"updated_at\": \"2020-10-16 19:33:41 UTC\", \"template\": false, \"description\": \"Issues belonging to the Product Planning group of the Plan stage of the DevOps lifecycle. See https://about.gitlab.com/handbook/product/product-categories/#product-planning-group\", \"type\": \"GroupLabel\", \"group_id\": 9970, \"lock_on_merge\": false}, {\"id\": 3857523, \"title\": \"priority::2\", \"color\": \"#ff8800\", \"project_id\": null, \"created_at\": \"2018-04-13 08:01:55 UTC\", \"updated_at\": \"2020-09-14 22:10:38 UTC\", \"template\": false, \"description\": \"We will address this soon and will provide capacity from our team for it in the next few releases. See https://about.gitlab.com/handbook/engineering/quality/issue-triage/#priority\", \"type\": \"GroupLabel\", \"group_id\": 9970, \"lock_on_merge\": false}, {\"id\": 14918378, \"title\": \"section::dev\", \"color\": \"#F0AD4E\", \"project_id\": null, \"created_at\": \"2020-05-11 22:11:57 UTC\", \"updated_at\": \"2020-05-11 22:11:57 UTC\", \"template\": false, \"description\": \"Issues related to the Dev section\", \"type\": \"GroupLabel\", \"group_id\": 9970, \"lock_on_merge\": false}, {\"id\": 3713902, \"title\": \"severity::2\", \"color\": \"#ff8800\", \"project_id\": null, \"created_at\": \"2018-03-23 14:46:34 UTC\", \"updated_at\": \"2020-09-14 22:13:45 UTC\", \"template\": false, \"description\": \"Critical - applies to bugs and bug categories of availability, performance, security and ux. See https://about.gitlab.com/handbook/engineering/quality/issue-triage/#severity\", \"type\": \"GroupLabel\", \"group_id\": 9970, \"lock_on_merge\": false}, {\"id\": 2278648, \"title\": \"type::bug\", \"color\": \"#CC0000\", \"project_id\": null, \"created_at\": \"2017-07-07 20:20:34 UTC\", \"updated_at\": \"2021-10-27 09:36:49 UTC\", \"template\": false, \"description\": \"Issues that report undesirable or incorrect behavior. See https://about.gitlab.com/handbook/engineering/metrics/#work-type-classification\", \"type\": \"GroupLabel\", \"group_id\": 9970, \"lock_on_merge\": false}, {\"id\": 25541419, \"title\": \"work items\", \"color\": \"#428BCA\", \"project_id\": null, \"created_at\": \"2022-06-13 14:41:30 UTC\", \"updated_at\": \"2022-06-13 14:41:30 UTC\", \"template\": false, \"description\": \"Related to the Work Items feature\", \"type\": \"GroupLabel\", \"group_id\": 9970, \"lock_on_merge\": false}, {\"id\": 28669354, \"title\": \"workflow::complete\", \"color\": \"#428BCA\", \"project_id\": null, \"created_at\": \"2023-01-12 00:18:59 UTC\", \"updated_at\": \"2023-01-12 17:27:43 UTC\", \"template\": false, \"description\": \"Applied after all MRs have merged and the issue has been verified if necessary\", \"type\": \"GroupLabel\", \"group_id\": 9970, \"lock_on_merge\": false}], \"epic_id\": 835460, \"milestone\": {\"id\": 2969682, \"title\": \"16.3\", \"project_id\": null, \"description\": \"\", \"due_date\": \"2023-08-17\", \"created_at\": \"2023-02-01 16:03:42 UTC\", \"updated_at\": \"2023-02-01 16:03:42 UTC\", \"state\": \"active\", \"iid\": 90, \"start_date\": \"2023-07-18\", \"group_id\": 9970, \"lock_version\": 0}, \"iteration\": null, \"iterations_cadence\": null, \"notes\": [{\"note\": \"@ramistry Assigning this to you as discussed. :slight_smile:\", \"noteable_type\": \"Issue\", \"author_id\": 411701, \"created_at\": \"2023-07-14 04:46:11 UTC\", \"updated_at\": \"2023-07-14 04:46:11 UTC\", \"project_id\": 278964, \"attachment\": null, \"line_code\": null, \"commit_id\": null, \"noteable_id\": 128440335, \"st_diff\": null, \"system\": false, \"updated_by_id\": null, \"type\": null, \"position\": null, \"original_position\": null, \"resolved_at\": null, \"resolved_by_id\": null, \"discussion_id\": \"38b30d5809070a434e01d7f712c68bc8716072a3\", \"change_position\": null, \"resolved_by_push\": null, \"review_id\": null, \"confidential\": null, \"last_edited_at\": null, \"internal\": false, \"id\": 1469295673, \"namespace_id\": null}, {\"note\": \"@egrieff, I have tried the IssueSetSubscription mutation for work items in the !127137 MR and it worked as required. It is also not allowing guest user to subscribe on confidential work item. \\ud83d\\ude42 \\n\\nI just have doubt regarding the naming convention of the mutation. I am not sure if we should go further with current name or have a new mutation like you suggested i.e. `WorkItemSetSubscription`.\", \"noteable_type\": \"Issue\", \"author_id\": 13375904, \"created_at\": \"2023-07-21 07:22:02 UTC\", \"updated_at\": \"2023-07-21 07:22:02 UTC\", \"project_id\": 278964, \"attachment\": null, \"line_code\": null, \"commit_id\": null, \"noteable_id\": 128440335, \"st_diff\": null, \"system\": false, \"updated_by_id\": null, \"type\": \"DiscussionNote\", \"position\": null, \"original_position\": null, \"resolved_at\": null, \"resolved_by_id\": null, \"discussion_id\": \"60d393f26d1fb1fae1797e2e78d6ab4d2ae4a680\", \"change_position\": null, \"resolved_by_push\": null, \"review_id\": null, \"confidential\": false, \"last_edited_at\": null, \"internal\": false, \"id\": 1480725131, \"namespace_id\": null}, {\"note\": \"**Proposal**: We can use `IssueSetSubscription` for subscribing and unsubscribing to the work item. If the existing mutation's arguments are not suitable, we can add a new mutation e.g. `WorkItemSetSubscription`.\", \"noteable_type\": \"Issue\", \"author_id\": 3860200, \"created_at\": \"2023-05-24 15:48:32 UTC\", \"updated_at\": \"2023-07-21 07:22:02 UTC\", \"project_id\": 278964, \"attachment\": null, \"line_code\": null, \"commit_id\": null, \"noteable_id\": 128440335, \"st_diff\": null, \"system\": false, \"updated_by_id\": null, \"type\": \"DiscussionNote\", \"position\": null, \"original_position\": null, \"resolved_at\": null, \"resolved_by_id\": null, \"discussion_id\": \"60d393f26d1fb1fae1797e2e78d6ab4d2ae4a680\", \"change_position\": null, \"resolved_by_push\": null, \"review_id\": null, \"confidential\": null, \"last_edited_at\": null, \"internal\": false, \"id\": 1404104068, \"namespace_id\": null}, {\"note\": \"@ramistry Thanks for confirming, good point about the name and also I noticed that `IssueSetSubscription` requires a project so this won't work when work items are supported at the group level.\\n\\nI've opened https://gitlab.com/gitlab-org/gitlab/-/merge_requests/127220 to add a new mutation that requires the work item's global id instead, but this cannot be used until %\\\"16.4\\\". Do you think we can use https://gitlab.com/gitlab-org/gitlab/-/merge_requests/127137 for now in order to fix the permissions problem?\", \"noteable_type\": \"Issue\", \"author_id\": 3860200, \"created_at\": \"2023-07-21 10:49:49 UTC\", \"updated_at\": \"2023-07-21 11:03:02 UTC\", \"project_id\": 278964, \"attachment\": null, \"line_code\": null, \"commit_id\": null, \"noteable_id\": 128440335, \"st_diff\": null, \"system\": false, \"updated_by_id\": 3860200, \"type\": \"DiscussionNote\", \"position\": null, \"original_position\": null, \"resolved_at\": null, \"resolved_by_id\": null, \"discussion_id\": \"60d393f26d1fb1fae1797e2e78d6ab4d2ae4a680\", \"change_position\": null, \"resolved_by_push\": null, \"review_id\": null, \"confidential\": false, \"last_edited_at\": \"2023-07-21 10:50:42 UTC\", \"internal\": false, \"id\": 1481044252, \"namespace_id\": null}, {\"note\": \"@egrieff, yes, I think we can use !127137 as long as we do not have major changes in the mutation input and response in new mutation. :smile:\", \"noteable_type\": \"Issue\", \"author_id\": 13375904, \"created_at\": \"2023-07-21 11:03:22 UTC\", \"updated_at\": \"2023-07-21 11:03:48 UTC\", \"project_id\": 278964, \"attachment\": null, \"line_code\": null, \"commit_id\": null, \"noteable_id\": 128440335, \"st_diff\": null, \"system\": false, \"updated_by_id\": 13375904, \"type\": \"DiscussionNote\", \"position\": null, \"original_position\": null, \"resolved_at\": null, \"resolved_by_id\": null, \"discussion_id\": \"60d393f26d1fb1fae1797e2e78d6ab4d2ae4a680\", \"change_position\": null, \"resolved_by_push\": null, \"review_id\": null, \"confidential\": false, \"last_edited_at\": \"2023-07-21 11:03:48 UTC\", \"internal\": false, \"id\": 1481062002, \"namespace_id\": null}, {\"note\": \"@ramistry Ok! The changes should not be major, just:\\n\\n- mutation input: `projectPath`, `iid` and `subscribedState` -> `id` and `subscribed`\\n- response: `issue` -> `workItem`\\n\\nWould that be possible?\", \"noteable_type\": \"Issue\", \"author_id\": 3860200, \"created_at\": \"2023-07-21 11:17:09 UTC\", \"updated_at\": \"2023-07-21 11:17:21 UTC\", \"project_id\": 278964, \"attachment\": null, \"line_code\": null, \"commit_id\": null, \"noteable_id\": 128440335, \"st_diff\": null, \"system\": false, \"updated_by_id\": 3860200, \"type\": \"DiscussionNote\", \"position\": null, \"original_position\": null, \"resolved_at\": null, \"resolved_by_id\": null, \"discussion_id\": \"60d393f26d1fb1fae1797e2e78d6ab4d2ae4a680\", \"change_position\": null, \"resolved_by_push\": null, \"review_id\": null, \"confidential\": false, \"last_edited_at\": \"2023-07-21 11:17:21 UTC\", \"internal\": false, \"id\": 1481081870, \"namespace_id\": null}, {\"note\": \"Yes, that will do. :thumbsup:\", \"noteable_type\": \"Issue\", \"author_id\": 13375904, \"created_at\": \"2023-07-21 11:29:31 UTC\", \"updated_at\": \"2023-07-21 13:54:50 UTC\", \"project_id\": 278964, \"attachment\": null, \"line_code\": null, \"commit_id\": null, \"noteable_id\": 128440335, \"st_diff\": null, \"system\": false, \"updated_by_id\": null, \"type\": \"DiscussionNote\", \"position\": null, \"original_position\": null, \"resolved_at\": null, \"resolved_by_id\": null, \"discussion_id\": \"60d393f26d1fb1fae1797e2e78d6ab4d2ae4a680\", \"change_position\": null, \"resolved_by_push\": null, \"review_id\": null, \"confidential\": false, \"last_edited_at\": null, \"internal\": false, \"id\": 1481101613, \"namespace_id\": null}, {\"note\": \"The actual issue is fixed and working on gitlab.com. But we are still working on few other concerns mentioned in the [thread](https://gitlab.com/gitlab-org/gitlab/-/issues/412831#note_1404104068 \\\"Guest users are not able to subscribe to work items\\\"). \\n\\n@egrieff, I am keeping the issue open till the https://gitlab.com/gitlab-org/gitlab/-/merge_requests/127220 MR is merged. Does that sound right?\", \"noteable_type\": \"Issue\", \"author_id\": 13375904, \"created_at\": \"2023-07-28 05:23:02 UTC\", \"updated_at\": \"2023-07-28 14:08:01 UTC\", \"project_id\": 278964, \"attachment\": null, \"line_code\": null, \"commit_id\": null, \"noteable_id\": 128440335, \"st_diff\": null, \"system\": false, \"updated_by_id\": null, \"type\": \"DiscussionNote\", \"position\": null, \"original_position\": null, \"resolved_at\": null, \"resolved_by_id\": null, \"discussion_id\": \"64f0db074dce6d0dd7c29994a57fdb1e7a51f4ab\", \"change_position\": null, \"resolved_by_push\": null, \"review_id\": null, \"confidential\": null, \"last_edited_at\": null, \"internal\": false, \"id\": 1491357196, \"namespace_id\": null}, {\"note\": \"@ramistry Sounds good to me :thumbsup: \\n\\nI've created the ~frontend issue for updating the mutation again next milestone: https://gitlab.com/gitlab-org/gitlab/-/issues/420151. Feel free to amend it if needed.\\n\\nI'll validate and close this issue once https://gitlab.com/gitlab-org/gitlab/-/merge_requests/127220 is in production.\", \"noteable_type\": \"Issue\", \"author_id\": 3860200, \"created_at\": \"2023-07-28 14:08:01 UTC\", \"updated_at\": \"2023-07-31 05:23:22 UTC\", \"project_id\": 278964, \"attachment\": null, \"line_code\": null, \"commit_id\": null, \"noteable_id\": 128440335, \"st_diff\": null, \"system\": false, \"updated_by_id\": 3860200, \"type\": \"DiscussionNote\", \"position\": null, \"original_position\": null, \"resolved_at\": null, \"resolved_by_id\": null, \"discussion_id\": \"64f0db074dce6d0dd7c29994a57fdb1e7a51f4ab\", \"change_position\": null, \"resolved_by_push\": null, \"review_id\": null, \"confidential\": false, \"last_edited_at\": \"2023-07-28 14:08:32 UTC\", \"internal\": false, \"id\": 1492242485, \"namespace_id\": null}, {\"note\": \"Verified in production with 16.3.0-pre [49750df77fa](https://gitlab.com/gitlab-org/gitlab/-/commits/49750df77fa)\", \"noteable_type\": \"Issue\", \"author_id\": 3860200, \"created_at\": \"2023-07-31 08:59:23 UTC\", \"updated_at\": \"2023-07-31 16:30:29 UTC\", \"project_id\": 278964, \"attachment\": null, \"line_code\": null, \"commit_id\": null, \"noteable_id\": 128440335, \"st_diff\": null, \"system\": false, \"updated_by_id\": null, \"type\": null, \"position\": null, \"original_position\": null, \"resolved_at\": null, \"resolved_by_id\": null, \"discussion_id\": \"55966de7fe55806909024fc9c340f366bc131907\", \"change_position\": null, \"resolved_by_push\": null, \"review_id\": null, \"confidential\": null, \"last_edited_at\": null, \"internal\": false, \"id\": 1493409135, \"namespace_id\": null}], \"note_authors\": [{\"id\": 411701, \"username\": \"kushalpandya\", \"name\": \"Kushal Pandya\"}, {\"id\": 13375904, \"username\": \"ramistry\", \"name\": \"Rajan Mistry\"}, {\"id\": 3860200, \"username\": \"egrieff\", \"name\": \"Eugenia Grieff\"}, {\"id\": 3860200, \"username\": \"egrieff\", \"name\": \"Eugenia Grieff\"}, {\"id\": 13375904, \"username\": \"ramistry\", \"name\": \"Rajan Mistry\"}, {\"id\": 3860200, \"username\": \"egrieff\", \"name\": \"Eugenia Grieff\"}, {\"id\": 13375904, \"username\": \"ramistry\", \"name\": \"Rajan Mistry\"}, {\"id\": 13375904, \"username\": \"ramistry\", \"name\": \"Rajan Mistry\"}, {\"id\": 3860200, \"username\": \"egrieff\", \"name\": \"Eugenia Grieff\"}, {\"id\": 3860200, \"username\": \"egrieff\", \"name\": \"Eugenia Grieff\"}], \"namespace_hierarchy\": [{\"id\": 9970, \"name\": \"GitLab.org\", \"path\": \"gitlab-org\", \"type\": \"Group\"}, {\"id\": 278964, \"name\": \"GitLab\", \"path\": \"gitlab\", \"type\": \"Project\", \"project_namespace_id\": 15846663}]}"
Please, note that the string provided doesn't have any new lines ("\n"). It's simply a long JSON line with several fields.
Edited by Alexander Chueshev