@shepai/cli 1.122.0 → 1.122.1-pr373.cb974c2

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 (362) hide show
  1. package/dist/src/presentation/web/app/actions/execute-query.d.ts +7 -0
  2. package/dist/src/presentation/web/app/actions/execute-query.d.ts.map +1 -0
  3. package/dist/src/presentation/web/app/actions/execute-query.js +55 -0
  4. package/dist/src/presentation/web/app/actions/get-table-rows.d.ts +10 -0
  5. package/dist/src/presentation/web/app/actions/get-table-rows.d.ts.map +1 -0
  6. package/dist/src/presentation/web/app/actions/get-table-rows.js +55 -0
  7. package/dist/src/presentation/web/app/actions/get-table-schema.d.ts +13 -0
  8. package/dist/src/presentation/web/app/actions/get-table-schema.d.ts.map +1 -0
  9. package/dist/src/presentation/web/app/actions/get-table-schema.js +27 -0
  10. package/dist/src/presentation/web/app/actions/list-tables.d.ts +10 -0
  11. package/dist/src/presentation/web/app/actions/list-tables.d.ts.map +1 -0
  12. package/dist/src/presentation/web/app/actions/list-tables.js +19 -0
  13. package/dist/src/presentation/web/app/database/page.d.ts +4 -0
  14. package/dist/src/presentation/web/app/database/page.d.ts.map +1 -0
  15. package/dist/src/presentation/web/app/database/page.js +15 -0
  16. package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.d.ts.map +1 -1
  17. package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.js +4 -0
  18. package/dist/src/presentation/web/components/features/control-center/use-control-center-state.d.ts.map +1 -1
  19. package/dist/src/presentation/web/components/features/control-center/use-control-center-state.js +6 -2
  20. package/dist/src/presentation/web/components/features/database/cell-value-dialog.d.ts +8 -0
  21. package/dist/src/presentation/web/components/features/database/cell-value-dialog.d.ts.map +1 -0
  22. package/dist/src/presentation/web/components/features/database/cell-value-dialog.js +7 -0
  23. package/dist/src/presentation/web/components/features/database/cell-value-dialog.stories.d.ts +10 -0
  24. package/dist/src/presentation/web/components/features/database/cell-value-dialog.stories.d.ts.map +1 -0
  25. package/dist/src/presentation/web/components/features/database/cell-value-dialog.stories.js +48 -0
  26. package/dist/src/presentation/web/components/features/database/database-page-client.d.ts +13 -0
  27. package/dist/src/presentation/web/components/features/database/database-page-client.d.ts.map +1 -0
  28. package/dist/src/presentation/web/components/features/database/database-page-client.js +74 -0
  29. package/dist/src/presentation/web/components/features/database/database-page-client.stories.d.ts +9 -0
  30. package/dist/src/presentation/web/components/features/database/database-page-client.stories.d.ts.map +1 -0
  31. package/dist/src/presentation/web/components/features/database/database-page-client.stories.js +78 -0
  32. package/dist/src/presentation/web/components/features/database/query-runner.d.ts +9 -0
  33. package/dist/src/presentation/web/components/features/database/query-runner.d.ts.map +1 -0
  34. package/dist/src/presentation/web/components/features/database/query-runner.js +53 -0
  35. package/dist/src/presentation/web/components/features/database/query-runner.stories.d.ts +9 -0
  36. package/dist/src/presentation/web/components/features/database/query-runner.stories.d.ts.map +1 -0
  37. package/dist/src/presentation/web/components/features/database/query-runner.stories.js +55 -0
  38. package/dist/src/presentation/web/components/features/database/row-browser.d.ts +11 -0
  39. package/dist/src/presentation/web/components/features/database/row-browser.d.ts.map +1 -0
  40. package/dist/src/presentation/web/components/features/database/row-browser.js +42 -0
  41. package/dist/src/presentation/web/components/features/database/row-browser.stories.d.ts +14 -0
  42. package/dist/src/presentation/web/components/features/database/row-browser.stories.d.ts.map +1 -0
  43. package/dist/src/presentation/web/components/features/database/row-browser.stories.js +120 -0
  44. package/dist/src/presentation/web/components/features/database/schema-viewer.d.ts +7 -0
  45. package/dist/src/presentation/web/components/features/database/schema-viewer.d.ts.map +1 -0
  46. package/dist/src/presentation/web/components/features/database/schema-viewer.js +14 -0
  47. package/dist/src/presentation/web/components/features/database/schema-viewer.stories.d.ts +11 -0
  48. package/dist/src/presentation/web/components/features/database/schema-viewer.stories.d.ts.map +1 -0
  49. package/dist/src/presentation/web/components/features/database/schema-viewer.stories.js +67 -0
  50. package/dist/src/presentation/web/components/features/database/table-list.d.ts +8 -0
  51. package/dist/src/presentation/web/components/features/database/table-list.d.ts.map +1 -0
  52. package/dist/src/presentation/web/components/features/database/table-list.js +19 -0
  53. package/dist/src/presentation/web/components/features/database/table-list.stories.d.ts +10 -0
  54. package/dist/src/presentation/web/components/features/database/table-list.stories.d.ts.map +1 -0
  55. package/dist/src/presentation/web/components/features/database/table-list.stories.js +66 -0
  56. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.d.ts.map +1 -1
  57. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.js +2 -2
  58. package/dist/src/presentation/web/components/ui/table.d.ts +11 -0
  59. package/dist/src/presentation/web/components/ui/table.d.ts.map +1 -0
  60. package/dist/src/presentation/web/components/ui/table.js +28 -0
  61. package/dist/src/presentation/web/lib/server-container.d.ts +1 -2
  62. package/dist/src/presentation/web/lib/server-container.d.ts.map +1 -1
  63. package/dist/src/presentation/web/lib/server-db.d.ts +16 -0
  64. package/dist/src/presentation/web/lib/server-db.d.ts.map +1 -0
  65. package/dist/src/presentation/web/lib/server-db.js +10 -0
  66. package/dist/src/presentation/web/lib/sql-validation.d.ts +7 -0
  67. package/dist/src/presentation/web/lib/sql-validation.d.ts.map +1 -0
  68. package/dist/src/presentation/web/lib/sql-validation.js +17 -0
  69. package/dist/tsconfig.build.tsbuildinfo +1 -1
  70. package/package.json +1 -1
  71. package/web/.next/BUILD_ID +1 -1
  72. package/web/.next/app-path-routes-manifest.json +1 -0
  73. package/web/.next/build-manifest.json +6 -6
  74. package/web/.next/fallback-build-manifest.json +2 -2
  75. package/web/.next/prerender-manifest.json +3 -3
  76. package/web/.next/required-server-files.js +3 -3
  77. package/web/.next/required-server-files.json +3 -3
  78. package/web/.next/routes-manifest.json +6 -0
  79. package/web/.next/server/app/(dashboard)/@drawer/create/page/build-manifest.json +4 -4
  80. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +22 -22
  81. package/web/.next/server/app/(dashboard)/@drawer/create/page.js +1 -1
  82. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  83. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  84. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/build-manifest.json +4 -4
  85. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +28 -28
  86. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +1 -1
  87. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  88. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  89. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/build-manifest.json +4 -4
  90. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +28 -28
  91. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +1 -1
  92. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  93. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  94. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/build-manifest.json +4 -4
  95. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +20 -20
  96. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +1 -1
  97. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  98. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  99. package/web/.next/server/app/(dashboard)/create/page/build-manifest.json +4 -4
  100. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +22 -22
  101. package/web/.next/server/app/(dashboard)/create/page.js +1 -1
  102. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  103. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  104. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/build-manifest.json +4 -4
  105. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +28 -28
  106. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js +1 -1
  107. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  108. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  109. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/build-manifest.json +4 -4
  110. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +28 -28
  111. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +1 -1
  112. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  113. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  114. package/web/.next/server/app/(dashboard)/page/build-manifest.json +4 -4
  115. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +20 -20
  116. package/web/.next/server/app/(dashboard)/page.js +1 -1
  117. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  118. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  119. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/build-manifest.json +4 -4
  120. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +20 -20
  121. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +1 -1
  122. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  123. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  124. package/web/.next/server/app/_global-error/page/build-manifest.json +4 -4
  125. package/web/.next/server/app/_global-error.html +2 -2
  126. package/web/.next/server/app/_global-error.rsc +1 -1
  127. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  128. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  129. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  130. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  131. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  132. package/web/.next/server/app/_not-found/page/build-manifest.json +4 -4
  133. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  134. package/web/.next/server/app/_not-found/page.js +1 -1
  135. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  136. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  137. package/web/.next/server/app/api/attachments/preview/route.js +1 -1
  138. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
  139. package/web/.next/server/app/api/evidence/route.js +1 -1
  140. package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
  141. package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
  142. package/web/.next/server/app/database/page/app-paths-manifest.json +3 -0
  143. package/web/.next/server/app/database/page/build-manifest.json +18 -0
  144. package/web/.next/server/app/database/page/next-font-manifest.json +6 -0
  145. package/web/.next/server/app/database/page/react-loadable-manifest.json +1 -0
  146. package/web/.next/server/app/database/page/server-reference-manifest.json +80 -0
  147. package/web/.next/server/app/database/page.js +16 -0
  148. package/web/.next/server/app/database/page.js.map +5 -0
  149. package/web/.next/server/app/database/page.js.nft.json +1 -0
  150. package/web/.next/server/app/database/page_client-reference-manifest.js +2 -0
  151. package/web/.next/server/app/settings/page/build-manifest.json +4 -4
  152. package/web/.next/server/app/settings/page/server-reference-manifest.json +6 -6
  153. package/web/.next/server/app/settings/page.js +1 -1
  154. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  155. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  156. package/web/.next/server/app/skills/page/build-manifest.json +4 -4
  157. package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
  158. package/web/.next/server/app/skills/page.js +1 -1
  159. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  160. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  161. package/web/.next/server/app/tools/page/build-manifest.json +4 -4
  162. package/web/.next/server/app/tools/page/server-reference-manifest.json +6 -6
  163. package/web/.next/server/app/tools/page.js +1 -1
  164. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  165. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  166. package/web/.next/server/app/version/page/build-manifest.json +4 -4
  167. package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
  168. package/web/.next/server/app/version/page.js +2 -2
  169. package/web/.next/server/app/version/page.js.nft.json +1 -1
  170. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  171. package/web/.next/server/app-paths-manifest.json +1 -0
  172. package/web/.next/server/chunks/[root-of-the-server]__0866d2b5._.js.map +1 -1
  173. package/web/.next/server/chunks/[root-of-the-server]__42b7ab55._.js.map +1 -1
  174. package/web/.next/server/chunks/{[root-of-the-server]__53013576._.js → [root-of-the-server]__7d63f9a4._.js} +2 -2
  175. package/web/.next/server/chunks/[root-of-the-server]__9191749c._.js.map +1 -1
  176. package/web/.next/server/chunks/[root-of-the-server]__9a136c79._.js.map +1 -1
  177. package/web/.next/server/chunks/{[root-of-the-server]__92078db6._.js → [root-of-the-server]__a1c7c02a._.js} +2 -2
  178. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  179. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js.map +1 -1
  180. package/web/.next/server/chunks/[root-of-the-server]__a5879003._.js.map +1 -1
  181. package/web/.next/server/chunks/[root-of-the-server]__b2f9a412._.js.map +1 -1
  182. package/web/.next/server/chunks/[root-of-the-server]__b4102cc7._.js.map +1 -1
  183. package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js.map +1 -1
  184. package/web/.next/server/chunks/[root-of-the-server]__d2c18946._.js.map +1 -1
  185. package/web/.next/server/chunks/[root-of-the-server]__d8037e14._.js.map +1 -1
  186. package/web/.next/server/chunks/[root-of-the-server]__d9d410a8._.js.map +1 -1
  187. package/web/.next/server/chunks/[root-of-the-server]__e247a485._.js.map +1 -1
  188. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  189. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  190. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_f30d0343.js +1 -1
  191. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_f30d0343.js.map +1 -1
  192. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_9f1775bb.js +1 -1
  193. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_9f1775bb.js.map +1 -1
  194. package/web/.next/server/chunks/ssr/{[root-of-the-server]__06fef644._.js → [root-of-the-server]__07a39ff2._.js} +2 -2
  195. package/web/.next/server/chunks/ssr/[root-of-the-server]__07a39ff2._.js.map +1 -0
  196. package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js +4 -0
  197. package/web/.next/server/chunks/ssr/{[root-of-the-server]__6b17a22d._.js.map → [root-of-the-server]__11033878._.js.map} +1 -1
  198. package/web/.next/server/chunks/ssr/[root-of-the-server]__1a0bbce4._.js +3 -0
  199. package/web/.next/server/chunks/ssr/[root-of-the-server]__1a0bbce4._.js.map +1 -0
  200. package/web/.next/server/chunks/ssr/[root-of-the-server]__2698e9f4._.js +1 -1
  201. package/web/.next/server/chunks/ssr/[root-of-the-server]__2698e9f4._.js.map +1 -1
  202. package/web/.next/server/chunks/ssr/[root-of-the-server]__33cee851._.js +3 -0
  203. package/web/.next/server/chunks/ssr/[root-of-the-server]__33cee851._.js.map +1 -0
  204. package/web/.next/server/chunks/ssr/[root-of-the-server]__4bb4b155._.js +4 -0
  205. package/web/.next/server/chunks/ssr/[root-of-the-server]__4bb4b155._.js.map +1 -0
  206. package/web/.next/server/chunks/ssr/[root-of-the-server]__590dfc34._.js +4 -0
  207. package/web/.next/server/chunks/ssr/[root-of-the-server]__590dfc34._.js.map +1 -0
  208. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js +2 -2
  209. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js.map +1 -1
  210. package/web/.next/server/chunks/ssr/[root-of-the-server]__743e777a._.js +4 -0
  211. package/web/.next/server/chunks/ssr/[root-of-the-server]__743e777a._.js.map +1 -0
  212. package/web/.next/server/chunks/ssr/[root-of-the-server]__7a939e4e._.js +4 -0
  213. package/web/.next/server/chunks/ssr/{[root-of-the-server]__a022445f._.js.map → [root-of-the-server]__7a939e4e._.js.map} +1 -1
  214. package/web/.next/server/chunks/ssr/[root-of-the-server]__8e3bf5d7._.js +1 -1
  215. package/web/.next/server/chunks/ssr/[root-of-the-server]__8e3bf5d7._.js.map +1 -1
  216. package/web/.next/server/chunks/ssr/[root-of-the-server]__930c8634._.js +3 -0
  217. package/web/.next/server/chunks/ssr/[root-of-the-server]__930c8634._.js.map +1 -0
  218. package/web/.next/server/chunks/ssr/[root-of-the-server]__b724df9e._.js.map +1 -1
  219. package/web/.next/server/chunks/ssr/[root-of-the-server]__c07f9f79._.js +1 -1
  220. package/web/.next/server/chunks/ssr/[root-of-the-server]__c07f9f79._.js.map +1 -1
  221. package/web/.next/server/chunks/ssr/[root-of-the-server]__c605a375._.js +1 -1
  222. package/web/.next/server/chunks/ssr/[root-of-the-server]__c605a375._.js.map +1 -1
  223. package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js +4 -0
  224. package/web/.next/server/chunks/ssr/{[root-of-the-server]__804c006d._.js.map → [root-of-the-server]__fdc75809._.js.map} +1 -1
  225. package/web/.next/server/chunks/ssr/_05ca281a._.js +3 -0
  226. package/web/.next/server/chunks/ssr/_05ca281a._.js.map +1 -0
  227. package/web/.next/server/chunks/ssr/_061c1da2._.js +3 -0
  228. package/web/.next/server/chunks/ssr/_061c1da2._.js.map +1 -0
  229. package/web/.next/server/chunks/ssr/_0e6034fc._.js +3 -0
  230. package/web/.next/server/chunks/ssr/_0e6034fc._.js.map +1 -0
  231. package/web/.next/server/chunks/ssr/_150e66ba._.js +3 -0
  232. package/web/.next/server/chunks/ssr/_150e66ba._.js.map +1 -0
  233. package/web/.next/server/chunks/ssr/_2f6f48b8._.js +1 -1
  234. package/web/.next/server/chunks/ssr/_2f6f48b8._.js.map +1 -1
  235. package/web/.next/server/chunks/ssr/_34ba40e0._.js +3 -0
  236. package/web/.next/server/chunks/ssr/_34ba40e0._.js.map +1 -0
  237. package/web/.next/server/chunks/ssr/_5b809cd2._.js +4 -0
  238. package/web/.next/server/chunks/ssr/_5b809cd2._.js.map +1 -0
  239. package/web/.next/server/chunks/ssr/{_9f1ab4ee._.js → _5d618f84._.js} +2 -2
  240. package/web/.next/server/chunks/ssr/{_9f1ab4ee._.js.map → _5d618f84._.js.map} +1 -1
  241. package/web/.next/server/chunks/ssr/_6552e0aa._.js +3 -0
  242. package/web/.next/server/chunks/ssr/_6552e0aa._.js.map +1 -0
  243. package/web/.next/server/chunks/ssr/_81f88d15._.js +7 -0
  244. package/web/.next/server/chunks/ssr/_81f88d15._.js.map +1 -0
  245. package/web/.next/server/chunks/ssr/_93d2a00c._.js +3 -0
  246. package/web/.next/server/chunks/ssr/_93d2a00c._.js.map +1 -0
  247. package/web/.next/server/chunks/ssr/_a37f5f18._.js +1 -1
  248. package/web/.next/server/chunks/ssr/_ad5819d0._.js +3 -0
  249. package/web/.next/server/chunks/ssr/_ad5819d0._.js.map +1 -0
  250. package/web/.next/server/chunks/ssr/{_f1a649e3._.js → _d506bca5._.js} +2 -2
  251. package/web/.next/server/chunks/ssr/{_f1a649e3._.js.map → _d506bca5._.js.map} +1 -1
  252. package/web/.next/server/chunks/ssr/_e1854141._.js +3 -0
  253. package/web/.next/server/chunks/ssr/_e1854141._.js.map +1 -0
  254. package/web/.next/server/chunks/ssr/_f9959908._.js +3 -0
  255. package/web/.next/server/chunks/ssr/_f9959908._.js.map +1 -0
  256. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_database_database-page-client_tsx_b853607a._.js +3 -0
  257. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_database_database-page-client_tsx_b853607a._.js.map +1 -0
  258. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  259. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  260. package/web/.next/server/chunks/ssr/node_modules__pnpm_026172d1._.js +3 -0
  261. package/web/.next/server/chunks/ssr/node_modules__pnpm_026172d1._.js.map +1 -0
  262. package/web/.next/server/chunks/ssr/node_modules__pnpm_8b0ea744._.js +3 -0
  263. package/web/.next/server/chunks/ssr/node_modules__pnpm_8b0ea744._.js.map +1 -0
  264. package/web/.next/server/chunks/ssr/src_presentation_web_5f039db1._.js +2 -2
  265. package/web/.next/server/chunks/ssr/src_presentation_web_5f039db1._.js.map +1 -1
  266. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_2a52b697.js +1 -1
  267. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_2a52b697.js.map +1 -1
  268. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js +1 -1
  269. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js.map +1 -1
  270. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js +1 -1
  271. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js.map +1 -1
  272. package/web/.next/server/chunks/ssr/src_presentation_web_c4337169._.js +2 -2
  273. package/web/.next/server/chunks/ssr/src_presentation_web_c4337169._.js.map +1 -1
  274. package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js +1 -1
  275. package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js +1 -1
  276. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
  277. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js.map +1 -1
  278. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  279. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  280. package/web/.next/server/chunks/ssr/src_presentation_web_components_ui_scroll-area_tsx_53ae5be7._.js +3 -0
  281. package/web/.next/server/chunks/ssr/src_presentation_web_components_ui_scroll-area_tsx_53ae5be7._.js.map +1 -0
  282. package/web/.next/server/middleware-build-manifest.js +4 -4
  283. package/web/.next/server/pages/500.html +2 -2
  284. package/web/.next/server/server-reference-manifest.js +1 -1
  285. package/web/.next/server/server-reference-manifest.json +101 -34
  286. package/web/.next/static/chunks/0b8f2e223e1b82f4.js +1 -0
  287. package/web/.next/static/chunks/0e57fc72bf0bc5ba.js +1 -0
  288. package/web/.next/static/chunks/22a1d0eb174f3da9.js +1 -0
  289. package/web/.next/static/chunks/401118947e7159e0.js +1 -0
  290. package/web/.next/static/chunks/40b6bcf1a2de4a0f.js +1 -0
  291. package/web/.next/static/chunks/471c323a18da4918.js +1 -0
  292. package/web/.next/static/chunks/495b4bee62b00caa.js +1 -0
  293. package/web/.next/static/chunks/5aab343372a98721.js +1 -0
  294. package/web/.next/static/chunks/70e04b1108d151c3.js +11 -0
  295. package/web/.next/static/chunks/{9c2f294bf748b4ba.js → 899529af3e08bf94.js} +2 -2
  296. package/web/.next/static/chunks/{9076710a2df38d14.js → 96fc208419afac9e.js} +1 -1
  297. package/web/.next/static/chunks/b3914c0aae76742b.css +1 -0
  298. package/web/.next/static/chunks/b4160eaf4deda4e7.js +1 -0
  299. package/web/.next/static/chunks/b65702b701417ae2.js +1 -0
  300. package/web/.next/static/chunks/c2c0d4e71c36199f.js +1 -0
  301. package/web/.next/static/chunks/c7e793951b20a67f.js +1 -0
  302. package/web/.next/static/chunks/cb440c7f33e135f4.js +1 -0
  303. package/web/.next/static/chunks/{0dfc3b1cff4bdcc2.js → cb46d75dfac954a5.js} +2 -2
  304. package/web/.next/static/chunks/dd702ceaee4a5c0d.js +1 -0
  305. package/web/.next/static/chunks/e6b8baa05827f641.js +1 -0
  306. package/web/.next/static/chunks/{turbopack-426d9bc2450816ba.js → turbopack-b1685b5f87ad1d60.js} +1 -1
  307. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_d0119342._.js +0 -3
  308. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_d0119342._.js.map +0 -1
  309. package/web/.next/server/chunks/ssr/[root-of-the-server]__06fef644._.js.map +0 -1
  310. package/web/.next/server/chunks/ssr/[root-of-the-server]__545792ab._.js +0 -3
  311. package/web/.next/server/chunks/ssr/[root-of-the-server]__545792ab._.js.map +0 -1
  312. package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js +0 -4
  313. package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js +0 -4
  314. package/web/.next/server/chunks/ssr/[root-of-the-server]__8c553503._.js +0 -4
  315. package/web/.next/server/chunks/ssr/[root-of-the-server]__8c553503._.js.map +0 -1
  316. package/web/.next/server/chunks/ssr/[root-of-the-server]__9f155c0e._.js +0 -3
  317. package/web/.next/server/chunks/ssr/[root-of-the-server]__9f155c0e._.js.map +0 -1
  318. package/web/.next/server/chunks/ssr/[root-of-the-server]__a022445f._.js +0 -4
  319. package/web/.next/server/chunks/ssr/[root-of-the-server]__a7de2711._.js +0 -4
  320. package/web/.next/server/chunks/ssr/[root-of-the-server]__a7de2711._.js.map +0 -1
  321. package/web/.next/server/chunks/ssr/_0dc2cfd3._.js +0 -3
  322. package/web/.next/server/chunks/ssr/_0dc2cfd3._.js.map +0 -1
  323. package/web/.next/server/chunks/ssr/_0e506641._.js +0 -7
  324. package/web/.next/server/chunks/ssr/_0e506641._.js.map +0 -1
  325. package/web/.next/server/chunks/ssr/_135edb9c._.js +0 -3
  326. package/web/.next/server/chunks/ssr/_135edb9c._.js.map +0 -1
  327. package/web/.next/server/chunks/ssr/_1bb131c4._.js +0 -3
  328. package/web/.next/server/chunks/ssr/_1bb131c4._.js.map +0 -1
  329. package/web/.next/server/chunks/ssr/_6d26a08f._.js +0 -3
  330. package/web/.next/server/chunks/ssr/_6d26a08f._.js.map +0 -1
  331. package/web/.next/server/chunks/ssr/_6e403a1e._.js +0 -3
  332. package/web/.next/server/chunks/ssr/_6e403a1e._.js.map +0 -1
  333. package/web/.next/server/chunks/ssr/_75f4ccb3._.js +0 -3
  334. package/web/.next/server/chunks/ssr/_75f4ccb3._.js.map +0 -1
  335. package/web/.next/server/chunks/ssr/_b5fc318a._.js +0 -3
  336. package/web/.next/server/chunks/ssr/_b5fc318a._.js.map +0 -1
  337. package/web/.next/server/chunks/ssr/_cc77a143._.js +0 -3
  338. package/web/.next/server/chunks/ssr/_cc77a143._.js.map +0 -1
  339. package/web/.next/server/chunks/ssr/_fffd4212._.js +0 -3
  340. package/web/.next/server/chunks/ssr/_fffd4212._.js.map +0 -1
  341. package/web/.next/server/chunks/ssr/node_modules__pnpm_b59e4b16._.js +0 -3
  342. package/web/.next/server/chunks/ssr/node_modules__pnpm_b59e4b16._.js.map +0 -1
  343. package/web/.next/static/chunks/0d2af96e64960ef5.css +0 -1
  344. package/web/.next/static/chunks/1c206da59596f056.js +0 -1
  345. package/web/.next/static/chunks/2429cf8757ddad34.js +0 -1
  346. package/web/.next/static/chunks/303a1217006489b9.js +0 -1
  347. package/web/.next/static/chunks/39dc15636654a1e3.js +0 -1
  348. package/web/.next/static/chunks/3e9320301a0cac8b.js +0 -1
  349. package/web/.next/static/chunks/447e720f6cf54767.js +0 -1
  350. package/web/.next/static/chunks/4562ee849ea13c3a.js +0 -1
  351. package/web/.next/static/chunks/53e9eda219a7f61c.js +0 -1
  352. package/web/.next/static/chunks/7bc5806d9f82cc79.js +0 -11
  353. package/web/.next/static/chunks/845d8e58a91014e6.js +0 -1
  354. package/web/.next/static/chunks/84a181ff3270fd9f.js +0 -1
  355. package/web/.next/static/chunks/96eeeb28e06de78c.js +0 -1
  356. package/web/.next/static/chunks/e2ef95d904c360f3.js +0 -1
  357. package/web/.next/static/chunks/ed3a602003bcb31b.js +0 -1
  358. /package/web/.next/server/chunks/{[root-of-the-server]__53013576._.js.map → [root-of-the-server]__7d63f9a4._.js.map} +0 -0
  359. /package/web/.next/server/chunks/{[root-of-the-server]__92078db6._.js.map → [root-of-the-server]__a1c7c02a._.js.map} +0 -0
  360. /package/web/.next/static/{t8J3jMT2l7HfCuusAPC-b → 4xrMEp5YYiIKE3f9RD6L-}/_buildManifest.js +0 -0
  361. /package/web/.next/static/{t8J3jMT2l7HfCuusAPC-b → 4xrMEp5YYiIKE3f9RD6L-}/_clientMiddlewareManifest.json +0 -0
  362. /package/web/.next/static/{t8J3jMT2l7HfCuusAPC-b → 4xrMEp5YYiIKE3f9RD6L-}/_ssgManifest.js +0 -0
@@ -0,0 +1,7 @@
1
+ export interface ExecuteQueryResult {
2
+ columns?: string[];
3
+ rows?: Record<string, unknown>[];
4
+ error?: string;
5
+ }
6
+ export declare function executeQuery(sql: string): Promise<ExecuteQueryResult>;
7
+ //# sourceMappingURL=execute-query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execute-query.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/execute-query.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAiCD,wBAAsB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAgC3E"}
@@ -0,0 +1,55 @@
1
+ 'use server';
2
+ import { getDb } from '../../lib/server-db.js';
3
+ /**
4
+ * Regex pattern to detect write/destructive SQL statements.
5
+ * Strips SQL comments and checks for disallowed keywords.
6
+ */
7
+ const WRITE_KEYWORDS_PATTERN = /^\s*(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|ATTACH|DETACH|REINDEX|VACUUM)\b/i;
8
+ /**
9
+ * Catches CTEs that lead to write operations: WITH ... INSERT/UPDATE/DELETE
10
+ */
11
+ const CTE_WRITE_PATTERN = /^\s*WITH\b[\s\S]*?\b(INSERT|UPDATE|DELETE)\b/i;
12
+ function stripSqlComments(sql) {
13
+ return sql
14
+ .replace(/--[^\n]*/g, '') // single-line comments
15
+ .replace(/\/\*[\s\S]*?\*\//g, '') // multi-line comments
16
+ .trim();
17
+ }
18
+ function isWriteQuery(sql) {
19
+ const normalized = stripSqlComments(sql);
20
+ return WRITE_KEYWORDS_PATTERN.test(normalized) || CTE_WRITE_PATTERN.test(normalized);
21
+ }
22
+ function formatCellValue(value) {
23
+ if (value instanceof Uint8Array) {
24
+ return `(${value.length} bytes)`;
25
+ }
26
+ return value;
27
+ }
28
+ export async function executeQuery(sql) {
29
+ const trimmed = sql.trim();
30
+ if (!trimmed) {
31
+ return { error: 'Query cannot be empty' };
32
+ }
33
+ if (isWriteQuery(trimmed)) {
34
+ return {
35
+ error: 'Write operations are not allowed. Only SELECT and PRAGMA queries are permitted.',
36
+ };
37
+ }
38
+ try {
39
+ const db = getDb();
40
+ const rows = db.prepare(trimmed).all();
41
+ const columns = rows.length > 0 ? Object.keys(rows[0]) : [];
42
+ const formattedRows = rows.map((row) => {
43
+ const formatted = {};
44
+ for (const [key, value] of Object.entries(row)) {
45
+ formatted[key] = formatCellValue(value);
46
+ }
47
+ return formatted;
48
+ });
49
+ return { columns, rows: formattedRows };
50
+ }
51
+ catch (error) {
52
+ const message = error instanceof Error ? error.message : 'Query execution failed';
53
+ return { error: message };
54
+ }
55
+ }
@@ -0,0 +1,10 @@
1
+ export interface GetTableRowsResult {
2
+ columns?: string[];
3
+ rows?: Record<string, unknown>[];
4
+ totalRows?: number;
5
+ page?: number;
6
+ pageSize?: number;
7
+ error?: string;
8
+ }
9
+ export declare function getTableRows(tableName: string, page?: number): Promise<GetTableRowsResult>;
10
+ //# sourceMappingURL=get-table-rows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-table-rows.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/get-table-rows.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AASD,wBAAsB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,SAAI,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAsD3F"}
@@ -0,0 +1,55 @@
1
+ 'use server';
2
+ import { getDb } from '../../lib/server-db.js';
3
+ const PAGE_SIZE = 50;
4
+ function formatCellValue(value) {
5
+ if (value instanceof Uint8Array) {
6
+ return `(${value.length} bytes)`;
7
+ }
8
+ return value;
9
+ }
10
+ export async function getTableRows(tableName, page = 0) {
11
+ try {
12
+ const db = getDb();
13
+ // Validate table name against sqlite_master (prevents SQL injection)
14
+ const tableExists = db
15
+ .prepare(`SELECT name FROM sqlite_master WHERE type = 'table' AND name = ?`)
16
+ .get(tableName);
17
+ if (!tableExists) {
18
+ return { error: `Table "${tableName}" not found` };
19
+ }
20
+ const countRow = db.prepare(`SELECT COUNT(*) as count FROM "${tableName}"`).get();
21
+ const totalRows = countRow.count;
22
+ const offset = page * PAGE_SIZE;
23
+ const rows = db
24
+ .prepare(`SELECT * FROM "${tableName}" LIMIT ? OFFSET ?`)
25
+ .all(PAGE_SIZE, offset);
26
+ // Get column names from first row or from pragma if empty
27
+ let columns;
28
+ if (rows.length > 0) {
29
+ columns = Object.keys(rows[0]);
30
+ }
31
+ else {
32
+ const pragmaResult = db.prepare(`PRAGMA table_info("${tableName}")`).all();
33
+ columns = pragmaResult.map((c) => c.name);
34
+ }
35
+ // Format BLOB values
36
+ const formattedRows = rows.map((row) => {
37
+ const formatted = {};
38
+ for (const [key, value] of Object.entries(row)) {
39
+ formatted[key] = formatCellValue(value);
40
+ }
41
+ return formatted;
42
+ });
43
+ return {
44
+ columns,
45
+ rows: formattedRows,
46
+ totalRows,
47
+ page,
48
+ pageSize: PAGE_SIZE,
49
+ };
50
+ }
51
+ catch (error) {
52
+ const message = error instanceof Error ? error.message : 'Failed to fetch table rows';
53
+ return { error: message };
54
+ }
55
+ }
@@ -0,0 +1,13 @@
1
+ export interface ColumnInfo {
2
+ name: string;
3
+ type: string;
4
+ notnull: boolean;
5
+ defaultValue: string | null;
6
+ primaryKey: boolean;
7
+ }
8
+ export interface GetTableSchemaResult {
9
+ columns?: ColumnInfo[];
10
+ error?: string;
11
+ }
12
+ export declare function getTableSchema(tableName: string): Promise<GetTableSchemaResult>;
13
+ //# sourceMappingURL=get-table-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-table-schema.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/get-table-schema.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAmCrF"}
@@ -0,0 +1,27 @@
1
+ 'use server';
2
+ import { getDb } from '../../lib/server-db.js';
3
+ export async function getTableSchema(tableName) {
4
+ try {
5
+ const db = getDb();
6
+ // Validate table name against sqlite_master
7
+ const tableExists = db
8
+ .prepare(`SELECT name FROM sqlite_master WHERE type = 'table' AND name = ?`)
9
+ .get(tableName);
10
+ if (!tableExists) {
11
+ return { error: `Table "${tableName}" not found` };
12
+ }
13
+ const pragmaResult = db.prepare(`PRAGMA table_info("${tableName}")`).all();
14
+ const columns = pragmaResult.map((col) => ({
15
+ name: col.name,
16
+ type: col.type || 'TEXT',
17
+ notnull: col.notnull === 1,
18
+ defaultValue: col.dflt_value,
19
+ primaryKey: col.pk > 0,
20
+ }));
21
+ return { columns };
22
+ }
23
+ catch (error) {
24
+ const message = error instanceof Error ? error.message : 'Failed to fetch table schema';
25
+ return { error: message };
26
+ }
27
+ }
@@ -0,0 +1,10 @@
1
+ export interface TableInfo {
2
+ name: string;
3
+ rowCount: number;
4
+ }
5
+ export interface ListTablesResult {
6
+ tables?: TableInfo[];
7
+ error?: string;
8
+ }
9
+ export declare function listTables(): Promise<ListTablesResult>;
10
+ //# sourceMappingURL=list-tables.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-tables.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/list-tables.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,UAAU,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAsB5D"}
@@ -0,0 +1,19 @@
1
+ 'use server';
2
+ import { getDb } from '../../lib/server-db.js';
3
+ export async function listTables() {
4
+ try {
5
+ const db = getDb();
6
+ const tables = db
7
+ .prepare(`SELECT name FROM sqlite_master WHERE type = 'table' AND name NOT LIKE 'sqlite_%' ORDER BY name`)
8
+ .all();
9
+ const result = tables.map((t) => {
10
+ const row = db.prepare(`SELECT COUNT(*) as count FROM "${t.name}"`).get();
11
+ return { name: t.name, rowCount: row.count };
12
+ });
13
+ return { tables: result };
14
+ }
15
+ catch (error) {
16
+ const message = error instanceof Error ? error.message : 'Failed to list tables';
17
+ return { error: message };
18
+ }
19
+ }
@@ -0,0 +1,4 @@
1
+ /** Skip static pre-rendering since we need runtime database connection. */
2
+ export declare const dynamic = "force-dynamic";
3
+ export default function DatabasePage(): Promise<import("react/jsx-runtime").JSX.Element>;
4
+ //# sourceMappingURL=page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/database/page.tsx"],"names":[],"mappings":"AAMA,2EAA2E;AAC3E,eAAO,MAAM,OAAO,kBAAkB,CAAC;AAEvC,wBAA8B,YAAY,qDAsBzC"}
@@ -0,0 +1,15 @@
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ import { listTables } from '../actions/list-tables.js';
3
+ import { getTableRows } from '../actions/get-table-rows.js';
4
+ import { getTableSchema } from '../actions/get-table-schema.js';
5
+ import { executeQuery } from '../actions/execute-query.js';
6
+ import { DatabasePageClient } from '../../components/features/database/database-page-client.js';
7
+ /** Skip static pre-rendering since we need runtime database connection. */
8
+ export const dynamic = 'force-dynamic';
9
+ export default async function DatabasePage() {
10
+ const { tables, error } = await listTables();
11
+ if (error || !tables) {
12
+ return (_jsx("div", { className: "flex h-full flex-col p-6", children: _jsxs("p", { className: "text-destructive text-sm", children: ["Failed to load database: ", error] }) }));
13
+ }
14
+ return (_jsx("div", { className: "flex h-full flex-col overflow-hidden px-6 pb-6", children: _jsx(DatabasePageClient, { initialTables: tables, fetchRows: getTableRows, fetchSchema: getTableSchema, runQuery: executeQuery, className: "min-h-0 flex-1" }) }));
15
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"feature-drawer-client.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/control-center-drawer/feature-drawer-client.tsx"],"names":[],"mappings":"AAuCA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAI/D,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,UAAU,CAAC;IACjB,8FAA8F;IAC9F,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB;AAED,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,wBAAwB,2CA+jB1F"}
1
+ {"version":3,"file":"feature-drawer-client.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/control-center-drawer/feature-drawer-client.tsx"],"names":[],"mappings":"AAuCA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAI/D,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,UAAU,CAAC;IACjB,8FAA8F;IAC9F,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB;AAED,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,wBAAwB,2CAqkB1F"}
@@ -194,6 +194,10 @@ export function FeatureDrawerClient({ view: initialView, urlTab }) {
194
194
  if (result.iterationWarning) {
195
195
  toast.warning(`Iteration ${result.iteration} — consider approving or adjusting feedback to avoid excessive iterations`);
196
196
  }
197
+ // Optimistically update canvas node before SSE arrives (~500ms delay)
198
+ window.dispatchEvent(new CustomEvent('shep:feature-approved', {
199
+ detail: { featureId: featureNode.featureId },
200
+ }));
197
201
  onClose();
198
202
  onDone?.();
199
203
  }
@@ -1 +1 @@
1
- {"version":3,"file":"use-control-center-state.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/control-center/use-control-center-state.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,yBAAyB,CAAC;AAgBjC,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAM7E,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,aAAa,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,cAAc,CAAC,EAAE,KAAK,IAAI,CAAC;IAC/D,aAAa,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;IAChD,mBAAmB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK;QAAE,QAAQ,EAAE,OAAO,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/E,YAAY,EAAE,CAAC,SAAS,EAAE,eAAe,KAAK,IAAI,CAAC;IACnD,mBAAmB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,aAAa,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7F,kBAAkB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD,kBAAkB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD,iBAAiB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,sBAAsB,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE,iBAAiB,EAAE,CACjB,YAAY,EAAE,MAAM,GAAG,IAAI,EAC3B,YAAY,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,EACvC,QAAQ,CAAC,EAAE,MAAM,KACd,MAAM,CAAC;IACZ,wDAAwD;IACxD,wBAAwB,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACxE,gDAAgD;IAChD,iBAAiB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,kBAAkB,GAAG,SAAS,CAAC;IACtE,0EAA0E;IAC1E,YAAY,EAAE,CAAC,SAAS,EAAE,cAAc,KAAK,IAAI,CAAC;CACnD;AAQD,wBAAgB,qBAAqB,CACnC,YAAY,EAAE,cAAc,EAAE,EAC9B,YAAY,EAAE,IAAI,EAAE,GACnB,kBAAkB,CAygBpB"}
1
+ {"version":3,"file":"use-control-center-state.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/control-center/use-control-center-state.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,yBAAyB,CAAC;AAgBjC,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAM7E,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,aAAa,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,cAAc,CAAC,EAAE,KAAK,IAAI,CAAC;IAC/D,aAAa,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;IAChD,mBAAmB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK;QAAE,QAAQ,EAAE,OAAO,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/E,YAAY,EAAE,CAAC,SAAS,EAAE,eAAe,KAAK,IAAI,CAAC;IACnD,mBAAmB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,aAAa,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7F,kBAAkB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD,kBAAkB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD,iBAAiB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,sBAAsB,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE,iBAAiB,EAAE,CACjB,YAAY,EAAE,MAAM,GAAG,IAAI,EAC3B,YAAY,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,EACvC,QAAQ,CAAC,EAAE,MAAM,KACd,MAAM,CAAC;IACZ,wDAAwD;IACxD,wBAAwB,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACxE,gDAAgD;IAChD,iBAAiB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,kBAAkB,GAAG,SAAS,CAAC;IACtE,0EAA0E;IAC1E,YAAY,EAAE,CAAC,SAAS,EAAE,cAAc,KAAK,IAAI,CAAC;CACnD;AAQD,wBAAgB,qBAAqB,CACnC,YAAY,EAAE,cAAc,EAAE,EAC9B,YAAY,EAAE,IAAI,EAAE,GACnB,kBAAkB,CA6gBpB"}
@@ -115,15 +115,19 @@ export function useControlCenterState(initialNodes, initialEdges) {
115
115
  }
116
116
  }
117
117
  }, [events, updateFeature]);
118
- // Listen for optimistic approval events from the drawer (fires before SSE arrives)
118
+ // Listen for optimistic approval/rejection events from the drawer (fires before SSE arrives).
119
+ // Uses beginMutation + endMutation to prevent stale poll/reconcile data from overwriting
120
+ // the optimistic 'running' state during the transition window (avoids brief "Something went wrong" flash).
119
121
  useEffect(() => {
120
122
  const handler = (e) => {
121
123
  const { featureId } = e.detail;
124
+ beginMutation();
122
125
  updateFeature(`feat-${featureId}`, { state: 'running' });
126
+ endMutation();
123
127
  };
124
128
  window.addEventListener('shep:feature-approved', handler);
125
129
  return () => window.removeEventListener('shep:feature-approved', handler);
126
- }, [updateFeature]);
130
+ }, [updateFeature, beginMutation, endMutation]);
127
131
  // Separate effect: fetch metadata (name + description) when SSE reports it changed
128
132
  const metadataFetchedRef = useRef(new Set());
129
133
  const processedMetadataCountRef = useRef(0);
@@ -0,0 +1,8 @@
1
+ export interface CellValueDialogProps {
2
+ open: boolean;
3
+ onOpenChange: (open: boolean) => void;
4
+ columnName: string;
5
+ value: string;
6
+ }
7
+ export declare function CellValueDialog({ open, onOpenChange, columnName, value }: CellValueDialogProps): import("react/jsx-runtime").JSX.Element;
8
+ //# sourceMappingURL=cell-value-dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cell-value-dialog.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/database/cell-value-dialog.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,oBAAoB,2CAe9F"}
@@ -0,0 +1,7 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Dialog, DialogContent, DialogHeader, DialogTitle } from '../../ui/dialog.js';
4
+ import { ScrollArea } from '../../ui/scroll-area.js';
5
+ export function CellValueDialog({ open, onOpenChange, columnName, value }) {
6
+ return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(DialogContent, { className: "max-w-2xl", children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { children: columnName }) }), _jsx(ScrollArea, { className: "max-h-[60vh]", children: _jsx("pre", { className: "text-sm break-all whitespace-pre-wrap", "data-testid": "cell-value-content", children: value }) })] }) }));
7
+ }
@@ -0,0 +1,10 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { CellValueDialog } from './cell-value-dialog.js';
3
+ declare const meta: Meta<typeof CellValueDialog>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const ShortText: Story;
7
+ export declare const LongText: Story;
8
+ export declare const BlobValue: Story;
9
+ export declare const JsonValue: Story;
10
+ //# sourceMappingURL=cell-value-dialog.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cell-value-dialog.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/database/cell-value-dialog.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,eAAe,CAYtC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAMnC,eAAO,MAAM,SAAS,EAAE,KAIvB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAMtB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAKvB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAevB,CAAC"}
@@ -0,0 +1,48 @@
1
+ import { fn } from '@storybook/test';
2
+ import { CellValueDialog } from './cell-value-dialog.js';
3
+ const meta = {
4
+ title: 'Features/Database/CellValueDialog',
5
+ component: CellValueDialog,
6
+ tags: ['autodocs'],
7
+ parameters: {
8
+ layout: 'centered',
9
+ },
10
+ args: {
11
+ open: true,
12
+ onOpenChange: fn(),
13
+ columnName: 'description',
14
+ },
15
+ };
16
+ export default meta;
17
+ /* ---------------------------------------------------------------------------
18
+ * Stories
19
+ * ------------------------------------------------------------------------- */
20
+ export const ShortText = {
21
+ args: {
22
+ value: 'A simple short text value.',
23
+ },
24
+ };
25
+ export const LongText = {
26
+ args: {
27
+ columnName: 'content',
28
+ value: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris.',
29
+ },
30
+ };
31
+ export const BlobValue = {
32
+ args: {
33
+ columnName: 'data',
34
+ value: '(2048 bytes)',
35
+ },
36
+ };
37
+ export const JsonValue = {
38
+ args: {
39
+ columnName: 'metadata',
40
+ value: JSON.stringify({
41
+ id: 'feat-12345',
42
+ name: 'database-management-ui',
43
+ status: 'in_progress',
44
+ config: { maxRetries: 3, timeout: 30000 },
45
+ tags: ['web', 'database', 'ui'],
46
+ }, null, 2),
47
+ },
48
+ };
@@ -0,0 +1,13 @@
1
+ import type { TableInfo } from '../../../app/actions/list-tables.js';
2
+ import type { GetTableSchemaResult } from '../../../app/actions/get-table-schema.js';
3
+ import type { GetTableRowsResult } from '../../../app/actions/get-table-rows.js';
4
+ import type { ExecuteQueryResult } from '../../../app/actions/execute-query.js';
5
+ export interface DatabasePageClientProps {
6
+ initialTables: TableInfo[];
7
+ fetchRows: (tableName: string, page: number) => Promise<GetTableRowsResult>;
8
+ fetchSchema: (tableName: string) => Promise<GetTableSchemaResult>;
9
+ runQuery: (sql: string) => Promise<ExecuteQueryResult>;
10
+ className?: string;
11
+ }
12
+ export declare function DatabasePageClient({ initialTables, fetchRows: fetchRowsAction, fetchSchema: fetchSchemaAction, runQuery, className, }: DatabasePageClientProps): import("react/jsx-runtime").JSX.Element;
13
+ //# sourceMappingURL=database-page-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"database-page-client.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/database/database-page-client.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAc,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACvF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAItE,MAAM,WAAW,uBAAuB;IACtC,aAAa,EAAE,SAAS,EAAE,CAAC;IAC3B,SAAS,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAC5E,WAAW,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAClE,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,aAAa,EACb,SAAS,EAAE,eAAe,EAC1B,WAAW,EAAE,iBAAiB,EAC9B,QAAQ,EACR,SAAS,GACV,EAAE,uBAAuB,2CA6LzB"}
@@ -0,0 +1,74 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useState, useCallback } from 'react';
4
+ import { Database, Table2, Code2, Columns3 } from 'lucide-react';
5
+ import { Tabs, TabsList, TabsTrigger } from '../../ui/tabs.js';
6
+ import { TableList } from './table-list.js';
7
+ import { RowBrowser } from './row-browser.js';
8
+ import { SchemaViewer } from './schema-viewer.js';
9
+ import { QueryRunner } from './query-runner.js';
10
+ export function DatabasePageClient({ initialTables, fetchRows: fetchRowsAction, fetchSchema: fetchSchemaAction, runQuery, className, }) {
11
+ const [selectedTable, setSelectedTable] = useState(null);
12
+ const [activeTab, setActiveTab] = useState('data');
13
+ // Row browser state
14
+ const [columns, setColumns] = useState([]);
15
+ const [rows, setRows] = useState([]);
16
+ const [totalRows, setTotalRows] = useState(0);
17
+ const [page, setPage] = useState(0);
18
+ const [pageSize, setPageSize] = useState(50);
19
+ const [rowsLoading, setRowsLoading] = useState(false);
20
+ // Schema state
21
+ const [schemaColumns, setSchemaColumns] = useState([]);
22
+ const [schemaLoading, setSchemaLoading] = useState(false);
23
+ const fetchRows = useCallback(async (tableName, pageNum) => {
24
+ setRowsLoading(true);
25
+ try {
26
+ const result = await fetchRowsAction(tableName, pageNum);
27
+ if (result.error) {
28
+ setColumns([]);
29
+ setRows([]);
30
+ setTotalRows(0);
31
+ return;
32
+ }
33
+ setColumns(result.columns ?? []);
34
+ setRows(result.rows ?? []);
35
+ setTotalRows(result.totalRows ?? 0);
36
+ setPage(result.page ?? 0);
37
+ setPageSize(result.pageSize ?? 50);
38
+ }
39
+ finally {
40
+ setRowsLoading(false);
41
+ }
42
+ }, [fetchRowsAction]);
43
+ const fetchSchema = useCallback(async (tableName) => {
44
+ setSchemaLoading(true);
45
+ try {
46
+ const result = await fetchSchemaAction(tableName);
47
+ if (result.error) {
48
+ setSchemaColumns([]);
49
+ return;
50
+ }
51
+ setSchemaColumns(result.columns ?? []);
52
+ }
53
+ finally {
54
+ setSchemaLoading(false);
55
+ }
56
+ }, [fetchSchemaAction]);
57
+ const handleSelectTable = useCallback((tableName) => {
58
+ setSelectedTable(tableName);
59
+ setPage(0);
60
+ setActiveTab('data');
61
+ fetchRows(tableName, 0);
62
+ fetchSchema(tableName);
63
+ }, [fetchRows, fetchSchema]);
64
+ const handlePageChange = useCallback((newPage) => {
65
+ if (selectedTable) {
66
+ setPage(newPage);
67
+ fetchRows(selectedTable, newPage);
68
+ }
69
+ }, [selectedTable, fetchRows]);
70
+ const handleExecuteQuery = useCallback(async (sql) => {
71
+ return runQuery(sql);
72
+ }, [runQuery]);
73
+ return (_jsxs("div", { "data-testid": "database-page-client", className: `flex flex-col ${className ?? ''}`, children: [_jsxs("div", { className: "mb-3 flex items-center gap-2.5 pt-1", children: [_jsx("div", { className: "bg-primary/10 flex h-7 w-7 items-center justify-center rounded-md", children: _jsx(Database, { className: "text-primary h-4 w-4" }) }), _jsxs("div", { children: [_jsx("h1", { className: "text-sm font-semibold tracking-tight", children: "Database Browser" }), _jsxs("p", { className: "text-muted-foreground text-xs", children: [initialTables.length, " table", initialTables.length !== 1 ? 's' : ''] })] })] }), _jsxs("div", { className: "flex min-h-0 flex-1 gap-3", children: [_jsxs("div", { className: "border-border bg-card flex w-56 flex-col rounded-lg border", children: [_jsx("div", { className: "border-border border-b px-3 py-2", children: _jsx("span", { className: "text-muted-foreground text-xs font-medium tracking-wider uppercase", children: "Tables" }) }), _jsx("div", { className: "min-h-0 flex-1", children: _jsx(TableList, { tables: initialTables, selectedTable: selectedTable, onSelectTable: handleSelectTable }) })] }), _jsx("div", { className: "flex min-w-0 flex-1 flex-col", children: selectedTable ? (_jsxs("div", { className: "border-border bg-card flex min-h-0 flex-1 flex-col rounded-lg border", children: [_jsxs("div", { className: "border-border flex items-center justify-between border-b px-4 py-2", children: [_jsx("span", { className: "font-mono text-sm font-medium", children: selectedTable }), _jsx(Tabs, { value: activeTab, onValueChange: (v) => setActiveTab(v), "data-testid": "database-tabs", children: _jsxs(TabsList, { className: "h-7", children: [_jsxs(TabsTrigger, { value: "data", className: "gap-1.5 px-2.5 text-xs", "data-testid": "tab-data", children: [_jsx(Table2, { className: "h-3 w-3" }), "Data"] }), _jsxs(TabsTrigger, { value: "schema", className: "gap-1.5 px-2.5 text-xs", "data-testid": "tab-schema", children: [_jsx(Columns3, { className: "h-3 w-3" }), "Schema"] }), _jsxs(TabsTrigger, { value: "query", className: "gap-1.5 px-2.5 text-xs", "data-testid": "tab-query", children: [_jsx(Code2, { className: "h-3 w-3" }), "Query"] })] }) })] }), _jsxs("div", { className: "min-h-0 flex-1 overflow-auto p-4", children: [activeTab === 'data' && (_jsx(RowBrowser, { columns: columns, rows: rows, totalRows: totalRows, page: page, pageSize: pageSize, onPageChange: handlePageChange, loading: rowsLoading })), activeTab === 'schema' && (_jsx(SchemaViewer, { columns: schemaColumns, loading: schemaLoading })), activeTab === 'query' && _jsx(QueryRunner, { onExecute: handleExecuteQuery })] })] })) : (_jsxs("div", { className: "border-border bg-card flex flex-1 flex-col items-center justify-center rounded-lg border", children: [_jsx("div", { className: "bg-muted/50 mb-3 flex h-12 w-12 items-center justify-center rounded-full", children: _jsx(Database, { className: "text-muted-foreground h-6 w-6" }) }), _jsx("p", { className: "text-muted-foreground text-sm", children: "Select a table to browse its data" })] })) })] })] }));
74
+ }
@@ -0,0 +1,9 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { DatabasePageClient } from './database-page-client.js';
3
+ declare const meta: Meta<typeof DatabasePageClient>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const EmptyDatabase: Story;
8
+ export declare const SingleTable: Story;
9
+ //# sourceMappingURL=database-page-client.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"database-page-client.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/database/database-page-client.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AA8C5D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,kBAAkB,CAmBzC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAUnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAI3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAIzB,CAAC"}
@@ -0,0 +1,78 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { DatabasePageClient } from './database-page-client.js';
3
+ const mockFetchRows = async (_tableName, page) => ({
4
+ columns: ['id', 'name', 'status', 'created_at'],
5
+ rows: [
6
+ { id: 1, name: 'auth-module', status: 'done', created_at: '2026-01-15' },
7
+ { id: 2, name: 'payment-flow', status: 'in-progress', created_at: '2026-02-01' },
8
+ { id: 3, name: 'dashboard', status: 'pending', created_at: '2026-02-10' },
9
+ ],
10
+ totalRows: 42,
11
+ page,
12
+ pageSize: 50,
13
+ });
14
+ const mockFetchSchema = async (_tableName) => ({
15
+ columns: [
16
+ { name: 'id', type: 'INTEGER', notnull: true, defaultValue: null, primaryKey: true },
17
+ { name: 'name', type: 'TEXT', notnull: true, defaultValue: null, primaryKey: false },
18
+ { name: 'status', type: 'TEXT', notnull: false, defaultValue: "'pending'", primaryKey: false },
19
+ {
20
+ name: 'created_at',
21
+ type: 'TEXT',
22
+ notnull: true,
23
+ defaultValue: 'CURRENT_TIMESTAMP',
24
+ primaryKey: false,
25
+ },
26
+ ],
27
+ });
28
+ const mockRunQuery = async (sql) => {
29
+ if (sql.toLowerCase().includes('error')) {
30
+ return { error: 'near "error": syntax error' };
31
+ }
32
+ return {
33
+ columns: ['id', 'name'],
34
+ rows: [
35
+ { id: 1, name: 'result-1' },
36
+ { id: 2, name: 'result-2' },
37
+ ],
38
+ };
39
+ };
40
+ const meta = {
41
+ title: 'Features/Database/DatabasePageClient',
42
+ component: DatabasePageClient,
43
+ tags: ['autodocs'],
44
+ parameters: {
45
+ layout: 'fullscreen',
46
+ },
47
+ decorators: [
48
+ (Story) => (_jsx("div", { style: { height: '100vh', padding: '24px', display: 'flex', flexDirection: 'column' }, children: _jsx(Story, {}) })),
49
+ ],
50
+ args: {
51
+ fetchRows: mockFetchRows,
52
+ fetchSchema: mockFetchSchema,
53
+ runQuery: mockRunQuery,
54
+ },
55
+ };
56
+ export default meta;
57
+ const mockTables = [
58
+ { name: 'features', rowCount: 42 },
59
+ { name: 'repositories', rowCount: 5 },
60
+ { name: 'settings', rowCount: 12 },
61
+ { name: 'migrations', rowCount: 8 },
62
+ { name: 'agent_events', rowCount: 1024 },
63
+ ];
64
+ export const Default = {
65
+ args: {
66
+ initialTables: mockTables,
67
+ },
68
+ };
69
+ export const EmptyDatabase = {
70
+ args: {
71
+ initialTables: [],
72
+ },
73
+ };
74
+ export const SingleTable = {
75
+ args: {
76
+ initialTables: [{ name: 'features', rowCount: 3 }],
77
+ },
78
+ };
@@ -0,0 +1,9 @@
1
+ export interface QueryRunnerProps {
2
+ onExecute: (sql: string) => Promise<{
3
+ columns?: string[];
4
+ rows?: Record<string, unknown>[];
5
+ error?: string;
6
+ }>;
7
+ }
8
+ export declare function QueryRunner({ onExecute }: QueryRunnerProps): import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=query-runner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-runner.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/database/query-runner.tsx"],"names":[],"mappings":"AAoBA,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;QAClC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;QACjC,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC,CAAC;CACJ;AASD,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,EAAE,gBAAgB,2CAwJ1D"}