galadrim-feedback 1.0.65 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (221) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +69 -35
  3. package/bin/cli.js +130 -120
  4. package/declaration.d.ts +6 -6
  5. package/dist/index.cjs +12756 -9032
  6. package/dist/index.mjs +12757 -9033
  7. package/dist/styles.css +3 -3
  8. package/dist/types/libs/backend-client/api.d.ts +561 -1139
  9. package/dist/types/src/components/atoms/avatars/Avatar.d.ts +1 -1
  10. package/dist/types/src/components/atoms/buttons/Button.d.ts +1 -1
  11. package/dist/types/src/components/atoms/buttons/CloseButton.d.ts +1 -1
  12. package/dist/types/src/components/atoms/buttons/CollapseButton.d.ts +1 -1
  13. package/dist/types/src/components/atoms/buttons/OpenFeedbackButton.d.ts +1 -1
  14. package/dist/types/src/components/atoms/icons/CommentIcon.d.ts +1 -1
  15. package/dist/types/src/components/atoms/inputs/Input.d.ts +1 -1
  16. package/dist/types/src/components/atoms/inputs/SearchInput.d.ts +1 -1
  17. package/dist/types/src/components/atoms/loader/SimpleLoader.d.ts +1 -1
  18. package/dist/types/src/components/atoms/toast/Toast.d.ts +2 -2
  19. package/dist/types/src/components/atoms/tooltip/Tooltip.d.ts +1 -1
  20. package/dist/types/src/components/boundary/StyleBoundary.d.ts +1 -1
  21. package/dist/types/src/components/molecules/ConnectedUser.d.ts +1 -1
  22. package/dist/types/src/components/molecules/feedbacks/group/FeedbackList.d.ts +1 -1
  23. package/dist/types/src/components/molecules/feedbacks/group/FeedbackPins.d.ts +1 -1
  24. package/dist/types/src/components/molecules/feedbacks/item/FeedbackInput.d.ts +1 -1
  25. package/dist/types/src/components/molecules/feedbacks/item/FeedbackItemHovered.d.ts +2 -2
  26. package/dist/types/src/components/molecules/feedbacks/item/FeedbackItemSelected.d.ts +2 -2
  27. package/dist/types/src/components/molecules/feedbacks/item/FeedbackListItem.d.ts +2 -2
  28. package/dist/types/src/components/molecules/feedbacks/item/FeedbackListItem.styles.d.ts +44 -0
  29. package/dist/types/src/components/molecules/feedbacks/item/FeedbackPin.d.ts +2 -2
  30. package/dist/types/src/components/molecules/feedbacks/menu/FastAccessButtons.d.ts +2 -2
  31. package/dist/types/src/components/molecules/feedbacks/menu/FeedbackDetailsModal.d.ts +1 -1
  32. package/dist/types/src/components/molecules/feedbacks/menu/FilterButton.d.ts +1 -1
  33. package/dist/types/src/components/molecules/feedbacks/menu/MenuButton.d.ts +2 -2
  34. package/dist/types/src/components/molecules/feedbacks/menu/MenuItem.d.ts +3 -2
  35. package/dist/types/src/components/molecules/feedbacks/menu/SubmenuMenu.d.ts +17 -0
  36. package/dist/types/src/components/molecules/feedbacks/shared/FeedbackPositioner.d.ts +1 -1
  37. package/dist/types/src/components/molecules/feedbacks/shared/FeedbackTextArea.d.ts +1 -1
  38. package/dist/types/src/components/molecules/feedbacks/shared/FeedbackTextArea.styles.d.ts +24 -0
  39. package/dist/types/src/components/molecules/feedbacks/shared/Mentions.d.ts +1 -1
  40. package/dist/types/src/components/molecules/forms/ResetPasswordForm.d.ts +2 -7
  41. package/dist/types/src/components/molecules/forms/SignInForm.d.ts +2 -9
  42. package/dist/types/src/components/molecules/forms/SignUpForm.d.ts +1 -1
  43. package/dist/types/src/components/molecules/kanban/ConfirmTicketLinkModal.d.ts +2 -2
  44. package/dist/types/src/components/molecules/kanban/CreateCardForm.d.ts +20 -5
  45. package/dist/types/src/components/molecules/kanban/CreateCardModal.d.ts +1 -1
  46. package/dist/types/src/components/molecules/kanban/LinkToTicketForm.d.ts +1 -1
  47. package/dist/types/src/components/molecules/kanban/LinkToTicketForm.styles.d.ts +28 -0
  48. package/dist/types/src/components/molecules/kanban/LinkToTicketModal.d.ts +1 -1
  49. package/dist/types/src/components/molecules/modals/CollaboratorsModal.d.ts +1 -1
  50. package/dist/types/src/components/molecules/modals/ConnectionModal.d.ts +1 -1
  51. package/dist/types/src/components/molecules/modals/Modal.d.ts +1 -1
  52. package/dist/types/src/components/molecules/modals/ResetPasswordModal.d.ts +1 -1
  53. package/dist/types/src/components/molecules/modals/SettingsModal.d.ts +1 -1
  54. package/dist/types/src/components/molecules/notion/NotionCreateCardForm.d.ts +1 -1
  55. package/dist/types/src/components/molecules/notion/NotionLinkToTicketForm.d.ts +1 -1
  56. package/dist/types/src/components/molecules/replies/ReplyItem.d.ts +2 -2
  57. package/dist/types/src/components/molecules/trello/TrelloCreateCardForm.d.ts +1 -1
  58. package/dist/types/src/components/molecules/trello/TrelloLinkToTicketForm.d.ts +1 -1
  59. package/dist/types/src/components/molecules/trello/TrelloProjectModal.d.ts +1 -1
  60. package/dist/types/src/components/organisms/Collaborators.d.ts +1 -1
  61. package/dist/types/src/components/organisms/ConnectedPanel.d.ts +1 -1
  62. package/dist/types/src/components/organisms/Connection.d.ts +1 -1
  63. package/dist/types/src/components/organisms/ConnectionPanel.d.ts +1 -1
  64. package/dist/types/src/components/organisms/Settings.d.ts +1 -1
  65. package/dist/types/src/components/organisms/Settings.styles.d.ts +35 -0
  66. package/dist/types/src/components/organisms/SideBar.d.ts +1 -1
  67. package/dist/types/src/contexts/feedback/FeedbackContext.d.ts +3 -3
  68. package/dist/types/src/contexts/feedback/FeedbackProvider.d.ts +4 -4
  69. package/dist/types/src/contexts/kanban/KanbanContext.d.ts +2 -2
  70. package/dist/types/src/contexts/kanban/KanbanProvider.d.ts +3 -3
  71. package/dist/types/src/i18n/index.d.ts +4 -0
  72. package/dist/types/src/i18n/locales/en.d.ts +2 -0
  73. package/dist/types/src/i18n/locales/fr.d.ts +113 -0
  74. package/dist/types/src/index.d.ts +3 -3
  75. package/dist/types/src/services/api.d.ts +11 -1
  76. package/dist/types/src/services/apiToken.d.ts +7 -0
  77. package/dist/types/src/services/apiUrl.d.ts +14 -0
  78. package/dist/types/src/services/auth.d.ts +1 -1
  79. package/dist/types/src/services/collaborator.d.ts +3 -5
  80. package/dist/types/src/services/feedback.d.ts +4 -4
  81. package/dist/types/src/services/invitation.d.ts +8 -0
  82. package/dist/types/src/services/notion.d.ts +4 -4
  83. package/dist/types/src/services/project.d.ts +5 -5
  84. package/dist/types/src/services/trello.d.ts +6 -6
  85. package/dist/types/src/services/user.d.ts +3 -3
  86. package/dist/types/src/stores/FilterStore.d.ts +5 -0
  87. package/dist/types/src/stores/InvitationStore.d.ts +7 -0
  88. package/dist/types/src/stores/OpenFeedbackButtonStore.d.ts +1 -1
  89. package/dist/types/src/theme/formPrimitives.d.ts +18 -0
  90. package/dist/types/src/theme/index.d.ts +4 -0
  91. package/dist/types/src/theme/mixins.d.ts +3 -0
  92. package/dist/types/src/theme/primitives.d.ts +15 -0
  93. package/dist/types/src/theme/tokens.d.ts +37 -0
  94. package/dist/types/src/utils/displayName.d.ts +5 -0
  95. package/dist/types/src/utils/formatFromNow.d.ts +3 -0
  96. package/dist/types/src/utils/getFeedbackPosition.d.ts +1 -1
  97. package/dist/types/src/utils/getInitials.d.ts +1 -1
  98. package/dist/types/src/utils/highlightMention.d.ts +1 -1
  99. package/dist/types/src/utils/mentions.d.ts +2 -2
  100. package/index.d.ts +28 -16
  101. package/libs/backend-client/.openapi-generator/FILES +0 -3
  102. package/libs/backend-client/.openapi-generator-ignore +9 -0
  103. package/libs/backend-client/api.ts +6451 -5772
  104. package/next.cjs +9 -9
  105. package/next.d.ts +2 -2
  106. package/package.json +14 -6
  107. package/resolveGitSha.cjs +10 -10
  108. package/src/components/atoms/avatars/Avatar.tsx +4 -4
  109. package/src/components/atoms/buttons/Button.tsx +32 -36
  110. package/src/components/atoms/buttons/CloseButton.tsx +14 -16
  111. package/src/components/atoms/buttons/CollapseButton.tsx +13 -12
  112. package/src/components/atoms/buttons/OpenFeedbackButton.tsx +49 -48
  113. package/src/components/atoms/icons/CommentIcon.tsx +2 -2
  114. package/src/components/atoms/inputs/Input.tsx +22 -21
  115. package/src/components/atoms/inputs/SearchInput.tsx +15 -14
  116. package/src/components/atoms/loader/SimpleLoader.tsx +4 -3
  117. package/src/components/atoms/toast/Toast.tsx +16 -15
  118. package/src/components/atoms/tooltip/Tooltip.tsx +21 -20
  119. package/src/components/boundary/StyleBoundary.tsx +25 -25
  120. package/src/components/molecules/ConnectedUser.tsx +31 -39
  121. package/src/components/molecules/feedbacks/group/FeedbackList.tsx +28 -19
  122. package/src/components/molecules/feedbacks/group/FeedbackPins.tsx +6 -6
  123. package/src/components/molecules/feedbacks/item/FeedbackInput.tsx +22 -22
  124. package/src/components/molecules/feedbacks/item/FeedbackItemHovered.tsx +29 -49
  125. package/src/components/molecules/feedbacks/item/FeedbackItemSelected.tsx +47 -44
  126. package/src/components/molecules/feedbacks/item/FeedbackListItem.styles.ts +123 -0
  127. package/src/components/molecules/feedbacks/item/FeedbackListItem.tsx +64 -162
  128. package/src/components/molecules/feedbacks/item/FeedbackPin.tsx +30 -32
  129. package/src/components/molecules/feedbacks/menu/FastAccessButtons.tsx +64 -73
  130. package/src/components/molecules/feedbacks/menu/FeedbackDetailsModal.tsx +31 -32
  131. package/src/components/molecules/feedbacks/menu/FilterButton.tsx +108 -43
  132. package/src/components/molecules/feedbacks/menu/MenuButton.tsx +164 -114
  133. package/src/components/molecules/feedbacks/menu/MenuItem.tsx +35 -24
  134. package/src/components/molecules/feedbacks/menu/SubmenuMenu.tsx +67 -0
  135. package/src/components/molecules/feedbacks/shared/FeedbackPositioner.tsx +95 -95
  136. package/src/components/molecules/feedbacks/shared/FeedbackTextArea.styles.ts +88 -0
  137. package/src/components/molecules/feedbacks/shared/FeedbackTextArea.tsx +97 -176
  138. package/src/components/molecules/feedbacks/shared/Mentions.tsx +87 -86
  139. package/src/components/molecules/forms/ResetPasswordForm.tsx +53 -106
  140. package/src/components/molecules/forms/SignInForm.tsx +66 -137
  141. package/src/components/molecules/forms/SignUpForm.tsx +78 -50
  142. package/src/components/molecules/kanban/ConfirmTicketLinkModal.tsx +54 -62
  143. package/src/components/molecules/kanban/CreateCardForm.tsx +63 -68
  144. package/src/components/molecules/kanban/CreateCardModal.tsx +9 -9
  145. package/src/components/molecules/kanban/LinkToTicketForm.styles.ts +64 -0
  146. package/src/components/molecules/kanban/LinkToTicketForm.tsx +28 -92
  147. package/src/components/molecules/kanban/LinkToTicketModal.tsx +9 -9
  148. package/src/components/molecules/modals/ConnectionModal.tsx +6 -6
  149. package/src/components/molecules/modals/Modal.tsx +20 -19
  150. package/src/components/molecules/modals/ResetPasswordModal.tsx +15 -15
  151. package/src/components/molecules/modals/SettingsModal.tsx +6 -6
  152. package/src/components/molecules/notion/NotionCreateCardForm.tsx +16 -16
  153. package/src/components/molecules/notion/NotionLinkToTicketForm.tsx +8 -8
  154. package/src/components/molecules/replies/ReplyItem.tsx +24 -41
  155. package/src/components/molecules/trello/TrelloCreateCardForm.tsx +13 -13
  156. package/src/components/molecules/trello/TrelloLinkToTicketForm.tsx +6 -6
  157. package/src/components/molecules/trello/TrelloProjectModal.tsx +35 -36
  158. package/src/components/organisms/ConnectedPanel.tsx +34 -34
  159. package/src/components/organisms/Connection.tsx +10 -8
  160. package/src/components/organisms/ConnectionPanel.tsx +24 -13
  161. package/src/components/organisms/Settings.styles.ts +104 -0
  162. package/src/components/organisms/Settings.tsx +100 -269
  163. package/src/components/organisms/SideBar.tsx +24 -23
  164. package/src/contexts/feedback/FeedbackContext.tsx +11 -11
  165. package/src/contexts/feedback/FeedbackProvider.tsx +144 -148
  166. package/src/contexts/feedback/useFeedbackContext.tsx +3 -3
  167. package/src/contexts/kanban/KanbanContext.tsx +4 -4
  168. package/src/contexts/kanban/KanbanProvider.tsx +49 -49
  169. package/src/contexts/kanban/useKanbanContext.tsx +3 -3
  170. package/src/hooks/useLocationChange.ts +21 -21
  171. package/src/hooks/usePathname.ts +7 -7
  172. package/src/i18n/index.ts +49 -0
  173. package/src/i18n/locales/en.ts +118 -0
  174. package/src/i18n/locales/fr.ts +116 -0
  175. package/src/index.css +3 -3
  176. package/src/index.tsx +54 -46
  177. package/src/services/api.ts +56 -22
  178. package/src/services/apiToken.ts +30 -0
  179. package/src/services/apiUrl.ts +25 -0
  180. package/src/services/auth.ts +39 -44
  181. package/src/services/collaborator.ts +12 -41
  182. package/src/services/feedback.ts +51 -52
  183. package/src/services/invitation.ts +45 -0
  184. package/src/services/notion.ts +69 -67
  185. package/src/services/project.ts +18 -18
  186. package/src/services/trello.ts +81 -81
  187. package/src/services/user.ts +21 -21
  188. package/src/stores/FilterStore.ts +27 -11
  189. package/src/stores/InvitationStore.ts +19 -0
  190. package/src/stores/OpenFeedbackButtonStore.ts +16 -16
  191. package/src/theme/formPrimitives.tsx +63 -0
  192. package/src/theme/index.ts +11 -0
  193. package/src/theme/mixins.ts +19 -0
  194. package/src/theme/primitives.tsx +48 -0
  195. package/src/theme/tokens.ts +39 -0
  196. package/src/utils/displayName.ts +7 -0
  197. package/src/utils/findClosestScrollableParent.ts +14 -14
  198. package/src/utils/formatFromNow.ts +8 -0
  199. package/src/utils/getClientEnvironment.ts +30 -33
  200. package/src/utils/getFeedbackPosition.ts +35 -38
  201. package/src/utils/getGitSha.ts +16 -16
  202. package/src/utils/getInitials.ts +21 -12
  203. package/src/utils/getNotionStatusColor.ts +12 -13
  204. package/src/utils/getVisibleElements.ts +22 -22
  205. package/src/utils/highlightMention.ts +19 -19
  206. package/src/utils/isolateFromHostApp.ts +37 -37
  207. package/src/utils/mentions.ts +22 -22
  208. package/src/utils/removeQueryParam.ts +6 -6
  209. package/src/utils/showToast.tsx +5 -5
  210. package/vite.cjs +13 -13
  211. package/vite.d.ts +7 -7
  212. package/webpack.cjs +10 -10
  213. package/webpack.d.ts +2 -2
  214. package/dist/assets/icons/figma.svg +0 -3
  215. package/dist/types/libs/backend-client/common.d.ts +0 -65
  216. package/dist/types/src/contexts/figma/FigmaContext.d.ts +0 -5
  217. package/dist/types/src/contexts/figma/FigmaProvider.d.ts +0 -8
  218. package/dist/types/src/contexts/figma/useFigmaContext.d.ts +0 -4
  219. package/libs/backend-client/git_push.sh +0 -57
  220. package/src/components/molecules/modals/CollaboratorsModal.tsx +0 -16
  221. package/src/components/organisms/Collaborators.tsx +0 -187
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Galadrim
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -4,13 +4,14 @@
4
4
 
5
5
  ## Project Configuration
6
6
 
7
- Go to https://feedback.galadrim.ovh/admin
7
+ Projects live in the **dashboard**: https://dashboard.feedback.galadrim.ovh
8
8
 
9
- Log in with credentials from Passbolt: Back-Office - Galadrim Feedback
9
+ 1. **Sign in** same account as the feedback widget. If you don't have one yet, you get it through an invitation email (see [Accounts and collaborators](#accounts-and-collaborators)).
10
+ 2. **Pick your organization** — projects belong to an organization. Organizations are created by a Galadrim administrator from the back-office; if the dashboard tells you it has nothing to show, ask to be invited to yours.
11
+ 3. **Projects › New project** — a name, and optionally the staging URL of the app.
12
+ 4. **Copy the project ID** — the **Copy ID** button on the project row or on its page. That identifier is the `projectId` prop of the widget.
10
13
 
11
- Create a project
12
-
13
- Copy the project ID
14
+ The back-office (https://feedback.galadrim.ovh/admin, credentials in Passbolt: _Back-Office - Galadrim Feedback_) is now reserved for Galadrim administrators: organizations, cross-organization stats and audit log. Day-to-day project work happens in the dashboard.
14
15
 
15
16
  ## Installation
16
17
 
@@ -19,10 +20,10 @@ Copy the project ID
19
20
  Use our CLI to automatically copy the installation prompt:
20
21
 
21
22
  ```bash
22
- npx galadrim-feedback cursor-init --project-id="project_id" --notion-database-id="notion_database_id"
23
+ npx galadrim-feedback installation-prompt-to-clipboard --project-id="project_id" --notion-database-id="notion_database_id"
23
24
  ```
24
25
 
25
- This will copy the complete installation prompt to your clipboard. Then simply paste it into Cursor and let it handle the installation automatically!
26
+ This will copy the complete installation prompt to your clipboard. Then simply paste it into your editor's AI assistant and let it handle the installation automatically!
26
27
 
27
28
  <details>
28
29
  <summary><h3>🤖 Quick Install with Cursor</h3></summary>
@@ -163,7 +164,7 @@ Feedbacks automatically record the git commit SHA of the deployed app — no pro
163
164
  5. Verification:
164
165
  - Show all modified files
165
166
  - Confirm the navigation setup works with the detected router
166
- - List any manual steps needed (like getting projectId from admin) (see https://feedback.galadrim.ovh/admin)
167
+ - List any manual steps needed (like getting projectId from the dashboard) (see https://dashboard.feedback.galadrim.ovh)
167
168
 
168
169
  Be very specific about file paths and exact code to add. Show the complete import statements and component setup.
169
170
  ````
@@ -206,18 +207,18 @@ Galadrim Feedback requires a plugin to add file path data to your components.
206
207
 
207
208
  ```typescript
208
209
  // vite.config.ts
209
- import { defineConfig } from "vite";
210
- import react from "@vitejs/plugin-react-swc";
211
- import { includeGitSha } from "galadrim-feedback/vite";
210
+ import { defineConfig } from 'vite'
211
+ import react from '@vitejs/plugin-react-swc'
212
+ import { includeGitSha } from 'galadrim-feedback/vite'
212
213
 
213
214
  export default defineConfig({
214
215
  plugins: [
215
216
  react({
216
- plugins: [["swc-plugin-react-generate-paths", {}]],
217
+ plugins: [['swc-plugin-react-generate-paths', {}]],
217
218
  }),
218
219
  includeGitSha(),
219
220
  ],
220
- });
221
+ })
221
222
  ```
222
223
 
223
224
  **For Next.js (Turbopack):**
@@ -261,20 +262,20 @@ If your project uses Babel, you can use the Babel plugin instead.
261
262
 
262
263
  ```typescript
263
264
  // vite.config.ts
264
- import { defineConfig } from "vite";
265
- import react from "@vitejs/plugin-react";
266
- import { includeGitSha } from "galadrim-feedback/vite";
265
+ import { defineConfig } from 'vite'
266
+ import react from '@vitejs/plugin-react'
267
+ import { includeGitSha } from 'galadrim-feedback/vite'
267
268
 
268
269
  export default defineConfig({
269
270
  plugins: [
270
271
  react({
271
272
  babel: {
272
- plugins: [["babel-plugin-react-generate-paths"]],
273
+ plugins: [['babel-plugin-react-generate-paths']],
273
274
  },
274
275
  }),
275
276
  includeGitSha(),
276
277
  ],
277
- });
278
+ })
278
279
  ```
279
280
 
280
281
  **For other Babel setups (e.g. `.babelrc`):**
@@ -294,25 +295,27 @@ Each feedback records the git commit SHA of the deployed app — see the [Git SH
294
295
  Add the **FeedbackRoot** component to the root of your application. It must be placed inside the **router**.
295
296
 
296
297
  ```javascript
297
- import FeedbackRoot from "galadrim-feedback";
298
- import "galadrim-feedback/dist/styles.css"; // Don't forget to import the CSS styles
298
+ import FeedbackRoot from 'galadrim-feedback'
299
+ import 'galadrim-feedback/dist/styles.css' // Don't forget to import the CSS styles
299
300
 
300
301
  // Add FeedbackRoot to your application
301
- <FeedbackRoot
302
+ ;<FeedbackRoot
302
303
  rootDir="/path/to/your/project"
303
- projectId="your-project-id" // Your project ID in Galadmin
304
+ projectId="your-project-id" // Your project ID, from the dashboard
304
305
  notionDatabaseId="22c3c3f19e43808b9675f769eaeea394" // The id of the Board in Notion
305
306
  navigate={(path) => navigate(path)} // Navigation function to use your router
306
307
  position="bottom-right" // Position of the button to open Feedback mode (bottom-right, bottom-left, top-right, top-left)
307
- />;
308
+ language="fr" // Language of the widget UI ('fr' or 'en', defaults to 'fr')
309
+ />
308
310
  ```
309
311
 
310
312
  #### Props Explanation:
311
313
 
312
314
  - **rootDir**: The path to your project root up to src (feedbacks will be linked to components with the path `src/path/to/your/component` which is combined with rootDir to open them in VSCode).
313
- - **projectId**: Your project identifier in **Galadmin**. (request from an administrator)
315
+ - **projectId**: Your project identifier, copied from the [dashboard](https://dashboard.feedback.galadrim.ovh) (**Copy ID**).
314
316
  - **navigate**: A function that takes a path and allows you to navigate using your **router**.
315
317
  - **position**: The position of the button to open Feedback mode (bottom-right, bottom-left, top-right, top-left)
318
+ - **language** _(optional)_: The language of the widget UI, `'fr'` or `'en'`. Defaults to `'fr'`. Also drives the locale used for relative dates.
316
319
  - **notionDatabaseId**: The unique identifier for your Notion database. To obtain this ID:
317
320
 
318
321
  1. **Navigate to your Notion Board**
@@ -347,11 +350,11 @@ Each feedback records the git commit SHA of the app it was created on, so it can
347
350
  Add the plugin to `vite.config.ts`. It injects a `<meta name="git-sha">` tag at each build (dev server included):
348
351
 
349
352
  ```typescript
350
- import { includeGitSha } from "galadrim-feedback/vite";
353
+ import { includeGitSha } from 'galadrim-feedback/vite'
351
354
 
352
355
  export default defineConfig({
353
356
  plugins: [react(), includeGitSha()],
354
- });
357
+ })
355
358
  ```
356
359
 
357
360
  ### Next.js
@@ -360,11 +363,11 @@ Works with webpack and Turbopack — wrap your config; the SHA is exposed as `NE
360
363
 
361
364
  ```javascript
362
365
  // next.config.js
363
- const { withGitSha } = require("galadrim-feedback/next");
366
+ const { withGitSha } = require('galadrim-feedback/next')
364
367
 
365
368
  module.exports = withGitSha({
366
369
  // your existing next config
367
- });
370
+ })
368
371
  ```
369
372
 
370
373
  On Vercel this is optional: `NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA` is picked up automatically (with "Automatically expose System Environment Variables" enabled).
@@ -412,9 +415,15 @@ Galadrim Feedback works on top of modal dialogs (Radix, Headless UI, MUI, react-
412
415
 
413
416
  The widget renders in a shadow root and stops its own events from reaching `document`, so the focus traps and "click outside" layers of your app never mistake it for an outside interaction — leaving a feedback on a modal keeps it open and keeps the comment field focusable.
414
417
 
415
- ## Account Creation
418
+ ## Accounts and collaborators
419
+
420
+ Everything about who has access is managed from the [dashboard](https://dashboard.feedback.galadrim.ovh) — the widget no longer has an invitation menu.
421
+
422
+ - **Project collaborators**: open the project, then **Collaborators › Add**. Pick someone from the organization, or type a full email address to invite an outsider. Each collaborator gets a role (developer, manager, client).
423
+ - **Organization members**: **Members › Add a member**, with an organization role (owner, member, guest). An owner sees every project of the organization; the others only see the projects they collaborate on.
424
+ - **Invitations**: an address with no account receives an email. An invitation to a project points at the project's staging URL, where the widget carries the sign-up form; an invitation to an organization points at the dashboard. In both cases the account is created at that moment, and the person joins on sign-up.
416
425
 
417
- Once it's installed, you can sign up and then in the Galadmin, you add yourself as a collaborator on the project
426
+ The dashboard and the widget share the same account the credentials are the same on both sides.
418
427
 
419
428
  ## Galadrim Feedback MCP Server
420
429
 
@@ -424,7 +433,7 @@ A Model Context Protocol (MCP) server for the Galadrim feedback system. This ser
424
433
 
425
434
  To add this MCP server to Cursor, you need to configure it in your Cursor settings.
426
435
 
427
- Click on the MCP Icon in the Galadrim Feedback Sidebar to get the MCP Payload
436
+ Open the widget's **settings**, section **MCP configuration**: clicking it generates a personal access token (`gfb_…`) and copies the whole payload to your clipboard. The token is shown once, can be revoked, and never expires — clicking again replaces the previous one.
428
437
 
429
438
  Add it to your Cursor MCP settings:
430
439
 
@@ -433,7 +442,11 @@ Add it to your Cursor MCP settings:
433
442
  "mcpServers": {
434
443
  "galadrim-feedback": {
435
444
  "command": "npx",
436
- "args": ["galadrim-feedback-mcp@latest", "--authToken", "my-jwt-token"]
445
+ "args": [
446
+ "galadrim-feedback-mcp@latest",
447
+ "--authToken",
448
+ "gfb_your-personal-access-token"
449
+ ]
437
450
  }
438
451
  }
439
452
  }
@@ -443,7 +456,11 @@ Add it to your Cursor MCP settings:
443
456
 
444
457
  #### `get_feedbacks`
445
458
 
446
- Fetches all feedbacks for a specific project from the Galadrim feedback backend API.
459
+ Fetches the feedbacks of a project. Filterable (`isResolved`, `since`, `limit`, `fields`) — a project can hold several hundred of them.
460
+
461
+ #### `get_feedbacks_summary`
462
+
463
+ Aggregated overview of a project's feedbacks: resolved / still open, breakdown by author, month and device, and the pages and components concentrating the most unresolved feedbacks. Cheaper than `get_feedbacks`, and the right first call.
447
464
 
448
465
  #### `mark_as_resolved`
449
466
 
@@ -457,6 +474,10 @@ Marks multiple feedbacks as resolved.
457
474
 
458
475
  Get all Trello lists for a specific project.
459
476
 
477
+ #### `get_trello_cards`
478
+
479
+ Get all Trello cards for a specific project.
480
+
460
481
  #### `get_trello_list_tickets`
461
482
 
462
483
  Get all tickets/cards from a specific Trello list.
@@ -465,6 +486,10 @@ Get all tickets/cards from a specific Trello list.
465
486
 
466
487
  Get all available statuses from a Notion database. This tool retrieves the status options (like "Backlog", "To do", "In Progress", etc.) that are configured in your Notion database.
467
488
 
489
+ #### `get_notion_tickets`
490
+
491
+ Get all tickets from a Notion database.
492
+
468
493
  #### `get_notion_status_tickets`
469
494
 
470
495
  Get all tickets from a Notion database with a specific status. This tool allows you to filter and retrieve tickets based on their current status.
@@ -475,10 +500,19 @@ Galadrim Feedback includes a CLI tool for easier setup and management.
475
500
 
476
501
  ### Available Commands
477
502
 
478
- #### `cursor-init`
503
+ #### `installation-prompt-to-clipboard`
479
504
 
480
505
  Automatically copies the installation prompt to clipboard.
481
506
 
482
507
  ```bash
483
- npx galadrim-feedback cursor-init --project-id=<project-id> --notion-database-id=<notion-database-id>
508
+ npx galadrim-feedback installation-prompt-to-clipboard --project-id=<project-id> --notion-database-id=<notion-database-id>
509
+ ```
510
+
511
+ #### `inject-git-sha`
512
+
513
+ Patches the built HTML files with the `<meta name="git-sha">` tag — see [Git SHA Setup](#git-sha-setup).
514
+
515
+ ```bash
516
+ npx galadrim-feedback inject-git-sha # auto-detects dist/, build/ or out/
517
+ npx galadrim-feedback inject-git-sha dist # or pass the output dir explicitly
484
518
  ```
package/bin/cli.js CHANGED
@@ -1,21 +1,27 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { spawn } from "child_process";
4
- import { existsSync, readdirSync, readFileSync, statSync, writeFileSync } from "fs";
5
- import { join } from "path";
6
- import { resolveGitSha } from "../resolveGitSha.cjs";
3
+ import { spawn } from 'child_process'
4
+ import {
5
+ existsSync,
6
+ readdirSync,
7
+ readFileSync,
8
+ statSync,
9
+ writeFileSync,
10
+ } from 'fs'
11
+ import { join } from 'path'
12
+ import { resolveGitSha } from '../resolveGitSha.cjs'
7
13
 
8
14
  const PROJECT_ID = process.argv
9
- .find((arg) => arg.startsWith("--project-id="))
10
- ?.split("=")[1]
11
- .trim();
15
+ .find((arg) => arg.startsWith('--project-id='))
16
+ ?.split('=')[1]
17
+ .trim()
12
18
 
13
19
  const NOTION_DATABASE_ID = process.argv
14
- .find((arg) => arg.startsWith("--notion-database-id="))
15
- ?.split("=")[1]
16
- .trim();
20
+ .find((arg) => arg.startsWith('--notion-database-id='))
21
+ ?.split('=')[1]
22
+ .trim()
17
23
 
18
- const CURSOR_PROMPT = `Install and configure Galadrim Feedback in this React project:
24
+ const INSTALLATION_PROMPT = `Install and configure Galadrim Feedback in this React project:
19
25
 
20
26
  1. Install dependencies:
21
27
  yarn add axios galadrim-feedback
@@ -150,9 +156,9 @@ Feedbacks automatically record the git commit SHA of the deployed app — no pro
150
156
  5. Verification:
151
157
  - Show all modified files
152
158
  - Confirm the navigation setup works with the detected router
153
- - List any manual steps needed (like getting projectId from admin) (see https://feedback.galadrim.ovh/admin)
159
+ - List any manual steps needed (like getting projectId from the dashboard) (see https://dashboard.feedback.galadrim.ovh)
154
160
 
155
- Be very specific about file paths and exact code to add. Show the complete import statements and component setup.`;
161
+ Be very specific about file paths and exact code to add. Show the complete import statements and component setup.`
156
162
 
157
163
  function showHelp() {
158
164
  console.log(`
@@ -162,7 +168,9 @@ Usage:
162
168
  npx galadrim-feedback <command> [--project-id=<project-id>] [--notion-database-id=<notion-database-id>]
163
169
 
164
170
  Commands:
165
- cursor-init Send the installation prompt directly to Cursor/VS Code
171
+ installation-prompt-to-clipboard
172
+ Copy the installation prompt to the clipboard, to paste
173
+ into the AI assistant of your editor
166
174
  inject-git-sha Inject the git commit SHA as <meta name="git-sha"> into
167
175
  built HTML files (run after your build, before deploying).
168
176
  Optional argument: output dir or HTML file (defaults to
@@ -170,177 +178,179 @@ Commands:
170
178
  help Show this help message
171
179
 
172
180
  Examples:
173
- npx galadrim-feedback cursor-init --project-id=<project-id> --notion-database-id=<notion-database-id>
181
+ npx galadrim-feedback installation-prompt-to-clipboard --project-id=<project-id> --notion-database-id=<notion-database-id>
174
182
  npx galadrim-feedback inject-git-sha
175
183
  npx galadrim-feedback inject-git-sha dist
176
184
  npx galadrim-feedback help
177
- `);
185
+ `)
178
186
  }
179
187
 
180
188
  function collectHtmlFiles(target) {
181
- if (statSync(target).isFile()) return [target];
182
- const found = [];
189
+ if (statSync(target).isFile()) return [target]
190
+ const found = []
183
191
  const walk = (dir) => {
184
192
  for (const entry of readdirSync(dir)) {
185
- if (entry === "node_modules" || entry.startsWith(".")) continue;
186
- const fullPath = join(dir, entry);
187
- if (statSync(fullPath).isDirectory()) walk(fullPath);
188
- else if (entry.endsWith(".html")) found.push(fullPath);
193
+ if (entry === 'node_modules' || entry.startsWith('.')) continue
194
+ const fullPath = join(dir, entry)
195
+ if (statSync(fullPath).isDirectory()) walk(fullPath)
196
+ else if (entry.endsWith('.html')) found.push(fullPath)
189
197
  }
190
- };
191
- walk(target);
192
- return found;
198
+ }
199
+ walk(target)
200
+ return found
193
201
  }
194
202
 
195
203
  function injectMetaTag(html, sha) {
196
- const meta = `<meta name="git-sha" content="${sha}">`;
197
- const existing = /<meta\s+name=["']git-sha["'][^>]*\/?>/i;
198
- if (existing.test(html)) return html.replace(existing, meta);
199
- if (/<\/head>/i.test(html)) return html.replace(/<\/head>/i, `${meta}</head>`);
200
- return null;
204
+ const meta = `<meta name="git-sha" content="${sha}">`
205
+ const existing = /<meta\s+name=["']git-sha["'][^>]*\/?>/i
206
+ if (existing.test(html)) return html.replace(existing, meta)
207
+ if (/<\/head>/i.test(html)) return html.replace(/<\/head>/i, `${meta}</head>`)
208
+ return null
201
209
  }
202
210
 
203
211
  function handleInjectGitSha(targetArg) {
204
- const sha = resolveGitSha();
212
+ const sha = resolveGitSha()
205
213
  if (!sha) {
206
214
  console.error(
207
- "❌ Could not resolve the git SHA (no CI env var and `git rev-parse HEAD` failed).",
208
- );
215
+ '❌ Could not resolve the git SHA (no CI env var and `git rev-parse HEAD` failed).',
216
+ )
209
217
  console.error(
210
- "💡 In Docker builds, pass it in: --build-arg GIT_SHA=$(git rev-parse HEAD)",
211
- );
212
- process.exit(1);
218
+ '💡 In Docker builds, pass it in: --build-arg GIT_SHA=$(git rev-parse HEAD)',
219
+ )
220
+ process.exit(1)
213
221
  }
214
222
 
215
223
  const target =
216
- targetArg || ["dist", "build", "out"].find((dir) => existsSync(dir));
224
+ targetArg || ['dist', 'build', 'out'].find((dir) => existsSync(dir))
217
225
  if (!target || !existsSync(target)) {
218
226
  console.error(
219
- "❌ No build output found (tried dist/, build/, out/). Pass a path: npx galadrim-feedback inject-git-sha <dir-or-file>",
220
- );
221
- process.exit(1);
227
+ '❌ No build output found (tried dist/, build/, out/). Pass a path: npx galadrim-feedback inject-git-sha <dir-or-file>',
228
+ )
229
+ process.exit(1)
222
230
  }
223
231
 
224
- const htmlFiles = collectHtmlFiles(target);
225
- let patched = 0;
232
+ const htmlFiles = collectHtmlFiles(target)
233
+ let patched = 0
226
234
  for (const file of htmlFiles) {
227
- const html = readFileSync(file, "utf8");
228
- const updated = injectMetaTag(html, sha);
235
+ const html = readFileSync(file, 'utf8')
236
+ const updated = injectMetaTag(html, sha)
229
237
  if (updated && updated !== html) {
230
- writeFileSync(file, updated);
231
- patched++;
238
+ writeFileSync(file, updated)
239
+ patched++
232
240
  }
233
241
  }
234
242
 
235
243
  if (patched === 0) {
236
- console.error(`❌ No HTML file with a </head> tag found under "${target}".`);
237
- process.exit(1);
244
+ console.error(`❌ No HTML file with a </head> tag found under "${target}".`)
245
+ process.exit(1)
238
246
  }
239
247
  console.log(
240
- `✅ Injected git-sha ${sha.slice(0, 7)} into ${patched} HTML file(s) under "${target}"`,
241
- );
248
+ `✅ Injected git-sha ${sha.slice(
249
+ 0,
250
+ 7,
251
+ )} into ${patched} HTML file(s) under "${target}"`,
252
+ )
242
253
  }
243
254
 
244
255
  function copyToClipboard(text) {
245
256
  return new Promise((resolve, reject) => {
246
- let copyCommand;
257
+ let copyCommand
247
258
 
248
259
  // Detect platform and use appropriate command
249
- if (process.platform === "darwin") {
250
- copyCommand = spawn("pbcopy", [], {
251
- stdio: ["pipe", "inherit", "inherit"],
252
- });
253
- } else if (process.platform === "linux") {
254
- copyCommand = spawn("xclip", ["-selection", "clipboard"], {
255
- stdio: ["pipe", "inherit", "inherit"],
256
- });
257
- } else if (process.platform === "win32") {
258
- copyCommand = spawn("clip", [], {
259
- stdio: ["pipe", "inherit", "inherit"],
260
- });
260
+ if (process.platform === 'darwin') {
261
+ copyCommand = spawn('pbcopy', [], {
262
+ stdio: ['pipe', 'inherit', 'inherit'],
263
+ })
264
+ } else if (process.platform === 'linux') {
265
+ copyCommand = spawn('xclip', ['-selection', 'clipboard'], {
266
+ stdio: ['pipe', 'inherit', 'inherit'],
267
+ })
268
+ } else if (process.platform === 'win32') {
269
+ copyCommand = spawn('clip', [], {
270
+ stdio: ['pipe', 'inherit', 'inherit'],
271
+ })
261
272
  } else {
262
- reject(new Error("Unsupported platform for clipboard operations"));
263
- return;
273
+ reject(new Error('Unsupported platform for clipboard operations'))
274
+ return
264
275
  }
265
276
 
266
- copyCommand.stdin.write(text);
267
- copyCommand.stdin.end();
277
+ copyCommand.stdin.write(text)
278
+ copyCommand.stdin.end()
268
279
 
269
- copyCommand.on("close", (code) => {
280
+ copyCommand.on('close', (code) => {
270
281
  if (code === 0) {
271
- resolve();
282
+ resolve()
272
283
  } else {
273
- reject(new Error(`Copy command failed with code ${code}`));
284
+ reject(new Error(`Copy command failed with code ${code}`))
274
285
  }
275
- });
286
+ })
276
287
 
277
- copyCommand.on("error", (err) => {
278
- reject(err);
279
- });
280
- });
288
+ copyCommand.on('error', (err) => {
289
+ reject(err)
290
+ })
291
+ })
281
292
  }
282
293
 
283
- async function handleCursorInit() {
294
+ async function handleInstallationPrompt() {
284
295
  try {
285
- // Fallback to clipboard
286
296
  console.log(
287
- "📋 Copying Galadrim Feedback installation prompt to clipboard..."
288
- );
297
+ '📋 Copying Galadrim Feedback installation prompt to clipboard...',
298
+ )
289
299
 
290
- await copyToClipboard(CURSOR_PROMPT);
300
+ await copyToClipboard(INSTALLATION_PROMPT)
291
301
 
292
- console.log("✅ Installation prompt copied to clipboard!");
293
- console.log("");
294
- console.log("🎯 Next steps:");
295
- console.log("1. Open Cursor or VS Code in your React project");
296
- console.log("2. Paste the prompt (Cmd+V / Ctrl+V) into the AI chat");
302
+ console.log('✅ Installation prompt copied to clipboard!')
303
+ console.log('')
304
+ console.log('🎯 Next steps:')
305
+ console.log('1. Open Cursor or VS Code in your React project')
306
+ console.log('2. Paste the prompt (Cmd+V / Ctrl+V) into the AI chat')
297
307
  console.log(
298
- "3. Let your AI assistant automatically configure Galadrim Feedback!"
299
- );
300
- console.log("");
308
+ '3. Let your AI assistant automatically configure Galadrim Feedback!',
309
+ )
310
+ console.log('')
301
311
  console.log(
302
- '💡 Make sure to replace "your-project-id" with your actual project ID from Galadmin.'
303
- );
312
+ '💡 The project ID is copied from the dashboard (https://dashboard.feedback.galadrim.ovh), on the project row or its page.',
313
+ )
304
314
  } catch (error) {
305
- console.error("❌ Failed to copy to clipboard:", error.message);
306
- console.log("");
307
- console.log("📝 Manual copy - use this prompt in your AI assistant:");
308
- console.log("");
309
- console.log("```");
310
- console.log(CURSOR_PROMPT);
311
- console.log("```");
312
- process.exit(1);
315
+ console.error('❌ Failed to copy to clipboard:', error.message)
316
+ console.log('')
317
+ console.log('📝 Manual copy - use this prompt in your AI assistant:')
318
+ console.log('')
319
+ console.log('```')
320
+ console.log(INSTALLATION_PROMPT)
321
+ console.log('```')
322
+ process.exit(1)
313
323
  }
314
324
  }
315
325
 
316
326
  function main() {
317
- const args = process.argv.slice(2);
318
- const command = args[0];
327
+ const args = process.argv.slice(2)
328
+ const command = args[0]
319
329
 
320
330
  switch (command) {
321
- case "cursor-init":
322
- handleCursorInit();
323
- break;
324
- case "inject-git-sha":
325
- handleInjectGitSha(args[1]);
326
- break;
327
- case "help":
328
- case "--help":
329
- case "-h":
330
- showHelp();
331
- break;
331
+ case 'installation-prompt-to-clipboard':
332
+ handleInstallationPrompt()
333
+ break
334
+ case 'inject-git-sha':
335
+ handleInjectGitSha(args[1])
336
+ break
337
+ case 'help':
338
+ case '--help':
339
+ case '-h':
340
+ showHelp()
341
+ break
332
342
  case undefined:
333
343
  console.log(
334
- '❌ No command specified. Use "help" to see available commands.'
335
- );
336
- showHelp();
337
- process.exit(1);
338
- break;
344
+ '❌ No command specified. Use "help" to see available commands.',
345
+ )
346
+ showHelp()
347
+ process.exit(1)
348
+ break
339
349
  default:
340
- console.log(`❌ Unknown command: ${command}`);
341
- showHelp();
342
- process.exit(1);
350
+ console.log(`❌ Unknown command: ${command}`)
351
+ showHelp()
352
+ process.exit(1)
343
353
  }
344
354
  }
345
355
 
346
- main();
356
+ main()
package/declaration.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- declare module "*.svg" {
2
- const content: string;
3
- export default content;
1
+ declare module '*.svg' {
2
+ const content: string
3
+ export default content
4
4
  }
5
5
 
6
- declare module "*.css" {
7
- const classes: { [key: string]: string };
8
- export default classes;
6
+ declare module '*.css' {
7
+ const classes: { [key: string]: string }
8
+ export default classes
9
9
  }