Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat: project landing page v1 (#21572)
ecmadao3d2001731d77
diff --git a/backend/api/mcp/gen/openapi.yaml b/backend/api/mcp/gen/openapi.yamlindex c760ff3147..a8053288e8 100644--- a/backend/api/mcp/gen/openapi.yaml+++ b/backend/api/mcp/gen/openapi.yaml@@ -17,7 +17,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -57,7 +56,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -97,7 +95,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -137,7 +134,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -177,7 +173,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -217,7 +212,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -257,7 +251,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -300,7 +293,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -342,7 +334,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -384,7 +375,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -427,7 +417,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -470,7 +459,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -512,7 +500,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -554,7 +541,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -596,7 +582,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -641,7 +626,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -683,7 +667,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -728,7 +711,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -772,7 +754,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -814,7 +795,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -856,7 +836,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -898,7 +877,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -940,7 +918,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -982,7 +959,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -1024,7 +1000,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -1066,7 +1041,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -1108,7 +1082,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -1150,7 +1123,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -1192,7 +1164,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -1234,7 +1205,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -1277,7 +1247,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -1321,7 +1290,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -1363,7 +1331,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -1405,7 +1372,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -1448,7 +1414,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -1490,7 +1455,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -1532,7 +1496,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -1574,7 +1537,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -1616,7 +1578,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -1658,7 +1619,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -1700,7 +1660,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -1742,7 +1701,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -1784,7 +1742,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -1826,7 +1783,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -1871,7 +1827,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -1913,7 +1868,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -1955,7 +1909,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -1998,7 +1951,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -2040,7 +1992,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -2083,7 +2034,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -2125,7 +2075,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -2167,7 +2116,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -2209,7 +2157,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -2257,7 +2204,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -2299,7 +2245,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -2342,7 +2287,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -2384,7 +2328,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -2426,7 +2369,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -2468,7 +2410,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -2510,7 +2451,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -2552,7 +2492,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -2596,7 +2535,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -2638,7 +2576,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -2680,7 +2617,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -2722,7 +2658,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -2764,7 +2699,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -2806,7 +2740,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -2848,7 +2781,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -2892,7 +2824,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -2934,7 +2865,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -2976,7 +2906,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -3018,7 +2947,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -3060,7 +2988,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -3102,7 +3029,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -3144,7 +3070,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -3186,7 +3111,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -3228,7 +3152,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -3270,7 +3193,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -3312,7 +3234,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -3354,7 +3275,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -3403,7 +3323,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -3451,7 +3370,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -3493,7 +3411,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -3535,7 +3452,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -3577,7 +3493,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -3619,7 +3534,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -3661,7 +3575,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -3703,7 +3616,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -3745,7 +3657,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -3787,7 +3698,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -3829,7 +3739,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -3871,7 +3780,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -3913,7 +3821,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -3955,7 +3862,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -3997,7 +3903,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -4039,7 +3944,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -4082,7 +3986,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -4124,7 +4027,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -4166,7 +4068,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -4210,7 +4111,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -4252,7 +4152,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -4294,7 +4193,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -4336,7 +4234,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -4379,7 +4276,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -4421,7 +4317,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -4463,7 +4358,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -4505,7 +4399,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -4547,7 +4440,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -4589,7 +4481,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -4631,7 +4522,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -4673,7 +4563,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -4715,7 +4604,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -4757,7 +4645,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -4800,7 +4687,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -4842,7 +4728,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -4884,7 +4769,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -4926,7 +4810,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -4968,7 +4851,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -5010,7 +4892,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -5052,7 +4933,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -5094,7 +4974,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -5136,7 +5015,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -5179,7 +5057,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -5221,7 +5098,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -5263,7 +5139,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -5305,7 +5180,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -5347,7 +5221,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -5390,7 +5263,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -5432,7 +5304,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -5474,7 +5345,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -5516,7 +5386,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -5558,7 +5427,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -5600,7 +5468,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -5642,7 +5509,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -5684,7 +5550,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -5726,7 +5591,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -5769,7 +5633,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -5814,7 +5677,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -5856,7 +5718,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -5898,7 +5759,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -5940,7 +5800,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -5982,7 +5841,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -6024,7 +5882,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -6066,7 +5923,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -6108,7 +5964,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -6150,7 +6005,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -6192,7 +6046,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -6234,7 +6087,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -6277,7 +6129,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -6321,7 +6172,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -6366,7 +6216,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -6409,7 +6258,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -6453,7 +6301,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -6497,7 +6344,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -6541,7 +6387,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -6584,7 +6429,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -6627,7 +6471,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -6673,7 +6516,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -6719,7 +6561,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -6762,7 +6603,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -6805,7 +6645,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -6849,7 +6688,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -6892,7 +6730,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -6938,7 +6775,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -6981,7 +6817,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -7023,7 +6858,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -7065,7 +6899,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -7108,7 +6941,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -7150,7 +6982,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -7192,7 +7023,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -7234,7 +7064,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -7276,7 +7105,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -7318,7 +7146,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -7360,7 +7187,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -7402,7 +7228,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -7444,7 +7269,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -7486,7 +7310,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -7526,7 +7349,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -7568,7 +7390,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -7608,7 +7429,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -7648,7 +7468,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -7691,7 +7510,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -7731,7 +7549,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -7771,7 +7588,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -7813,7 +7629,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -7853,7 +7668,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -7893,7 +7707,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -7938,7 +7751,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -7983,7 +7795,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -8027,7 +7838,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -8070,7 +7880,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -8112,7 +7921,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -8157,7 +7965,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -8205,7 +8012,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -8247,7 +8053,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -8290,7 +8095,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -8333,7 +8137,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -8377,7 +8180,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -8422,7 +8224,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -8466,7 +8267,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -8508,7 +8308,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -8550,7 +8349,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -8593,7 +8391,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -8636,7 +8433,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -8678,7 +8474,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -8720,7 +8515,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -8763,7 +8557,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -8805,7 +8598,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -8847,7 +8639,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -8890,7 +8681,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -8932,7 +8722,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -8977,7 +8766,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -9020,7 +8808,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -9060,7 +8847,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -9105,7 +8891,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -9147,7 +8932,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -9187,7 +8971,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -9407,6 +9190,7 @@ components:description: |-Input only. The time-to-live duration for the access grant.The server computes `expire_time` from this value at activation time.+ writeOnly: truetitle: ttlunevaluatedProperties: falsenot:@@ -9445,6 +9229,7 @@ components:An ACTIVE grant with `expire_time` in the past is effectively expiredand no longer authorizes access. Use `expire_time` to determinewhether an ACTIVE grant has expired.+ readOnly: trueissue:type: stringtitle: issue@@ -9452,6 +9237,7 @@ components:The issue associated with the access grant.Can be empty.Format: projects/{project}/issues/{issue}+ readOnly: truetargets:type: arrayitems:@@ -9472,10 +9258,12 @@ components:allOf:- $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_time+ readOnly: trueupdateTime:allOf:- $ref: '#/components/schemas/google.protobuf.Timestamp'title: update_time+ readOnly: truereason:type: stringtitle: reason@@ -9492,6 +9280,9 @@ components:title: containerdescription: The container name to execute the query against, used for CosmosDB only.title: AccessGrant+ required:+ - creator+ - targetsbytebase.v1.AccessGrant.Status:type: stringtitle: Status@@ -9511,6 +9302,8 @@ components:The name of the access grant to activate.Format: projects/{project}/accessGrants/{access_grant}title: ActivateAccessGrantRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.Activity:type: object@@ -9536,80 +9329,102 @@ components:type: stringtitle: versiondescription: The Bytebase server version.+ readOnly: truegitCommit:type: stringtitle: git_commitdescription: The git commit hash of the build.+ readOnly: truesaas:type: booleantitle: saasdescription: Whether the Bytebase instance is running in SaaS mode where some features cannot be edited by users.+ readOnly: trueexternalUrl:type: stringtitle: external_urldescription: The external URL where users or webhook callbacks access Bytebase.+ readOnly: truelastActiveTime:allOf:- $ref: '#/components/schemas/google.protobuf.Timestamp'title: last_active_timedescription: The last time any API call was made, refreshed on each request.+ readOnly: trueworkspace:type: stringtitle: workspacedescription: |-The unique identifier for the workspace.Format: workspaces/{id}+ readOnly: trueunlicensedFeatures:type: arrayitems:type: string+ readOnly: truetitle: unlicensed_featuresdescription: List of features that are not licensed.+ readOnly: trueactivatedInstanceCount:type: integertitle: activated_instance_countformat: int32description: The number of activated database instances.+ readOnly: truetotalInstanceCount:type: integertitle: total_instance_countformat: int32description: The total number of database instances.+ readOnly: trueexternalUrlFromFlag:type: booleantitle: external_url_from_flagdescription: Whether the external URL is set via command-line flag (and thus cannot be changed via UI).+ readOnly: truereplicaCount:type: integertitle: replica_countformat: int32description: The number of active replicas (servers sharing the same database).+ readOnly: truedefaultProject:type: stringtitle: default_projectdescription: |-The default project for unassigned databases.Format: projects/{id}+ readOnly: trueuserCountInIam:type: integertitle: user_count_in_iamformat: int32description: The number of users in the workspace IAM (for seat limit display).+ readOnly: trueactiveVcsUserCount:type: integertitle: active_vcs_user_countformat: int32description: The number of active VCS users seen in the active window.+ readOnly: truesample:allOf:- $ref: '#/components/schemas/bytebase.v1.SampleInfo'title: sampledescription: Sample setup availability and provisioned resources.+ readOnly: truemcpSetting:allOf:- $ref: '#/components/schemas/bytebase.v1.MCPSetting'title: mcp_settingdescription: The MCP (Model Context Protocol) setting in the current workspace.+ readOnly: true+ aiEnabled:+ type: boolean+ title: ai_enabled+ description: Whether the workspace AI setting enables the AI agent.+ readOnly: truetitle: ActuatorInfoadditionalProperties: falsedescription: |-@@ -9636,6 +9451,9 @@ components:title: validate_onlydescription: Validate only also tests the data source connection.title: AddDataSourceRequest+ required:+ - name+ - dataSourceadditionalProperties: falsebytebase.v1.AddWebhookRequest:type: object@@ -9652,6 +9470,9 @@ components:title: webhookdescription: The webhook to add.title: AddWebhookRequest+ required:+ - project+ - webhookadditionalProperties: falsebytebase.v1.AdminExecuteRequest:type: object@@ -9689,6 +9510,8 @@ components:Container is the container name to execute the query against, used forCosmosDB only.title: AdminExecuteRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.AdminExecuteResponse:type: object@@ -9944,12 +9767,15 @@ components:clientId:type: stringtitle: client_id+ writeOnly: trueclientSecret:type: stringtitle: client_secret+ writeOnly: truerobotCode:type: stringtitle: robot_code+ writeOnly: truetitle: DingTalkadditionalProperties: falsebytebase.v1.AppIMSetting.Feishu:@@ -9958,9 +9784,11 @@ components:appId:type: stringtitle: app_id+ writeOnly: trueappSecret:type: stringtitle: app_secret+ writeOnly: truetitle: FeishuadditionalProperties: falsebytebase.v1.AppIMSetting.IMSetting:@@ -10050,9 +9878,11 @@ components:appId:type: stringtitle: app_id+ writeOnly: trueappSecret:type: stringtitle: app_secret+ writeOnly: truetitle: LarkadditionalProperties: falsebytebase.v1.AppIMSetting.Slack:@@ -10061,6 +9891,7 @@ components:token:type: stringtitle: token+ writeOnly: truetitle: SlackadditionalProperties: falsebytebase.v1.AppIMSetting.Teams:@@ -10070,14 +9901,17 @@ components:type: stringtitle: tenant_iddescription: Azure AD tenant ID (Directory ID).+ writeOnly: trueclientId:type: stringtitle: client_iddescription: Azure AD application (client) ID.+ writeOnly: trueclientSecret:type: stringtitle: client_secretdescription: Azure AD client secret.+ writeOnly: truetitle: TeamsadditionalProperties: falsebytebase.v1.AppIMSetting.Wecom:@@ -10086,12 +9920,15 @@ components:corpId:type: stringtitle: corp_id+ writeOnly: trueagentId:type: stringtitle: agent_id+ writeOnly: truesecret:type: stringtitle: secret+ writeOnly: truetitle: WecomadditionalProperties: falsebytebase.v1.ApprovalFlow:@@ -10151,6 +9988,8 @@ components:title: commentdescription: The comment explaining the approval decision.title: ApproveIssueRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.AuditBehavior:type: string@@ -10184,11 +10023,13 @@ components:Formats:- projects/{project}/auditLogs/{uid}- workspaces/{workspace}/auditLogs/{uid}+ readOnly: truecreateTime:allOf:- $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_timedescription: The timestamp when the audit log was created.+ readOnly: trueactor:type: stringtitle: actor@@ -10248,6 +10089,7 @@ components:MCP delegation provenance. Present exactly when the audited call arrivedthrough the MCP server's delegated credential; never set for public APIcalls. Presence of this message is the MCP-origin marker.+ readOnly: truetitle: AuditLogadditionalProperties: falsedescription: Audit log entry recording system activity or API call.@@ -10282,17 +10124,20 @@ components:description: |-The workspace used for authentication, when one can be resolved.Format: workspaces/{workspace}+ readOnly: truerestriction:allOf:- $ref: '#/components/schemas/bytebase.v1.Restriction'title: restrictiondescription: The effective authentication restrictions.+ readOnly: trueidentityProviders:type: arrayitems:$ref: '#/components/schemas/bytebase.v1.LoginIdentityProvider'title: identity_providersdescription: The identity providers the login page renders, in display order.+ readOnly: truetitle: AuthenticationInfoadditionalProperties: falsebytebase.v1.AuthorizationRequest:@@ -10336,6 +10181,8 @@ components:The taskRuns to cancel.Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}title: BatchCancelTaskRunsRequest+ required:+ - parentadditionalProperties: falsebytebase.v1.BatchCancelTaskRunsResponse:type: object@@ -10359,6 +10206,9 @@ components:The request message specifying the revisions to create.A maximum of 100 revisions can be created in a batch.title: BatchCreateRevisionsRequest+ required:+ - parent+ - requestsadditionalProperties: falsebytebase.v1.BatchCreateRevisionsResponse:type: object@@ -10386,6 +10236,9 @@ components:$ref: '#/components/schemas/bytebase.v1.CreateSheetRequest'title: requeststitle: BatchCreateSheetsRequest+ required:+ - parent+ - requestsadditionalProperties: falsebytebase.v1.BatchCreateSheetsResponse:type: object@@ -10419,6 +10272,8 @@ components:When purge=true, all databases will be moved to the default project before deletion.When purge=false (soft delete/archive), the projects and their databases/issues remain unchanged.title: BatchDeleteProjectsRequest+ required:+ - namesadditionalProperties: falsebytebase.v1.BatchDeparseRequest:type: object@@ -10463,6 +10318,9 @@ components:title: namesdescription: The list of database names to retrieve.title: BatchGetDatabasesRequest+ required:+ - parent+ - namesadditionalProperties: falsebytebase.v1.BatchGetDatabasesResponse:type: object@@ -10487,6 +10345,8 @@ components:The group names to retrieve.Format: groups/{email}title: BatchGetGroupsRequest+ required:+ - namesadditionalProperties: falsedescription: Request message for batch getting groups.bytebase.v1.BatchGetGroupsResponse:@@ -10513,6 +10373,8 @@ components:The names of projects to retrieve.Format: projects/{project}title: BatchGetProjectsRequest+ required:+ - namesadditionalProperties: falsebytebase.v1.BatchGetProjectsResponse:type: object@@ -10537,6 +10399,8 @@ components:The user names to retrieve.Format: users/{email}title: BatchGetUsersRequest+ required:+ - namesadditionalProperties: falsebytebase.v1.BatchGetUsersResponse:type: object@@ -10601,6 +10465,8 @@ components:title: skip_prior_backupdescription: If true, skip prior backup for this run even if the task has prior backup enabled.title: BatchRunTasksRequest+ required:+ - parentadditionalProperties: falsebytebase.v1.BatchRunTasksResponse:type: object@@ -10629,6 +10495,8 @@ components:maxLength: 1000description: The reason for skipping the tasks.title: BatchSkipTasksRequest+ required:+ - parentadditionalProperties: falsebytebase.v1.BatchSkipTasksResponse:type: object@@ -10651,6 +10519,8 @@ components:title: namesdescription: The list of database names to sync.title: BatchSyncDatabasesRequest+ required:+ - namesadditionalProperties: falsebytebase.v1.BatchSyncDatabasesResponse:type: object@@ -10677,6 +10547,8 @@ components:The request message specifying the instances to sync.A maximum of 1000 instances can be synced in a batch.title: BatchSyncInstancesRequest+ required:+ - requestsadditionalProperties: falsebytebase.v1.BatchSyncInstancesResponse:type: object@@ -10702,6 +10574,8 @@ components:The request message specifying the resources to update.A maximum of 1000 databases can be modified in a batch.title: BatchUpdateDatabasesRequest+ required:+ - requestsadditionalProperties: falsebytebase.v1.BatchUpdateDatabasesResponse:type: object@@ -10733,6 +10607,8 @@ components:title: requestsdescription: The request message specifying the resources to update.title: BatchUpdateInstancesRequest+ required:+ - requestsadditionalProperties: falsebytebase.v1.BatchUpdateInstancesResponse:type: object@@ -10773,6 +10649,8 @@ components:title: reasondescription: The reason for the status change.title: BatchUpdateIssuesStatusRequest+ required:+ - parentadditionalProperties: falsebytebase.v1.BatchUpdateIssuesStatusResponse:type: object@@ -10846,6 +10724,7 @@ components:- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'title: parsed_exprdescription: The parsed expression of the condition.+ readOnly: truetitle: BindingadditionalProperties: falsedescription: Binding associates members with a role and optional conditions.@@ -10919,6 +10798,8 @@ components:The name of the plan check run to cancel.Format: projects/{project}/plans/{plan}/planCheckRuntitle: CancelPlanCheckRunRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.CancelPlanCheckRunResponse:type: object@@ -10960,6 +10841,8 @@ components:title: credentialtitle: ChangePasswordRequestrequired:+ - name+ - newPassword- credentialadditionalProperties: falsebytebase.v1.Changelog:@@ -10994,6 +10877,7 @@ components:description: |-The title of the plan associated with this changelog's task run.This field is populated by deriving the plan from task_run for display purposes.+ readOnly: truetitle: ChangelogadditionalProperties: falsebytebase.v1.Changelog.Status:@@ -11065,6 +10949,9 @@ components:The non-bot VCS pull request or merge request creator observed by bytebase-release.If absent, Bytebase skips VCS user tracking and VCS user limit enforcement.title: CheckReleaseRequest+ required:+ - parent+ - releaseadditionalProperties: falsebytebase.v1.CheckReleaseResponse:type: object@@ -11341,10 +11228,11 @@ components:title: otp_codemaxLength: 64description: |-- Required for first-time enrollment, rejected otherwise. A *fresh* code,+ (OPTIONAL) Required for first-time enrollment, rejected otherwise. A *fresh* code,not the one EnableMFA took.title: ConfirmRecoveryCodesRequestrequired:+ - name- pendingVersion- credentialadditionalProperties: false@@ -11363,6 +11251,9 @@ components:title: access_grantdescription: The access grant to create.title: CreateAccessGrantRequest+ required:+ - parent+ - accessGrantadditionalProperties: falsebytebase.v1.CreateDatabaseGroupRequest:type: object@@ -11392,6 +11283,9 @@ components:title: validate_onlydescription: If set, validate the create request and preview the full database group response, but do not actually create it.title: CreateDatabaseGroupRequest+ required:+ - parent+ - databaseGroupadditionalProperties: falsedescription: Request message for creating a database group.bytebase.v1.CreateGroupRequest:@@ -11409,6 +11303,9 @@ components:The email to use for the group, which will become the final componentof the group's resource name.title: CreateGroupRequest+ required:+ - group+ - groupEmailadditionalProperties: falsedescription: Request message for creating a group.bytebase.v1.CreateIdentityProviderRequest:@@ -11433,6 +11330,8 @@ components:title: validate_onlydescription: If set to true, the request will be validated without actually creating the identity provider.title: CreateIdentityProviderRequest+ required:+ - identityProvideradditionalProperties: falsebytebase.v1.CreateInstanceRequest:type: object@@ -11465,6 +11364,8 @@ components:title: validate_onlydescription: Validate only also tests the data source connection.title: CreateInstanceRequest+ required:+ - instanceadditionalProperties: falsebytebase.v1.CreateIssueCommentRequest:type: object@@ -11481,6 +11382,8 @@ components:title: issue_commentdescription: The comment to create.title: CreateIssueCommentRequest+ required:+ - parentadditionalProperties: falsebytebase.v1.CreateIssueRequest:type: object@@ -11497,6 +11400,9 @@ components:title: issuedescription: The issue to create.title: CreateIssueRequest+ required:+ - parent+ - issueadditionalProperties: falsebytebase.v1.CreatePlanRequest:type: object@@ -11513,6 +11419,9 @@ components:title: plandescription: The plan to create.title: CreatePlanRequest+ required:+ - parent+ - planadditionalProperties: falsebytebase.v1.CreatePolicyRequest:type: object@@ -11535,6 +11444,9 @@ components:title: typedescription: The type of policy to create.title: CreatePolicyRequest+ required:+ - parent+ - policyadditionalProperties: falsebytebase.v1.CreateProjectRequest:type: object@@ -11554,6 +11466,8 @@ components:This value should be 4-63 characters, and valid charactersare /[a-z][0-9]-/.title: CreateProjectRequest+ required:+ - projectadditionalProperties: falsebytebase.v1.CreatePurchaseRequest:type: object@@ -11600,6 +11514,9 @@ components:Must be a valid IANA timezone (e.g., "UTC", "America/Los_Angeles").Default: "UTC".title: CreateReleaseRequest+ required:+ - parent+ - releaseadditionalProperties: falsebytebase.v1.CreateReviewConfigRequest:type: object@@ -11610,6 +11527,8 @@ components:title: review_configdescription: The SQL review config to create.title: CreateReviewConfigRequest+ required:+ - reviewConfigadditionalProperties: falsebytebase.v1.CreateRevisionRequest:type: object@@ -11624,6 +11543,9 @@ components:title: revisiondescription: The revision to create.title: CreateRevisionRequest+ required:+ - parent+ - revisionadditionalProperties: falsebytebase.v1.CreateRoleRequest:type: object@@ -11643,6 +11565,9 @@ components:This value should be 4-63 characters, and valid charactersare /[a-z][A-Z][0-9]/.title: CreateRoleRequest+ required:+ - role+ - roleIdadditionalProperties: falsebytebase.v1.CreateRolloutRequest:type: object@@ -11664,6 +11589,8 @@ components:If unspecified, all stages are created.If set to "", no stages are created.title: CreateRolloutRequest+ required:+ - parentadditionalProperties: falsebytebase.v1.CreateSavedQueryRequest:type: object@@ -11680,6 +11607,9 @@ components:title: saved_querydescription: The saved query to create.title: CreateSavedQueryRequest+ required:+ - parent+ - savedQueryadditionalProperties: falsebytebase.v1.CreateServiceAccountRequest:type: object@@ -11703,6 +11633,9 @@ components:title: service_accountdescription: The service account to create.title: CreateServiceAccountRequest+ required:+ - serviceAccountId+ - serviceAccountadditionalProperties: falsedescription: Request message for creating a service account.bytebase.v1.CreateSheetRequest:@@ -11720,6 +11653,9 @@ components:title: sheetdescription: The sheet to create.title: CreateSheetRequest+ required:+ - parent+ - sheetadditionalProperties: falsebytebase.v1.CreateUserRequest:type: object@@ -11730,6 +11666,8 @@ components:title: userdescription: The user to create.title: CreateUserRequest+ required:+ - useradditionalProperties: falsebytebase.v1.CreateWorkloadIdentityRequest:type: object@@ -11753,6 +11691,9 @@ components:title: workload_identitydescription: The workload identity to create.title: CreateWorkloadIdentityRequest+ required:+ - workloadIdentityId+ - workloadIdentityadditionalProperties: falsedescription: Request message for creating a workload identity.bytebase.v1.CredentialProof:@@ -11950,6 +11891,7 @@ components:type: stringtitle: passworddescription: The password for database authentication.+ writeOnly: trueuseSsl:type: booleantitle: use_ssl@@ -11958,50 +11900,62 @@ components:type: stringtitle: ssl_cadescription: The SSL certificate authority certificate.+ writeOnly: truesslCert:type: stringtitle: ssl_certdescription: The SSL client certificate.+ writeOnly: truesslKey:type: stringtitle: ssl_keydescription: The SSL client private key.+ writeOnly: truesslCaPath:type: stringtitle: ssl_ca_pathdescription: The local filesystem path to the SSL certificate authority certificate.+ writeOnly: truesslCertPath:type: stringtitle: ssl_cert_pathdescription: The local filesystem path to the SSL client certificate.+ writeOnly: truesslKeyPath:type: stringtitle: ssl_key_pathdescription: The local filesystem path to the SSL client private key.+ writeOnly: truesslCaSet:type: booleantitle: ssl_ca_setdescription: Whether an SSL certificate authority certificate has been configured.+ readOnly: truesslCertSet:type: booleantitle: ssl_cert_setdescription: Whether an SSL client certificate has been configured.+ readOnly: truesslKeySet:type: booleantitle: ssl_key_setdescription: Whether an SSL client private key has been configured.+ readOnly: truesslCaPathSet:type: booleantitle: ssl_ca_path_setdescription: Whether an SSL certificate authority path has been configured.+ readOnly: truesslCertPathSet:type: booleantitle: ssl_cert_path_setdescription: Whether an SSL client certificate path has been configured.+ readOnly: truesslKeyPathSet:type: booleantitle: ssl_key_path_setdescription: Whether an SSL client private key path has been configured.+ readOnly: trueverifyTlsCertificate:type: booleantitle: verify_tls_certificate@@ -12067,20 +12021,24 @@ components:type: stringtitle: ssh_passworddescription: The password to login the server. If it's empty string, no password is required.+ writeOnly: truesshPrivateKey:type: stringtitle: ssh_private_keydescription: The private key to login the server. If it's empty string, we will use the system default private key from os.Getenv("SSH_AUTH_SOCK").+ writeOnly: trueauthenticationPrivateKey:type: stringtitle: authentication_private_keydescription: |-PKCS#8 private key in PEM format. If it's empty string, no private key is required.Used for authentication when connecting to the data source.+ writeOnly: trueauthenticationPrivateKeyPassphrase:type: stringtitle: authentication_private_key_passphrasedescription: Passphrase for the encrypted PKCS#8 private key. Only used when the private key is encrypted.+ writeOnly: trueexternalSecret:allOf:- $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret'@@ -12105,7 +12063,7 @@ components:items:$ref: '#/components/schemas/bytebase.v1.DataSource.Address'title: additional_addresses- description: additional_addresses is used for MongoDB replica set.+ description: (OPTIONAL) additional_addresses is used for MongoDB replica set.directConnection:type: booleantitle: direct_connection@@ -12129,6 +12087,7 @@ components:masterPassword:type: stringtitle: master_password+ writeOnly: trueredisType:allOf:- $ref: '#/components/schemas/bytebase.v1.DataSource.RedisType'@@ -12161,24 +12120,29 @@ components:accessKeyId:type: stringtitle: access_key_id+ writeOnly: truesecretAccessKey:type: stringtitle: secret_access_key+ writeOnly: truesessionToken:type: stringtitle: session_token+ writeOnly: trueroleArn:type: stringtitle: role_arndescription: |-ARN of IAM role to assume for cross-account access.See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html+ writeOnly: trueexternalId:type: stringtitle: external_iddescription: |-Optional external ID for additional security when assuming role.See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html+ writeOnly: truetitle: AWSCredentialadditionalProperties: falsebytebase.v1.DataSource.Address:@@ -12213,6 +12177,7 @@ components:clientSecret:type: stringtitle: client_secret+ writeOnly: truetitle: AzureCredentialadditionalProperties: falsebytebase.v1.DataSource.CloudSQLIPType:@@ -12230,6 +12195,7 @@ components:content:type: stringtitle: content+ writeOnly: truetitle: GCPCredentialadditionalProperties: falsebytebase.v1.DataSource.RedisType:@@ -12260,6 +12226,7 @@ components:Token for direct authentication. Interpreted according to token_type:the literal token (PLAIN), an environment variable name (ENVIRONMENT),or a file path (FILE).+ writeOnly: truetitle: tokenunevaluatedProperties: falsenot:@@ -12320,14 +12287,17 @@ components:type: stringtitle: vault_ssl_cadescription: CA certificate for Vault server verification.+ writeOnly: truevaultSslCert:type: stringtitle: vault_ssl_certdescription: Client certificate for mutual TLS authentication with Vault.+ writeOnly: truevaultSslKey:type: stringtitle: vault_ssl_keydescription: Client private key for mutual TLS authentication with Vault.+ writeOnly: truetitle: DataSourceExternalSecretbytebase.v1.DataSourceExternalSecret.AppRoleAuthOption:type: object@@ -12336,10 +12306,12 @@ components:type: stringtitle: role_iddescription: The role ID for Vault AppRole authentication.+ writeOnly: truesecretId:type: stringtitle: secret_iddescription: the secret id for the role without ttl.+ writeOnly: truetype:allOf:- $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType'@@ -12404,11 +12376,13 @@ components:- $ref: '#/components/schemas/bytebase.v1.State'title: statedescription: The existence of a database.+ readOnly: truesuccessfulSyncTime:allOf:- $ref: '#/components/schemas/google.protobuf.Timestamp'title: successful_sync_timedescription: The latest synchronization time.+ readOnly: trueproject:type: stringtitle: project@@ -12422,13 +12396,14 @@ components:The release that was last applied to this database.Format: projects/{project}/releases/{release_id}Example: projects/my-project/releases/release_20260115-RC00+ readOnly: trueenvironment:type:- string- "null"title: environmentdescription: |-- The environment resource.+ (OPTIONAL) The environment resource.Format: environments/prod where prod is the environment resource ID.effectiveEnvironment:type:@@ -12439,6 +12414,7 @@ components:The effective environment based on environment tag above and environmenttag on the instance. Inheritance followshttps://cloud.google.com/resource-manager/docs/tags/tags-overview.+ readOnly: truelabels:type: objecttitle: labels@@ -12451,19 +12427,23 @@ components:- $ref: '#/components/schemas/bytebase.v1.InstanceResource'title: instance_resourcedescription: The instance resource.+ readOnly: truebackupAvailable:type: booleantitle: backup_availabledescription: The database is available for DML prior backup.+ readOnly: truesyncStatus:allOf:- $ref: '#/components/schemas/bytebase.v1.SyncStatus'title: sync_statusdescription: The sync status of the database.+ readOnly: truesyncError:type: stringtitle: sync_errordescription: The error message if sync failed.+ readOnly: truetitle: DatabaseadditionalProperties: falsebytebase.v1.DatabaseCatalog:@@ -12529,7 +12509,10 @@ components:$ref: '#/components/schemas/bytebase.v1.DatabaseGroup.Database'title: matched_databasesdescription: The list of databases that match the database group condition.+ readOnly: truetitle: DatabaseGroup+ required:+ - titleadditionalProperties: falsedescription: A group of databases matched by expressions.bytebase.v1.DatabaseGroup.Database:@@ -12613,6 +12596,7 @@ components:Examples:- "text/plain; charset=utf-8" for SINGLE_FILE format- "application/zip" for MULTI_FILE format+ readOnly: truetitle: DatabaseSDLSchemaadditionalProperties: falsedescription: DatabaseSDLSchema contains the schema in SDL format.@@ -12636,6 +12620,8 @@ components:The name of the database group to delete.Format: projects/{project}/databaseGroups/{databaseGroup}title: DeleteDatabaseGroupRequest+ required:+ - nameadditionalProperties: falsedescription: Request message for deleting a database group.bytebase.v1.DeleteGroupRequest:@@ -12648,6 +12634,8 @@ components:The name of the group to delete.Format: groups/{email}title: DeleteGroupRequest+ required:+ - nameadditionalProperties: falsedescription: Request message for deleting a group.bytebase.v1.DeleteIdentityProviderRequest:@@ -12660,6 +12648,8 @@ components:The name of the identity provider to delete.Format: idps/{identity_provider}title: DeleteIdentityProviderRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.DeleteInstanceRequest:type: object@@ -12686,6 +12676,8 @@ components:administrative cleanup of old soft-deleted instances.The instance must already be soft-deleted for this to work.title: DeleteInstanceRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.DeletePolicyRequest:type: object@@ -12699,6 +12691,8 @@ components:Workspace resource name: workspaces/{workspace-id}.Environment resource name: environments/environment-id.title: DeletePolicyRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.DeleteProjectRequest:type: object@@ -12720,6 +12714,8 @@ components:When purge=true, all databases will be moved to the default project before deletion.When purge=false (soft delete/archive), the project and its databases/issues remain unchanged.title: DeleteProjectRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.DeleteReleaseRequest:type: object@@ -12731,6 +12727,8 @@ components:The name of the release to delete.Format: projects/{project}/releases/{release}title: DeleteReleaseRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.DeleteReviewConfigRequest:type: object@@ -12742,6 +12740,8 @@ components:The name of the SQL review config to delete.Format: reviewConfigs/{reviewConfig}title: DeleteReviewConfigRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.DeleteRevisionRequest:type: object@@ -12753,6 +12753,8 @@ components:The name of the revision to delete.Format: instances/{instance}/databases/{database}/revisions/{revision} or projects/{project}/instances/{instance}/databases/{database}/revisions/{revision}title: DeleteRevisionRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.DeleteRoleRequest:type: object@@ -12764,6 +12766,8 @@ components:The name of the role to delete.Format: roles/{role}title: DeleteRoleRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.DeleteSavedQueryRequest:type: object@@ -12773,6 +12777,8 @@ components:title: namedescription: 'Format: projects/{project}/savedQueries/{savedQuery}'title: DeleteSavedQueryRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.DeleteServiceAccountRequest:type: object@@ -12784,6 +12790,8 @@ components:The name of the service account to delete.Format: serviceAccounts/{email}title: DeleteServiceAccountRequest+ required:+ - nameadditionalProperties: falsedescription: Request message for deleting a service account.bytebase.v1.DeleteUserRequest:@@ -12796,6 +12804,8 @@ components:The name of the user to delete.Format: users/{email}title: DeleteUserRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.DeleteWorkloadIdentityRequest:type: object@@ -12807,6 +12817,8 @@ components:The name of the workload identity to delete.Format: workloadIdentities/{email}title: DeleteWorkloadIdentityRequest+ required:+ - nameadditionalProperties: falsedescription: Request message for deleting a workload identity.bytebase.v1.DeleteWorkspaceRequest:@@ -12817,6 +12829,8 @@ components:title: namedescription: 'Format: workspaces/{workspace}'title: DeleteWorkspaceRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.DependencyColumn:type: object@@ -12869,6 +12883,9 @@ components:stored source, so any object omitted from the target (for example by atruncated metadata fetch) is treated as dropped.title: DiffMetadataRequest+ required:+ - name+ - targetMetadataadditionalProperties: falsebytebase.v1.DiffMetadataResponse:type: object@@ -12923,6 +12940,8 @@ components:database: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}changelog: instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog}title: DiffSchemaRequest+ required:+ - namebytebase.v1.DiffSchemaResponse:type: objectproperties:@@ -12997,9 +13016,11 @@ components:- $ref: '#/components/schemas/bytebase.v1.CredentialProof'title: credentialdescription: |-- Required for a self-service call against a live factor, and then only+ (OPTIONAL) Required for a self-service call against a live factor, and then onlyotp_code or recovery_code. Unused on an admin-assisted call.title: DisableMFARequest+ required:+ - nameadditionalProperties: falsebytebase.v1.EmailSetting:type: object@@ -13040,6 +13061,7 @@ components:password:type: stringtitle: password+ writeOnly: trueencryption:allOf:- $ref: '#/components/schemas/bytebase.v1.EmailSetting.SMTPConfig.Encryption'@@ -13096,10 +13118,12 @@ components:- $ref: '#/components/schemas/bytebase.v1.CredentialProof'title: credentialdescription: |-- Proof of the *existing* factor, not the new device above. Required for a+ (OPTIONAL) Proof of the *existing* factor, not the new device above. Required for arotation, and for first-time enrollment on an account with a password.title: EnableMFARequestrequired:+ - name+ - otpCode- pendingVersionadditionalProperties: falsebytebase.v1.Engine:@@ -13175,6 +13199,7 @@ components:The resource name of the environment.Format: environments/{environment}.Output only.+ readOnly: trueid:type: stringtitle: id@@ -13299,6 +13324,8 @@ components:A page token, received from a previous `ExportAuditLogs` call.Provide this to retrieve the subsequent page.title: ExportAuditLogsRequest+ required:+ - parentadditionalProperties: falsedescription: Request message for exporting audit logs.bytebase.v1.ExportAuditLogsResponse:@@ -13389,6 +13416,8 @@ components:Container is the container name to execute the query against, used forCosmosDB only.title: ExportRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.ExportResponse:type: object@@ -13617,6 +13646,8 @@ components:The name of the access grant to retrieve.Format: projects/{project}/accessGrants/{access_grant}title: GetAccessGrantRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.GetActuatorInfoRequest:type: object@@ -13650,6 +13681,8 @@ components:- $ref: '#/components/schemas/bytebase.v1.ChangelogView'title: viewtitle: GetChangelogRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.GetDatabaseCatalogRequest:type: object@@ -13661,6 +13694,8 @@ components:The name of the database catalog to retrieve.Format: instances/{instance}/databases/{database}/catalog or projects/{project}/instances/{instance}/databases/{database}/catalogtitle: GetDatabaseCatalogRequest+ required:+ - nameadditionalProperties: falsedescription: Request message for getting a database catalog.bytebase.v1.GetDatabaseGroupRequest:@@ -13678,6 +13713,8 @@ components:title: viewdescription: The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC.title: GetDatabaseGroupRequest+ required:+ - nameadditionalProperties: falsedescription: Request message for getting a database group.bytebase.v1.GetDatabaseMetadataRequest:@@ -13717,6 +13754,8 @@ components:if limit is 20, then only 20 tables will be returned for each schema, total 60 tables.Default 0, means no limit.title: GetDatabaseMetadataRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.GetDatabaseRequest:type: object@@ -13728,6 +13767,8 @@ components:The name of the database to retrieve.Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}title: GetDatabaseRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.GetDatabaseSDLSchemaRequest:type: object@@ -13744,6 +13785,8 @@ components:title: formatdescription: The format of the SDL schema output.title: GetDatabaseSDLSchemaRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat:type: string@@ -13763,6 +13806,8 @@ components:The name of the database to retrieve schema.Format: instances/{instance}/databases/{database}/schema or projects/{project}/instances/{instance}/databases/{database}/schematitle: GetDatabaseSchemaRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.GetGroupRequest:type: object@@ -13774,6 +13819,8 @@ components:The name of the group to retrieve.Format: groups/{email}title: GetGroupRequest+ required:+ - nameadditionalProperties: falsedescription: Request message for getting a group.bytebase.v1.GetIamPolicyRequest:@@ -13787,6 +13834,8 @@ components:Format: projects/{project}Format: workspaces/{workspace}title: GetIamPolicyRequest+ required:+ - resourceadditionalProperties: falsedescription: Request message for getting an IAM policy.bytebase.v1.GetIdentityProviderRequest:@@ -13799,6 +13848,8 @@ components:The name of the identity provider to retrieve.Format: idps/{idp}title: GetIdentityProviderRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.GetInstanceRequest:type: object@@ -13810,6 +13861,8 @@ components:The name of the instance to retrieve.Format: instances/{instance} or projects/{project}/instances/{instance}title: GetInstanceRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.GetIssueRequest:type: object@@ -13825,6 +13878,8 @@ components:title: forcedescription: If set to true, bypass cache and fetch the latest data.title: GetIssueRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.GetPaymentInfoRequest:type: object@@ -13840,6 +13895,8 @@ components:The name of the plan check run to retrieve.Format: projects/{project}/plans/{plan}/planCheckRuntitle: GetPlanCheckRunRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.GetPlanRequest:type: object@@ -13851,6 +13908,8 @@ components:The name of the plan to retrieve.Format: projects/{project}/plans/{plan}title: GetPlanRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.GetPolicyRequest:type: object@@ -13862,6 +13921,8 @@ components:The name of the policy to retrieve.Format: {resource type}/{resource id}/policies/{policy type}title: GetPolicyRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.GetProjectRequest:type: object@@ -13873,6 +13934,8 @@ components:The name of the project to retrieve.Format: projects/{project}title: GetProjectRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.GetQueryHistoryRequest:type: object@@ -13884,6 +13947,8 @@ components:The name of the query history to retrieve.Format: projects/{project}/queryHistories/{id}title: GetQueryHistoryRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.GetReleaseRequest:type: object@@ -13893,6 +13958,8 @@ components:title: namedescription: 'Format: projects/{project}/releases/{release}'title: GetReleaseRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.GetReviewConfigRequest:type: object@@ -13904,6 +13971,8 @@ components:The name of the SQL review config to retrieve.Format: reviewConfigs/{reviewConfig}title: GetReviewConfigRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.GetRevisionRequest:type: object@@ -13915,6 +13984,8 @@ components:The name of the revision.Format: instances/{instance}/databases/{database}/revisions/{revision} or projects/{project}/instances/{instance}/databases/{database}/revisions/{revision}title: GetRevisionRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.GetRoleRequest:type: object@@ -13926,6 +13997,8 @@ components:The name of the role to retrieve.Format: roles/{role}title: GetRoleRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.GetRolloutRequest:type: object@@ -13938,6 +14011,8 @@ components:This is the rollout resource name, which is the plan name plus /rollout suffix.Format: projects/{project}/plans/{plan}/rollouttitle: GetRolloutRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.GetSavedQueryPolicyRequest:type: object@@ -13947,6 +14022,8 @@ components:title: resourcedescription: 'Format: projects/{project}/savedQueries/{savedQuery}'title: GetSavedQueryPolicyRequest+ required:+ - resourceadditionalProperties: falsebytebase.v1.GetSavedQueryRequest:type: object@@ -13956,6 +14033,8 @@ components:title: namedescription: 'Format: projects/{project}/savedQueries/{savedQuery}'title: GetSavedQueryRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.GetSchemaStringRequest:type: object@@ -13986,6 +14065,8 @@ components:If use the metadata to generate the schema string, the type is OBJECT_TYPE_UNSPECIFIED.Also the schema and object are empty.title: GetSchemaStringRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.GetSchemaStringRequest.ObjectType:type: string@@ -14018,6 +14099,8 @@ components:The name of the service account to retrieve.Format: serviceAccounts/{email}title: GetServiceAccountRequest+ required:+ - nameadditionalProperties: falsedescription: Request message for getting a service account.bytebase.v1.GetSettingRequest:@@ -14028,6 +14111,8 @@ components:title: namedescription: The resource name of the setting.title: GetSettingRequest+ required:+ - nameadditionalProperties: falsedescription: The request message for getting a setting.bytebase.v1.GetSettingResponse:@@ -14054,6 +14139,8 @@ components:title: rawdescription: By default, the content of the sheet is cut off, set the `raw` to true to retrieve the full content.title: GetSheetRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.GetSubscriptionRequest:type: object@@ -14067,6 +14154,8 @@ components:title: parentdescription: 'Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}'title: GetTaskRunLogRequest+ required:+ - parentadditionalProperties: falsebytebase.v1.GetTaskRunRequest:type: object@@ -14076,6 +14165,8 @@ components:title: namedescription: 'Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}'title: GetTaskRunRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.GetTaskRunSessionRequest:type: object@@ -14085,6 +14176,8 @@ components:title: parentdescription: 'Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}'title: GetTaskRunSessionRequest+ required:+ - parentadditionalProperties: falsebytebase.v1.GetUserRequest:type: object@@ -14096,6 +14189,8 @@ components:The name of the user to retrieve.Format: users/{email}title: GetUserRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.GetWorkloadIdentityRequest:type: object@@ -14107,6 +14202,8 @@ components:The name of the workload identity to retrieve.Format: workloadIdentities/{email}title: GetWorkloadIdentityRequest+ required:+ - nameadditionalProperties: falsedescription: Request message for getting a workload identity.bytebase.v1.GetWorkspaceRequest:@@ -14144,6 +14241,7 @@ components:description: |-The name of the group to retrieve.Format: groups/{group}, the group should be email or uuid.+ readOnly: truetitle:type: stringtitle: title@@ -14461,6 +14559,7 @@ components:type: stringtitle: engine_versiondescription: The version of the database engine.+ readOnly: trueexternalLink:type: stringtitle: external_link@@ -14477,7 +14576,7 @@ components:- "null"title: environmentdescription: |-- The environment resource.+ (OPTIONAL) The environment resource.Format: environments/prod where prod is the environment resource ID.activation:type: boolean@@ -14489,6 +14588,7 @@ components:$ref: '#/components/schemas/bytebase.v1.InstanceRole'title: rolesdescription: Database roles available in this instance.+ readOnly: truesyncInterval:allOf:- $ref: '#/components/schemas/google.protobuf.Duration'@@ -14506,6 +14606,7 @@ components:- $ref: '#/components/schemas/google.protobuf.Timestamp'title: last_sync_timedescription: The last time the instance was synced.+ readOnly: truelabels:type: objecttitle: labels@@ -14533,6 +14634,7 @@ components:type: stringtitle: engine_versiondescription: The version of the database engine.+ readOnly: truedataSources:type: arrayitems:@@ -14579,6 +14681,7 @@ components:- "null"title: passworddescription: The role password.+ writeOnly: trueconnectionLimit:type:- integer@@ -14646,14 +14749,17 @@ components:type: stringtitle: creatordescription: 'Format: users/[email protected]'+ readOnly: truecreateTime:allOf:- $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_time+ readOnly: trueupdateTime:allOf:- $ref: '#/components/schemas/google.protobuf.Timestamp'title: update_time+ readOnly: trueplan:type: stringtitle: plan@@ -14682,16 +14788,18 @@ components:- $ref: '#/components/schemas/bytebase.v1.ApprovalStatus'title: approval_statusdescription: The overall approval status for the issue.+ readOnly: trueaccessGrant:type: stringtitle: access_grantdescription: |-The access grant associated with this issue.Format: projects/{project}/accessGrants/{access_grant}+ readOnly: truedraft:type: booleantitle: draft- description: Whether this issue is a Draft Review Issue.+ description: (OPTIONAL) Whether this issue is a Draft Review Issue.title: IssueadditionalProperties: falsebytebase.v1.Issue.Approver:@@ -14802,21 +14910,24 @@ components:allOf:- $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_time+ readOnly: trueupdateTime:allOf:- $ref: '#/components/schemas/google.protobuf.Timestamp'title: update_time+ readOnly: truecreator:type: stringtitle: creatordescription: 'Format: users/{email}'+ readOnly: trueroot:type:- string- "null"title: rootdescription: |-- The thread root's name, set only on replies. Immutable after creation.+ (IMMUTABLE) The thread root's name, set only on replies. Immutable after creation.Format: projects/{project}/issues/{issue}/issueComments/{issueComment}Must name a thread root in the same issue, never a general comment or reply.threadState:@@ -14835,7 +14946,7 @@ components:- $ref: '#/components/schemas/bytebase.v1.StatementAnchor'title: statement_anchordescription: |-- Optional source context on a root or reply. A reply's anchor must share+ (IMMUTABLE) Optional source context on a root or reply. A reply's anchor must sharethe root's spec and sheet_sha256; it may narrow the range.Cannot be set on events. Immutable after creation.reviewMetadata:@@ -14845,6 +14956,7 @@ components:description: |-Present on review results, the comments the review executor posts.Never accepted on create or update.+ readOnly: truetitle: IssueCommentdescription: A comment on an issue.bytebase.v1.IssueComment.Approval:@@ -15014,6 +15126,7 @@ components:title: keytabformat: bytedescription: The keytab file contents for authentication.+ writeOnly: truekdcHost:type: stringtitle: kdc_host@@ -15131,6 +15244,8 @@ components:title: namedescription: 'Format: workspaces/{workspace}'title: LeaveWorkspaceRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.ListAccessGrantsRequest:type: object@@ -15194,6 +15309,8 @@ components:- order_by = "expire_time desc"- order_by = "expire_time asc, create_time desc"title: ListAccessGrantsRequest+ required:+ - parentadditionalProperties: falsebytebase.v1.ListAccessGrantsResponse:type: object@@ -15259,6 +15376,8 @@ components:status == "FAILED"has_schema_snapshot == true && create_time < "2024-01-02T00:00:00Z"title: ListChangelogsRequest+ required:+ - parentadditionalProperties: falsebytebase.v1.ListChangelogsResponse:type: object@@ -15292,6 +15411,8 @@ components:title: viewdescription: The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC.title: ListDatabaseGroupsRequest+ required:+ - parentadditionalProperties: falsedescription: Request message for listing database groups.bytebase.v1.ListDatabaseGroupsResponse:@@ -15386,6 +15507,8 @@ components:- order_by = "name desc"- order_by = "name desc, project asc"title: ListDatabasesRequest+ required:+ - parentadditionalProperties: falsebytebase.v1.ListDatabasesResponse:type: object@@ -15508,6 +15631,9 @@ components:title: instancedescription: The target instance. We need to set this field if the target instance is not created yet.title: ListInstanceDatabaseRequest+ required:+ - name+ - instanceadditionalProperties: falsebytebase.v1.ListInstanceDatabaseResponse:type: object@@ -15554,6 +15680,8 @@ components:title: refreshdescription: Refresh will refresh and return the latest data.title: ListInstanceRolesRequest+ required:+ - parentadditionalProperties: falsebytebase.v1.ListInstanceRolesResponse:type: object@@ -15709,6 +15837,8 @@ components:Root names must belong to parent. Empty and root == null return thetimeline (events and root comments); other filters return replies only.title: ListIssueCommentsRequest+ required:+ - parentadditionalProperties: falsebytebase.v1.ListIssueCommentsResponse:type: object@@ -15794,6 +15924,8 @@ components:- order_by = "create_time desc"- order_by = "update_time asc"title: ListIssuesRequest+ required:+ - parentadditionalProperties: falsebytebase.v1.ListIssuesResponse:type: object@@ -15862,6 +15994,8 @@ components:spec_type == "change_database_config"state == "ACTIVE"title: ListPlansRequest+ required:+ - parentadditionalProperties: falsebytebase.v1.ListPlansResponse:type: object@@ -15900,6 +16034,8 @@ components:title: show_deleteddescription: Show deleted policies if specified.title: ListPoliciesRequest+ required:+ - parentadditionalProperties: falsebytebase.v1.ListPoliciesResponse:type: object@@ -16027,6 +16163,8 @@ components:For example:creator == "users/{email}"title: ListQueryHistoriesRequest+ required:+ - parentadditionalProperties: falsebytebase.v1.ListQueryHistoriesResponse:type: object@@ -16037,6 +16175,7 @@ components:$ref: '#/components/schemas/bytebase.v1.QueryHistory'title: query_historiesdescription: The list of query histories.+ readOnly: truenextPageToken:type: stringtitle: next_page_token@@ -16054,6 +16193,8 @@ components:title: parentdescription: 'Format: projects/{project}'title: ListReleaseCategoriesRequest+ required:+ - parentadditionalProperties: falsebytebase.v1.ListReleaseCategoriesResponse:type: object@@ -16107,6 +16248,8 @@ components:For example:category == "webapp"title: ListReleasesRequest+ required:+ - parentadditionalProperties: falsebytebase.v1.ListReleasesResponse:type: object@@ -16171,6 +16314,8 @@ components:title: show_deleteddescription: Whether to include deleted revisions in the results.title: ListRevisionsRequest+ required:+ - parentadditionalProperties: falsebytebase.v1.ListRevisionsResponse:type: object@@ -16247,6 +16392,8 @@ components:update_time >= "2025-01-02T15:04:05Z07:00"task_type in ["DATABASE_MIGRATE", "DATABASE_CREATE"]title: ListRolloutsRequest+ required:+ - parentadditionalProperties: falsebytebase.v1.ListRolloutsResponse:type: object@@ -16310,6 +16457,8 @@ components:create time. Empty means `title` ascending. `resource_id` is alwaysappended as a final tiebreak so pages stay stable.title: ListSavedQueriesRequest+ required:+ - parentadditionalProperties: falsebytebase.v1.ListSavedQueriesResponse:type: object@@ -16441,6 +16590,8 @@ components:When paginating, all other parameters provided to `ListTaskRuns` must matchthe call that provided the page token.title: ListTaskRunsRequest+ required:+ - parentadditionalProperties: falsebytebase.v1.ListTaskRunsResponse:type: object@@ -17079,6 +17230,9 @@ components:Where it lands. A path like "a/b/c"; empty drops the `source_folder`prefix, promoting the folder's contents toward the root.title: MoveMySavedQueriesRequest+ required:+ - parent+ - sourceFolderadditionalProperties: falsebytebase.v1.MoveMySavedQueriesResponse:type: object@@ -17206,6 +17360,7 @@ components:description: |-The authorization endpoint of the OIDC provider.Should be fetched from the well-known configuration file of the OIDC provider.+ readOnly: truetitle: OIDCIdentityProviderConfigadditionalProperties: falsedescription: OIDCIdentityProviderConfig is the structure for OIDC identity provider config.@@ -17402,6 +17557,7 @@ components:The issue associated with the plan.Can be empty.Format: projects/{project}/issues/{issue}+ readOnly: truetitle:type: stringtitle: title@@ -17422,14 +17578,17 @@ components:type: stringtitle: creatordescription: 'Format: users/[email protected]'+ readOnly: truecreateTime:allOf:- $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_time+ readOnly: trueupdateTime:allOf:- $ref: '#/components/schemas/google.protobuf.Timestamp'title: update_time+ readOnly: trueplanCheckRunStatusCount:type: objecttitle: plan_check_run_status_count@@ -17444,10 +17603,12 @@ components:- WARNING- ERROR- RUNNING+ readOnly: truehasRollout:type: booleantitle: has_rolloutdescription: Whether the plan has started the rollout.+ readOnly: trueapprovalStatus:allOf:- $ref: '#/components/schemas/bytebase.v1.ApprovalStatus'@@ -17455,6 +17616,7 @@ components:description: |-The approval status of the linked issue.Unspecified when no linked issue exists or the linked issue is a draft.+ readOnly: truerolloutStageSummaries:type: arrayitems:@@ -17463,6 +17625,7 @@ components:description: |-Per-stage rollout status summary.Ordered by environment deployment order. Empty when no rollout exists.+ readOnly: trueissueStatus:allOf:- $ref: '#/components/schemas/bytebase.v1.IssueStatus'@@ -17470,6 +17633,7 @@ components:description: |-The lifecycle status of the linked issue.Unspecified when no linked issue exists.+ readOnly: truelastPlanEditor:type: stringtitle: last_plan_editor@@ -17477,6 +17641,7 @@ components:The user who last created or updated the Plan specs.Format: users/[email protected]. For legacy Plans without stored attribution,this falls back to the Plan creator.+ readOnly: truetitle: PlanadditionalProperties: falsebytebase.v1.Plan.ChangeDatabaseConfig:@@ -17526,31 +17691,34 @@ components:type: stringtitle: tabledescription: |-- table is the name of the table, if it is not empty, Bytebase should create a table after creating the database.+ (OPTIONAL) table is the name of the table, if it is not empty, Bytebase should create a table after creating the database.For example, in MongoDB, it only creates the database when we first store data in that database.characterSet:type: stringtitle: character_set- description: character_set is the character set of the database.+ description: (OPTIONAL) character_set is the character set of the database.collation:type: stringtitle: collation- description: collation is the collation of the database.+ description: (OPTIONAL) collation is the collation of the database.cluster:type: stringtitle: cluster- description: cluster is the cluster of the database. This is only applicable to ClickHouse for "ON CLUSTER <<cluster>>".+ description: (OPTIONAL) cluster is the cluster of the database. This is only applicable to ClickHouse for "ON CLUSTER <<cluster>>".owner:type: stringtitle: owner- description: owner is the owner of the database. This is only applicable to Postgres for "WITH OWNER <<owner>>".+ description: (OPTIONAL) owner is the owner of the database. This is only applicable to Postgres for "WITH OWNER <<owner>>".environment:type: stringtitle: environmentdescription: |-- The environment resource.+ (OPTIONAL) The environment resource.Format: environments/prod where prod is the environment resource ID.title: CreateDatabaseConfig+ required:+ - target+ - databaseadditionalProperties: falsebytebase.v1.Plan.RolloutStageSummary:type: object@@ -17645,6 +17813,7 @@ components:allOf:- $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_time+ readOnly: truetitle: PlanCheckRunadditionalProperties: falsebytebase.v1.PlanCheckRun.Result:@@ -17987,6 +18156,7 @@ components:- $ref: '#/components/schemas/bytebase.v1.PolicyResourceType'title: resource_typedescription: The resource type for the policy.+ readOnly: truetitle: Policybytebase.v1.PolicyDelta:type: object@@ -18064,6 +18234,8 @@ components:The project that owns the sample instance.Format: projects/{project}title: PrepareSampleProjectInstanceRequest+ required:+ - parentadditionalProperties: falsebytebase.v1.PreviewTaskRunRollbackRequest:type: object@@ -18073,6 +18245,8 @@ components:title: namedescription: 'Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}'title: PreviewTaskRunRollbackRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.PreviewTaskRunRollbackResponse:type: object@@ -18389,31 +18563,38 @@ components:description: |-The name for the query history.Format: projects/{project}/queryHistories/{id}+ readOnly: truedatabase:type: stringtitle: databasedescription: |-The database name to execute the query.Format: instances/{instance}/databases/{databaseName} or projects/{project}/instances/{instance}/databases/{databaseName}+ readOnly: truecreator:type: stringtitle: creator+ readOnly: truecreateTime:allOf:- $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_time+ readOnly: truestatement:type: stringtitle: statement+ readOnly: trueerror:type:- string- "null"title: error+ readOnly: trueduration:allOf:- $ref: '#/components/schemas/google.protobuf.Duration'title: duration+ readOnly: truetype:allOf:- $ref: '#/components/schemas/bytebase.v1.QueryHistory.Type'@@ -18517,6 +18698,8 @@ components:Container is the container name to execute the query against, used forCosmosDB only.title: QueryRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.QueryResponse:type: object@@ -18829,6 +19012,8 @@ components:maxLength: 260description: 'Format: users/{email}. Must be the caller''s own name.'title: RegenerateRecoveryCodesRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.RegenerateRecoveryCodesResponse:type: object@@ -18860,6 +19045,8 @@ components:title: commentdescription: The comment explaining the rejection decision.title: RejectIssueRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.Release:type: object@@ -18868,6 +19055,7 @@ components:type: stringtitle: namedescription: 'Format: projects/{project}/releases/{release}'+ readOnly: truecategory:type: stringtitle: category@@ -18889,15 +19077,18 @@ components:type: stringtitle: creatordescription: 'Format: users/[email protected]'+ readOnly: truecreateTime:allOf:- $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_time+ readOnly: truestate:allOf:- $ref: '#/components/schemas/bytebase.v1.State'title: statedescription: The lifecycle state of the release.+ readOnly: truetype:allOf:- $ref: '#/components/schemas/bytebase.v1.Release.Type'@@ -18930,10 +19121,12 @@ components:title: statementformat: bytedescription: The raw SQL statement content.+ writeOnly: truesheetSha256:type: stringtitle: sheet_sha256description: The SHA256 hash value of the sheet content or the statement.+ readOnly: truetitle: FileadditionalProperties: falsedescription: A SQL file in a release.@@ -18977,6 +19170,9 @@ components:Identified by data source ID.Only READ_ONLY data source can be removed.title: RemoveDataSourceRequest+ required:+ - name+ - dataSourceadditionalProperties: falsebytebase.v1.RemoveWebhookRequest:type: object@@ -18987,6 +19183,8 @@ components:title: webhookdescription: The webhook to remove. Identified by its url.title: RemoveWebhookRequest+ required:+ - webhookadditionalProperties: falsebytebase.v1.RequestIssueRequest:type: object@@ -19002,6 +19200,8 @@ components:title: commentdescription: The comment explaining the request.title: RequestIssueRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.RequestMetadata:type: object@@ -19052,6 +19252,8 @@ components:maxLength: 260description: 'Format: users/{email}. Must be the caller''s own name.'title: RequestReauthCodeRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.ResetPasswordRequest:type: object@@ -19084,25 +19286,30 @@ components:type: booleantitle: disallow_signupdescription: Whether self-service user signup is disabled.+ readOnly: truedisallowPasswordSignin:type: booleantitle: disallow_password_signindescription: Whether password sign-in is disabled for all end users.+ readOnly: truepasswordRestriction:allOf:- $ref: '#/components/schemas/bytebase.v1.WorkspaceProfileSetting.PasswordRestriction'title: password_restrictiondescription: Password complexity and restriction requirements.+ readOnly: trueallowEmailCodeSignin:type: booleantitle: allow_email_code_signindescription: Whether email + 6-digit code signin is enabled for this workspace.+ readOnly: truepasswordResetEnabled:type: booleantitle: password_reset_enableddescription: |-Whether password reset via email is available for this workspace.True when the workspace (or deployment) has an email setting configured.+ readOnly: truetitle: RestrictionadditionalProperties: falsebytebase.v1.RetryIssueApprovalRequest:@@ -19115,6 +19322,8 @@ components:The name of the issue whose approval-finding should be retried.Format: projects/{project}/issues/{issue}title: RetryIssueApprovalRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.ReviewAIPolicy:type: object@@ -19138,6 +19347,7 @@ components:description: |-The name of the SQL review config.Format: reviewConfigs/{reviewConfig}+ readOnly: truetitle:type: stringtitle: title@@ -19227,15 +19437,18 @@ components:- $ref: '#/components/schemas/bytebase.v1.ReviewRun.Type'title: typedescription: Derived from the name.+ readOnly: truestatus:allOf:- $ref: '#/components/schemas/bytebase.v1.ReviewRun.Status'title: status+ readOnly: truecreateTime:allOf:- $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_timedescription: When the current run was triggered. Reset on every re-run.+ readOnly: trueendTime:allOf:- $ref: '#/components/schemas/google.protobuf.Timestamp'@@ -19243,6 +19456,7 @@ components:description: |-When the run reached a terminal status. Unset while AVAILABLE orRUNNING.+ readOnly: trueerror:type: stringtitle: error@@ -19250,6 +19464,7 @@ components:Fatal execution error, set if and only if status is FAILED: the reviewfailed to execute (a platform problem, never the SQL — SQL problems arereview results on a DONE run).+ readOnly: truetitle: ReviewRunadditionalProperties: falsebytebase.v1.ReviewRun.Status:@@ -19289,17 +19504,20 @@ components:allOf:- $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_time+ readOnly: truedeleter:type: stringtitle: deleterdescription: |-Format: users/[email protected]Can be empty.+ readOnly: truedeleteTime:allOf:- $ref: '#/components/schemas/google.protobuf.Timestamp'title: delete_timedescription: Can be empty.+ readOnly: truefile:type: stringtitle: file@@ -19321,6 +19539,7 @@ components:type: stringtitle: sheet_sha256description: The SHA256 hash value of the sheet.+ readOnly: truetaskRun:type: stringtitle: task_run@@ -19353,6 +19572,8 @@ components:The name of the access grant to revoke.Format: projects/{project}/accessGrants/{access_grant}title: RevokeAccessGrantRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.RiskLevel:type: string@@ -19443,20 +19664,24 @@ components:description: |-The title of the rollout, inherited from the associated plan.This field is output only and cannot be directly set.+ readOnly: truestages:type: arrayitems:$ref: '#/components/schemas/bytebase.v1.Stage'title: stagesdescription: Stages and thus tasks of the rollout.+ readOnly: truecreateTime:allOf:- $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_time+ readOnly: trueupdateTime:allOf:- $ref: '#/components/schemas/google.protobuf.Timestamp'title: update_time+ readOnly: truetitle: RolloutadditionalProperties: falsebytebase.v1.RolloutPolicy:@@ -19485,6 +19710,8 @@ components:The workspace whose directory sync token is rotated.Format: workspaces/{workspace}title: RotateDirectorySyncTokenRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.RotateDirectorySyncTokenResponse:type: object@@ -19493,6 +19720,7 @@ components:type: stringtitle: tokendescription: The new token, in plaintext. This is the only time it is ever returned.+ readOnly: truetitle: RotateDirectorySyncTokenResponseadditionalProperties: falsebytebase.v1.RowValue:@@ -19715,6 +19943,8 @@ components:This should match the spec.id field in Plan.Spec.If not set, all specs in the plan will be used.title: RunPlanChecksRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.RunPlanChecksResponse:type: object@@ -19728,6 +19958,8 @@ components:title: namedescription: 'Format: projects/{project}/issues/{issue}/reviewRuns/{reviewRun}'title: RunReviewRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.SASLConfig:type: object@@ -20042,12 +20274,14 @@ components:type: booleantitle: availabledescription: Whether sample setup is currently available.+ readOnly: trueinstances:type: arrayitems:$ref: '#/components/schemas/bytebase.v1.SampleInfo.Instance'title: instancesdescription: The provisioned sample instances.+ readOnly: truetitle: SampleInfoadditionalProperties: falsedescription: SampleInfo describes sample setup availability and provisioned resources.@@ -20060,11 +20294,13 @@ components:description: |-The provisioned sample instance.Format: instances/{instance} or projects/{project}/instances/{instance}+ readOnly: trueexpireTime:allOf:- $ref: '#/components/schemas/google.protobuf.Timestamp'title: expire_timedescription: The time when the provisioned sample instance expires.+ readOnly: truetitle: InstanceadditionalProperties: falsedescription: Instance describes one provisioned sample instance.@@ -20075,12 +20311,13 @@ components:type: stringtitle: namedescription: |-- Server-generated.+ (IMMUTABLE) Server-generated.Format: projects/{project}/savedQueries/{savedQuery}project:type: stringtitle: projectdescription: 'Format: projects/{project}'+ readOnly: truedatabase:type: stringtitle: database@@ -20100,14 +20337,17 @@ components:description: |-The owner. Ownership does not transfer.Format: users/{email}+ readOnly: truecreateTime:allOf:- $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_time+ readOnly: trueupdateTime:allOf:- $ref: '#/components/schemas/google.protobuf.Timestamp'title: update_time+ readOnly: truecontent:type: stringtitle: content@@ -20120,10 +20360,12 @@ components:title: content_sizeformat: int64description: The full size of the content, which may exceed the `content` returned.+ readOnly: truestarred:type: booleantitle: starreddescription: Whether the calling user starred it.+ readOnly: truefolder:type: stringtitle: folder@@ -20132,6 +20374,10 @@ components:The folder holding this saved query. A path like "a/b/c"; empty meansunfiled.title: SavedQuery+ required:+ - name+ - title+ - contentadditionalProperties: falsebytebase.v1.SavedQueryBinding:type: object@@ -20153,6 +20399,9 @@ components:as the creator. Naming one under "user:" grants nothing rather thanfailing. Groups are stored as references, so membership stays live.title: SavedQueryBinding+ required:+ - level+ - membersadditionalProperties: falsedescription: Binds members to one access level on one saved query.bytebase.v1.SavedQueryBinding.Level:@@ -20369,6 +20618,8 @@ components:A page token, received from a previous `SearchLogs` call.Provide this to retrieve the subsequent page.title: SearchAuditLogsRequest+ required:+ - parentadditionalProperties: falsedescription: Request message for searching audit logs.bytebase.v1.SearchAuditLogsResponse:@@ -20443,6 +20694,8 @@ components:- order_by = "create_time desc"- order_by = "update_time asc"title: SearchIssuesRequest+ required:+ - parentadditionalProperties: falsebytebase.v1.SearchIssuesResponse:type: object@@ -20488,6 +20741,8 @@ components:title: order_bydescription: Check the order_by field in the ListAccessGrantsRequest message.title: SearchMyAccessGrantsRequest+ required:+ - parentadditionalProperties: falsebytebase.v1.SearchMyAccessGrantsResponse:type: object@@ -20638,6 +20893,8 @@ components:statement.contains("select")type == "QUERY" && statement.contains("select")title: SearchQueryHistoriesRequest+ required:+ - parentadditionalProperties: falsebytebase.v1.SearchQueryHistoriesResponse:type: object@@ -20648,6 +20905,7 @@ components:$ref: '#/components/schemas/bytebase.v1.QueryHistory'title: query_historiesdescription: The list of history.+ readOnly: truenextPageToken:type: stringtitle: next_page_token@@ -20705,6 +20963,8 @@ components:A page token from a previous SearchSavedQueries call. Keep every otherparameter the same as the call that returned it.title: SearchSavedQueriesRequest+ required:+ - parentadditionalProperties: falsebytebase.v1.SearchSavedQueriesResponse:type: object@@ -20737,6 +20997,8 @@ components:syntax as SearchSavedQueries.filter, except `title`. A folder is returnedwhen at least one saved query the caller can read matches.title: SearchSavedQueryFoldersRequest+ required:+ - parentadditionalProperties: falsebytebase.v1.SearchSavedQueryFoldersResponse:type: object@@ -20876,6 +21138,7 @@ components:description: |-The name of the service account.Format: serviceAccounts/{email}+ readOnly: truestate:allOf:- $ref: '#/components/schemas/bytebase.v1.State'@@ -20888,6 +21151,7 @@ components:The email of the service account.For workspace-level: {name}@service.bytebase.comFor project-level: {name}@{project-id}.service.bytebase.com+ readOnly: truetitle:type: stringtitle: title@@ -20897,11 +21161,13 @@ components:type: stringtitle: service_keydescription: The service key for authentication. Only returned on creation or key rotation.+ readOnly: truecreateTime:allOf:- $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_timedescription: The timestamp when the service account was created.+ readOnly: truetitle: ServiceAccountadditionalProperties: falsedescription: ServiceAccount represents an API integration account.@@ -20923,9 +21189,12 @@ components:type: stringtitle: etagdescription: |-- The current etag of the policy. Equivalent to setting `policy.etag`;+ (OPTIONAL) The current etag of the policy. Equivalent to setting `policy.etag`;supplying both with different values returns INVALID_ARGUMENT.title: SetIamPolicyRequest+ required:+ - resource+ - policyadditionalProperties: falsedescription: Request message for setting an IAM policy.bytebase.v1.SetSavedQueryPolicyRequest:@@ -20943,6 +21212,9 @@ components:The new policy, replacing the stored one in full. Empty `bindings` makesthe saved query private again.title: SetSavedQueryPolicyRequest+ required:+ - resource+ - policyadditionalProperties: falsebytebase.v1.Setting:type: object@@ -20951,7 +21223,7 @@ components:type: stringtitle: namedescription: |-- The resource name of the setting.+ (IDENTIFIER) The resource name of the setting.Format: settings/{setting}Example: "settings/SEMANTIC_TYPES"value:@@ -20960,6 +21232,8 @@ components:title: valuedescription: The configuration value of the setting.title: Setting+ required:+ - valueadditionalProperties: falsedescription: The schema of setting.bytebase.v1.Setting.SettingName:@@ -21093,7 +21367,7 @@ components:type: stringtitle: namedescription: |-- The name of the sheet resource.+ (IMMUTABLE) The name of the sheet resource.Format: projects/{project}/sheets/{sheet}The sheet ID is generated by the server on creation and cannot be changed.content:@@ -21109,7 +21383,11 @@ components:title: content_sizeformat: int64description: content_size is the full size of the content, may not match the size of the `content` field.+ readOnly: truetitle: Sheet+ required:+ - name+ - contentadditionalProperties: falsebytebase.v1.SignupRequest:type: object@@ -21176,6 +21454,7 @@ components:id is the environment id of the stage.e.g., "prod".Use "-" when the stage has no environment or deleted environment.+ readOnly: trueenvironment:type: stringtitle: environment@@ -21199,6 +21478,8 @@ components:maxLength: 260description: 'Format: users/{email}. Must be the caller''s own name.'title: StartMFAEnrollmentRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.StartMFAEnrollmentResponse:type: object@@ -21437,36 +21718,45 @@ components:allOf:- $ref: '#/components/schemas/bytebase.v1.PlanType'title: plan+ readOnly: trueseats:type: integertitle: seatsformat: int32+ readOnly: trueinstances:type: integertitle: instancesformat: int32+ readOnly: trueactiveInstances:type: integertitle: active_instancesformat: int32+ readOnly: trueexpiresTime:allOf:- $ref: '#/components/schemas/google.protobuf.Timestamp'title: expires_time+ readOnly: truetrialing:type: booleantitle: trialing+ readOnly: trueorgName:type: stringtitle: org_name+ readOnly: trueha:type: booleantitle: hadescription: Whether high availability (multiple replicas) is enabled.+ readOnly: trueetag:type: stringtitle: etagdescription: Etag for optimistic concurrency on purchase updates. Only set in SaaS mode.+ readOnly: truetitle: SubscriptionadditionalProperties: falsebytebase.v1.SwitchWorkspaceRequest:@@ -21516,6 +21806,8 @@ components:The name of the database to sync.Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}title: SyncDatabaseRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.SyncDatabaseResponse:type: object@@ -21547,6 +21839,8 @@ components:When full sync is enabled, all databases in the instance will be synchronized. Otherwise, onlythe instance metadata (such as the database list) and any newly discovered databases will be synced.title: SyncInstanceRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.SyncInstanceResponse:type: object@@ -21903,6 +22197,7 @@ components:description: |-The update_time is the update time of latest task run.If there are no task runs, it will be empty.+ readOnly: truerunTime:oneOf:- $ref: '#/components/schemas/google.protobuf.Timestamp'@@ -21911,6 +22206,7 @@ components:description: |-The run_time is the scheduled run time of latest task run.If there are no task runs or the task run is not scheduled, it will be empty.+ readOnly: truetitle: Taskbytebase.v1.Task.DatabaseCreate:type: object@@ -22047,10 +22343,12 @@ components:allOf:- $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_time+ readOnly: trueupdateTime:allOf:- $ref: '#/components/schemas/google.protobuf.Timestamp'title: update_time+ readOnly: truestatus:allOf:- $ref: '#/components/schemas/bytebase.v1.TaskRun.Status'@@ -22067,6 +22365,7 @@ components:- $ref: '#/components/schemas/google.protobuf.Timestamp'title: start_timedescription: The time when the task run started execution.+ readOnly: truehasPriorBackup:type: booleantitle: has_prior_backup@@ -22079,6 +22378,7 @@ components:- $ref: '#/components/schemas/bytebase.v1.TaskRun.SchedulerInfo'title: scheduler_infodescription: Scheduling information about the task run.+ readOnly: truerunTime:oneOf:- $ref: '#/components/schemas/google.protobuf.Timestamp'@@ -22087,6 +22387,7 @@ components:description: |-The task run should run after run_time.This can only be set when creating the task run calling BatchRunTasks.+ readOnly: truetitle: TaskRunadditionalProperties: falsebytebase.v1.TaskRun.SchedulerInfo:@@ -22665,6 +22966,10 @@ components:type: stringtitle: totitle: TestEmailSettingRequest+ required:+ - parent+ - emailSetting+ - toadditionalProperties: falsebytebase.v1.TestEmailSettingResponse:type: object@@ -22767,6 +23072,9 @@ components:so leave url empty and set name to test the one already stored; set url totest a url before saving it.title: TestWebhookRequest+ required:+ - project+ - webhookadditionalProperties: falsebytebase.v1.TestWebhookResponse:type: object@@ -22830,6 +23138,8 @@ components:The name of the deleted instance.Format: instances/{instance} or projects/{project}/instances/{instance}title: UndeleteInstanceRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.UndeleteProjectRequest:type: object@@ -22841,6 +23151,8 @@ components:The name of the deleted project.Format: projects/{project}title: UndeleteProjectRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.UndeleteReleaseRequest:type: object@@ -22852,6 +23164,8 @@ components:The name of the deleted release.Format: projects/{project}/releases/{release}title: UndeleteReleaseRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.UndeleteServiceAccountRequest:type: object@@ -22863,6 +23177,8 @@ components:The name of the deleted service account.Format: serviceAccounts/{email}title: UndeleteServiceAccountRequest+ required:+ - nameadditionalProperties: falsedescription: Request message for restoring a deleted service account.bytebase.v1.UndeleteUserRequest:@@ -22875,6 +23191,8 @@ components:The name of the deleted user.Format: users/{email}title: UndeleteUserRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.UndeleteWorkloadIdentityRequest:type: object@@ -22886,6 +23204,8 @@ components:The name of the deleted workload identity.Format: workloadIdentities/{email}title: UndeleteWorkloadIdentityRequest+ required:+ - nameadditionalProperties: falsedescription: Request message for restoring a deleted workload identity.bytebase.v1.UpdateDataSourceRequest:@@ -22918,6 +23238,9 @@ components:If set to true, and the data source is not found, a new data source will be created.In this situation, `update_mask` is ignored.title: UpdateDataSourceRequest+ required:+ - name+ - dataSourceadditionalProperties: falsebytebase.v1.UpdateDatabaseCatalogRequest:type: object@@ -22934,6 +23257,8 @@ components:is erased. There is no `update_mask` because `schemas` is a repeated field,and AIP-161 forbids addressing one element of one.title: UpdateDatabaseCatalogRequest+ required:+ - catalogadditionalProperties: falsedescription: Request message for updating a database catalog.bytebase.v1.UpdateDatabaseGroupRequest:@@ -22960,6 +23285,8 @@ components:If set to true, and the database group is not found, a new database group will be created.In this situation, `update_mask` is ignored.title: UpdateDatabaseGroupRequest+ required:+ - databaseGroupadditionalProperties: falsedescription: Request message for updating a database group.bytebase.v1.UpdateDatabaseRequest:@@ -22980,6 +23307,8 @@ components:title: update_maskdescription: The list of fields to update.title: UpdateDatabaseRequest+ required:+ - databaseadditionalProperties: falsebytebase.v1.UpdateEmailRequest:type: object@@ -22997,6 +23326,9 @@ components:maxLength: 254description: The new email address.title: UpdateEmailRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.UpdateGroupRequest:type: object@@ -23022,6 +23354,8 @@ components:If set to true, and the group is not found, a new group will be created.In this situation, `update_mask` is ignored.title: UpdateGroupRequest+ required:+ - groupadditionalProperties: falsedescription: Request message for updating a group.bytebase.v1.UpdateIdentityProviderRequest:@@ -23048,6 +23382,8 @@ components:If set to true, and the identity provider is not found, a new identity provider will be created.In this situation, `update_mask` is ignored.title: UpdateIdentityProviderRequest+ required:+ - identityProvideradditionalProperties: falsebytebase.v1.UpdateInstanceRequest:type: object@@ -23075,6 +23411,8 @@ components:the instance only under its encoded active, non-default project; it neverfalls back to a workspace instance.title: UpdateInstanceRequest+ required:+ - instanceadditionalProperties: falsebytebase.v1.UpdateIssueCommentRequest:type: object@@ -23102,6 +23440,9 @@ components:If set to true, and the issue comment is not found, a new issue comment will be created.In this situation, `update_mask` is ignored.title: UpdateIssueCommentRequest+ required:+ - parent+ - updateMaskadditionalProperties: falsebytebase.v1.UpdateIssueRequest:type: object@@ -23127,6 +23468,9 @@ components:If set to true, and the issue is not found, a new issue will be created.In this situation, `update_mask` is ignored.title: UpdateIssueRequest+ required:+ - issue+ - updateMaskadditionalProperties: falsebytebase.v1.UpdatePlanRequest:type: object@@ -23152,6 +23496,9 @@ components:If set to true, and the plan is not found, a new plan will be created.In this situation, `update_mask` is ignored.title: UpdatePlanRequest+ required:+ - plan+ - updateMaskadditionalProperties: falsebytebase.v1.UpdatePolicyRequest:type: object@@ -23179,6 +23526,8 @@ components:If set to true, and the policy is not found, a new policy will be created.In this situation, `update_mask` is ignored.title: UpdatePolicyRequest+ required:+ - policyadditionalProperties: falsebytebase.v1.UpdateProjectRequest:type: object@@ -23204,6 +23553,8 @@ components:If set to true, and the project is not found, a new project will be created.In this situation, `update_mask` is ignored.title: UpdateProjectRequest+ required:+ - projectadditionalProperties: falsebytebase.v1.UpdatePurchaseRequest:type: object@@ -23239,6 +23590,8 @@ components:title: update_maskdescription: The list of fields to be updated.title: UpdateReleaseRequest+ required:+ - releaseadditionalProperties: falsebytebase.v1.UpdateReviewConfigRequest:type: object@@ -23263,6 +23616,8 @@ components:If set to true, and the config is not found, a new config will be created.In this situation, `update_mask` is ignored.title: UpdateReviewConfigRequest+ required:+ - reviewConfigadditionalProperties: falsebytebase.v1.UpdateRoleRequest:type: object@@ -23284,6 +23639,8 @@ components:If set to true, and the role is not found, a new role will be created.In this situation, `update_mask` is ignored.title: UpdateRoleRequest+ required:+ - roleadditionalProperties: falsebytebase.v1.UpdateSavedQueryRequest:type: object@@ -23304,6 +23661,8 @@ components:`saved_query.title`). Supported: `title`, `content`, `database`, `folder`.At least one path is required.title: UpdateSavedQueryRequest+ required:+ - savedQueryadditionalProperties: falsebytebase.v1.UpdateSavedQueryStarRequest:type: object@@ -23317,6 +23676,8 @@ components:title: starreddescription: Whether the caller stars the saved query.title: UpdateSavedQueryStarRequest+ required:+ - nameadditionalProperties: falsebytebase.v1.UpdateServiceAccountRequest:type: object@@ -23338,6 +23699,8 @@ components:The list of fields to update.Supported fields: title, service_key (triggers key rotation)title: UpdateServiceAccountRequest+ required:+ - serviceAccountadditionalProperties: falsedescription: Request message for updating a service account.bytebase.v1.UpdateSettingRequest:@@ -23362,6 +23725,8 @@ components:- $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_masktitle: UpdateSettingRequest+ required:+ - settingadditionalProperties: falsedescription: The request message for updating or creating a setting.bytebase.v1.UpdateUserRequest:@@ -23388,6 +23753,8 @@ components:If set to true, and the user is not found, a new user will be created.In this situation, `update_mask` is ignored.title: UpdateUserRequest+ required:+ - useradditionalProperties: falsebytebase.v1.UpdateWebhookRequest:type: object@@ -23409,6 +23776,8 @@ components:If set to true, and the webhook is not found, a new webhook will be created.In this situation, `update_mask` is ignored.title: UpdateWebhookRequest+ required:+ - webhookadditionalProperties: falsebytebase.v1.UpdateWorkloadIdentityRequest:type: object@@ -23430,6 +23799,8 @@ components:The list of fields to update.Supported fields: title, workload_identity_configtitle: UpdateWorkloadIdentityRequest+ required:+ - workloadIdentityadditionalProperties: falsedescription: Request message for updating a workload identity.bytebase.v1.UpdateWorkspaceRequest:@@ -23444,6 +23815,8 @@ components:- $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_masktitle: UpdateWorkspaceRequest+ required:+ - workspaceadditionalProperties: falsebytebase.v1.UploadLicenseRequest:type: object@@ -23462,6 +23835,7 @@ components:description: |-The name of the user.Format: users/{email}+ readOnly: truestate:allOf:- $ref: '#/components/schemas/bytebase.v1.State'@@ -23483,12 +23857,14 @@ components:description: |The password for authentication. Only used during user creation or password updates.string.max_bytes = 72+ writeOnly: truemfaEnabled:type: booleantitle: mfa_enableddescription: |-Whether the user has a live MFA factor. Set by ConfirmRecoveryCodes andDisableMFA, never by an update.+ readOnly: truephone:type: stringtitle: phone@@ -23504,16 +23880,19 @@ components:type: arrayitems:type: string+ readOnly: truetitle: groupsdescription: |-The groups for the user.Format: groups/{email}+ readOnly: trueworkspace:type: stringtitle: workspacedescription: |-The current workspace.Format: workspaces/{id}+ readOnly: truetitle: UseradditionalProperties: falsebytebase.v1.User.Profile:@@ -23658,6 +24037,7 @@ components:Required to create a webhook. Not required on TestWebhook, where an emptyurl on a request that names a webhook means the one already stored, so thefield carries no REQUIRED behavior it would contradict there.+ writeOnly: trueurlSupportsDirectMessage:type: booleantitle: url_supports_direct_message@@ -23671,6 +24051,7 @@ components:Reads do not return the url, so a client editing a saved webhook cannotwork this out for itself. It is a fact about the stored url and saysnothing about what the url is.+ readOnly: truedirectMessage:type: booleantitle: direct_message@@ -23684,7 +24065,7 @@ components:$ref: '#/components/schemas/bytebase.v1.Activity.Type'title: notification_typesdescription: |-- notification_types is the list of activities types that the webhook is interested in.+ (UNORDERED_LIST) notification_types is the list of activities types that the webhook is interested in.Bytebase will only send notifications to the webhook if the activity type is in the list.It should not be empty, and should be a subset of the following:- ISSUE_CREATED@@ -23694,6 +24075,9 @@ components:- PIPELINE_FAILED- PIPELINE_COMPLETEDtitle: Webhook+ required:+ - type+ - titleadditionalProperties: falsebytebase.v1.WebhookType:type: string@@ -23718,6 +24102,7 @@ components:description: |-The name of the workload identity.Format: workloadIdentities/{email}+ readOnly: truestate:allOf:- $ref: '#/components/schemas/bytebase.v1.State'@@ -23730,6 +24115,7 @@ components:The email of the workload identity.For workspace-level: {name}@workload.bytebase.comFor project-level: {name}@{project-id}.workload.bytebase.com+ readOnly: truetitle:type: stringtitle: title@@ -23740,12 +24126,15 @@ components:- $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_timedescription: The timestamp when the workload identity was created.+ readOnly: trueworkloadIdentityConfig:allOf:- $ref: '#/components/schemas/bytebase.v1.WorkloadIdentityConfig'title: workload_identity_configdescription: The workload identity configuration for OIDC token validation.title: WorkloadIdentity+ required:+ - workloadIdentityConfigadditionalProperties: falsedescription: WorkloadIdentity represents an external CI/CD workload identity.bytebase.v1.WorkloadIdentityConfig:@@ -23785,6 +24174,11 @@ components:title: jwks_urldescription: Optional JWKS endpoint. When empty, use OIDC discovery from issuer_url.title: WorkloadIdentityConfig+ required:+ - providerType+ - issuerUrl+ - allowedAudiences+ - subjectPatternadditionalProperties: falsedescription: WorkloadIdentityConfig for API layerbytebase.v1.WorkloadIdentityConfig.ProviderType:@@ -24005,6 +24399,7 @@ components:Whether a directory sync token has been generated for this workspace.The token itself is never returned; this only lets the UI decide betweenoffering "generate" and "regenerate".+ readOnly: truetitle: WorkspaceProfileSettingadditionalProperties: falsebytebase.v1.WorkspaceProfileSetting.PasswordRestriction:@@ -24099,7 +24494,7 @@ components:description: 'A URL that acts as a globally unique identifier for the type of the serialized message. For example: `type.googleapis.com/google.rpc.ErrorInfo`.'value:type: string- format: binary+ format: bytedescription: The Protobuf message, serialized as bytes and base64-encoded. The specific message type is identified by the `type` field.debug:type: objectdiff --git a/backend/api/v1/actuator_service.go b/backend/api/v1/actuator_service.goindex bc85a99dd4..c1f5161e15 100644--- a/backend/api/v1/actuator_service.go+++ b/backend/api/v1/actuator_service.go@@ -96,6 +96,10 @@ func actuatorMCPSetting(ctx context.Context, reader mcpSettingsReader, workspacereturn convertToMCPSetting(mcpSetting)}+func actuatorAIEnabled(setting *storepb.AISetting, err error) bool {+ return err == nil && setting != nil && setting.Enabled+}+func (s *ActuatorService) getServerInfo(ctx context.Context, workspaceID string) (*v1pb.ActuatorInfo, error) {serverInfo := v1pb.ActuatorInfo{Version: s.profile.Version,@@ -111,6 +115,11 @@ func (s *ActuatorService) getServerInfo(ctx context.Context, workspaceID string)if workspaceID != "" {serverInfo.Workspace = common.FormatWorkspace(workspaceID)serverInfo.McpSetting = actuatorMCPSetting(ctx, s.store, workspaceID)+ aiSetting, err := s.store.GetAISetting(ctx, workspaceID)+ if err != nil {+ slog.Error("failed to read the AI setting", slog.String("workspace", workspaceID), log.BBError(err))+ }+ serverInfo.AiEnabled = actuatorAIEnabled(aiSetting, err)if s.sampleManager != nil {serverInfo.Sample.Available = s.sampleManager.CheckAvailable(ctx) == nilinstances, err := s.sampleManager.ListInstances(ctx, workspaceID)diff --git a/backend/api/v1/actuator_service_test.go b/backend/api/v1/actuator_service_test.goindex fee9f94fbe..9b0fb68172 100644--- a/backend/api/v1/actuator_service_test.go+++ b/backend/api/v1/actuator_service_test.go@@ -68,3 +68,21 @@ func TestActuatorMCPSetting(t *testing.T) {})}}++func TestActuatorAIEnabled(t *testing.T) {+ for _, tc := range []struct {+ name string+ setting *storepb.AISetting+ err error+ want bool+ }{+ {name: "absent setting"},+ {name: "disabled setting", setting: &storepb.AISetting{}},+ {name: "enabled setting", setting: &storepb.AISetting{Enabled: true}, want: true},+ {name: "unreadable setting", setting: &storepb.AISetting{Enabled: true}, err: errors.New("read failed")},+ } {+ t.Run(tc.name, func(t *testing.T) {+ require.Equal(t, tc.want, actuatorAIEnabled(tc.setting, tc.err))+ })+ }+}diff --git a/backend/generated-go/v1/actuator_service.pb.go b/backend/generated-go/v1/actuator_service.pb.goindex a2825ae92a..0ae5f8a3ee 100644--- a/backend/generated-go/v1/actuator_service.pb.go+++ b/backend/generated-go/v1/actuator_service.pb.go@@ -152,7 +152,9 @@ type ActuatorInfo struct {// Sample setup availability and provisioned resources.Sample *SampleInfo `protobuf:"bytes,29,opt,name=sample,proto3" json:"sample,omitempty"`// The MCP (Model Context Protocol) setting in the current workspace.- McpSetting *MCPSetting `protobuf:"bytes,30,opt,name=mcp_setting,json=mcpSetting,proto3" json:"mcp_setting,omitempty"`+ McpSetting *MCPSetting `protobuf:"bytes,30,opt,name=mcp_setting,json=mcpSetting,proto3" json:"mcp_setting,omitempty"`+ // Whether the workspace AI setting enables the AI agent.+ AiEnabled bool `protobuf:"varint,31,opt,name=ai_enabled,json=aiEnabled,proto3" json:"ai_enabled,omitempty"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache}@@ -299,6 +301,13 @@ func (x *ActuatorInfo) GetMcpSetting() *MCPSetting {return nil}+func (x *ActuatorInfo) GetAiEnabled() bool {+ if x != nil {+ return x.AiEnabled+ }+ return false+}+// Instance describes one provisioned sample instance.type SampleInfo_Instance struct {state protoimpl.MessageState `protogen:"open.v1"`@@ -369,7 +378,7 @@ const file_v1_actuator_service_proto_rawDesc = "" +"\binstance\x18\x01 \x01(\tB\x1d\xe0A\x03\xfaA\x17\n" +"\x15bytebase.com/InstanceR\binstance\x12@\n" +"\vexpire_time\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" +- "expireTime\"\xd1\x06\n" ++ "expireTime\"\xf5\x06\n" +"\fActuatorInfo\x12\x1d\n" +"\aversion\x18\x01 \x01(\tB\x03\xe0A\x03R\aversion\x12\"\n" +"\n" +@@ -388,7 +397,9 @@ const file_v1_actuator_service_proto_rawDesc = "" +"\x15active_vcs_user_count\x18\x1c \x01(\x05B\x03\xe0A\x03R\x12activeVcsUserCount\x124\n" +"\x06sample\x18\x1d \x01(\v2\x17.bytebase.v1.SampleInfoB\x03\xe0A\x03R\x06sample\x12=\n" +"\vmcp_setting\x18\x1e \x01(\v2\x17.bytebase.v1.MCPSettingB\x03\xe0A\x03R\n" +- "mcpSettingJ\x04\b\x03\x10\x04J\x04\b\x05\x10\bJ\x04\b\t\x10\n" ++ "mcpSetting\x12\"\n" ++ "\n" ++ "ai_enabled\x18\x1f \x01(\bB\x03\xe0A\x03R\taiEnabledJ\x04\b\x03\x10\x04J\x04\b\x05\x10\bJ\x04\b\t\x10\n" +"J\x04\b\n" +"\x10\vJ\x04\b\f\x10\rJ\x04\b\x0e\x10\x0fJ\x04\b\x10\x10\x14J\x04\b\x16\x10\x17J\x04\b\x19\x10\x1a2\x86\x01\n" +"\x0fActuatorService\x12s\n" +diff --git a/backend/generated-go/v1/actuator_service_equal.pb.go b/backend/generated-go/v1/actuator_service_equal.pb.goindex b81ab5253e..8834faf945 100644--- a/backend/generated-go/v1/actuator_service_equal.pb.go+++ b/backend/generated-go/v1/actuator_service_equal.pb.go@@ -110,5 +110,8 @@ func (x *ActuatorInfo) Equal(y *ActuatorInfo) bool {if !x.McpSetting.Equal(y.McpSetting) {return false}+ if x.AiEnabled != y.AiEnabled {+ return false+ }return true}diff --git a/frontend/src/app/router/index.test.tsx b/frontend/src/app/router/index.test.tsxindex a6b583511a..5d69a9411f 100644--- a/frontend/src/app/router/index.test.tsx+++ b/frontend/src/app/router/index.test.tsx@@ -4,6 +4,7 @@ import { createMemoryRouter, Outlet } from "react-router";import { RouterProvider } from "react-router/dom";import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";import {+ PROJECT_V1_ROUTE_DETAIL,PROJECT_V1_ROUTE_WEBHOOK_CREATE,PROJECT_V1_ROUTE_WEBHOOK_DETAIL,PROJECT_V1_ROUTE_WEBHOOKS,@@ -82,7 +83,7 @@ const registerRouterOnWebhooksPage = () => {},matches: [{- handle: { name: PROJECT_V1_ROUTE_WEBHOOKS },+ route: { handle: { name: PROJECT_V1_ROUTE_WEBHOOKS } },params: { projectId: "project-sample" },},],@@ -192,6 +193,24 @@ describe("useCurrentRoute with real router context", () => {describe("router.currentRoute snapshot stability", () => {beforeEach(registerRouterOnWebhooksPage);+ test("reads the named index route from data-router matches", () => {+ const memoryRouter = createMemoryRouter(+ [+ {+ path: "/projects/:projectId",+ children: [{ index: true, handle: { name: PROJECT_V1_ROUTE_DETAIL } }],+ },+ ],+ { initialEntries: ["/projects/project-sample"] }+ );+ setAppRouter(memoryRouter);++ expect(router.currentRoute.value).toMatchObject({+ name: PROJECT_V1_ROUTE_DETAIL,+ params: { projectId: "project-sample" },+ });+ });+test("returns a referentially stable object across reads without navigation", () => {const a = router.currentRoute.value;const b = router.currentRoute.value;diff --git a/frontend/src/app/router/index.ts b/frontend/src/app/router/index.tsindex be2d01f28a..a528812955 100644--- a/frontend/src/app/router/index.ts+++ b/frontend/src/app/router/index.ts@@ -210,7 +210,11 @@ function currentRouteSnapshot(): ReactRoute {string,string | string[] | undefined>;- const next = assembleRoute(location, matches, leafParams);+ const next = assembleRoute(+ location,+ matches.map((match) => ({ handle: match.route.handle })),+ leafParams+ );if (!currentRouteCache ||currentRouteCache.fullPath !== next.fullPath ||diff --git a/frontend/src/app/router/navigation.ts b/frontend/src/app/router/navigation.tsindex 22665902f3..de72a4b457 100644--- a/frontend/src/app/router/navigation.ts+++ b/frontend/src/app/router/navigation.ts@@ -1,7 +1,7 @@// Structural type for the createBrowserRouter instance (avoids depending on// @remix-run/router's exported name across react-router versions).export type RouterMatch = {- handle?: unknown;+ route: { handle?: unknown };params: Record<string, string | undefined>;};export type RouterLocation = { pathname: string; search: string; hash: string };diff --git a/frontend/src/app/router/routes.test.tsx b/frontend/src/app/router/routes.test.tsxindex 7eba5a4372..51117584bb 100644--- a/frontend/src/app/router/routes.test.tsx+++ b/frontend/src/app/router/routes.test.tsx@@ -1,6 +1,8 @@import { matchRoutes, type RouteObject } from "react-router";import { describe, expect, it } from "vitest";import {+ PROJECT_V1_ROUTE_DETAIL,+ PROJECT_V1_ROUTE_ISSUES,PROJECT_V1_ROUTE_PLAN_DETAIL_SPECS,WORKSPACE_ROUTE_404,WORKSPACE_ROUTE_MCP,@@ -100,6 +102,26 @@ describe("MCP integration route", () => {});describe("react route table reachability", () => {+ it("renders Project Home at the project root while preserving the Issues route", () => {+ const home = matchRoutes(routes, "/projects/orders")?.at(-1)?.route;+ const issues = matchRoutes(routes, "/projects/orders/issues")?.at(-1)?.route;+ expect((home?.handle as { name?: string })?.name).toBe(+ PROJECT_V1_ROUTE_DETAIL+ );+ expect(home?.lazy).toBeTypeOf("function");+ expect(home?.element).toBeUndefined();+ const homeMatches = matchRoutes(routes, "/projects/orders") ?? [];+ const homeRoute = buildReactRoute(+ { pathname: "/projects/orders", search: "", hash: "" },+ homeMatches.map((match) => ({ handle: match.route.handle })),+ { projectId: "orders" }+ );+ expect(homeRoute.requiredPermissions).toEqual(["bb.projects.get"]);+ expect((issues?.handle as { name?: string })?.name).toBe(+ PROJECT_V1_ROUTE_ISSUES+ );+ });+it("marks SQL Editor layout leaves with an explicit null element", () => {const children = sqlEditorRoutes[0].children ?? [];diff --git a/frontend/src/app/router/routes/dashboard.tsx b/frontend/src/app/router/routes/dashboard.tsxindex d74484ae00..6c35a6ddc5 100644--- a/frontend/src/app/router/routes/dashboard.tsx+++ b/frontend/src/app/router/routes/dashboard.tsx@@ -1,4 +1,4 @@-import { Navigate, type RouteObject, redirect } from "react-router";+import { type RouteObject, redirect } from "react-router";import { BodyLayout } from "@/app/layouts/BodyLayout";import { DashboardLayout } from "@/app/layouts/DashboardLayout";import { RouteErrorPage } from "@/app/RouteErrorPage";@@ -573,9 +573,10 @@ const projectV1Routes: RouteObject[] = [{index: true,handle: { name: PROJECT_V1_ROUTE_DETAIL },- // The project root has no page of its own — redirect to the Issues- // tab. `issues` is relative to the parent `projects/:projectId`.- element: <Navigate to="issues" replace />,+ lazy: lazyPage(+ () => import("@/routes/project/ProjectHomePage"),+ (m) => m.ProjectHomePage+ ),},{path: "instances/new",diff --git a/frontend/src/components/IssueStatusIcon.test.tsx b/frontend/src/components/IssueStatusIcon.test.tsxnew file mode 100644index 0000000000..1ec317220e--- /dev/null+++ b/frontend/src/components/IssueStatusIcon.test.tsx@@ -0,0 +1,16 @@+import { render } from "@testing-library/react";+import { describe, expect, test } from "vitest";+import { IssueStatus } from "@/types/proto-es/v1/common_pb";+import { IssueStatusIcon } from "./IssueStatusIcon";++describe("IssueStatusIcon", () => {+ test("uses Lucide glyphs for completed and canceled issues", () => {+ const { container, rerender } = render(+ <IssueStatusIcon status={IssueStatus.DONE} />+ );+ expect(container.querySelector(".lucide-check")).not.toBeNull();++ rerender(<IssueStatusIcon status={IssueStatus.CANCELED} />);+ expect(container.querySelector(".lucide-minus")).not.toBeNull();+ });+});diff --git a/frontend/src/components/IssueStatusIcon.tsx b/frontend/src/components/IssueStatusIcon.tsxnew file mode 100644index 0000000000..3af201c703--- /dev/null+++ b/frontend/src/components/IssueStatusIcon.tsx@@ -0,0 +1,36 @@+import { Check, Minus } from "lucide-react";+import { IssueStatus } from "@/types/proto-es/v1/common_pb";++export function IssueStatusIcon({ status }: { status: IssueStatus }) {+ switch (status) {+ case IssueStatus.OPEN:+ return (+ <span+ data-slot="issue-status-icon"+ className="flex items-center justify-center rounded-full size-5 bg-background border-2 border-info text-info shrink-0"+ >+ <span className="h-1.5 w-1.5 bg-info rounded-full" />+ </span>+ );+ case IssueStatus.DONE:+ return (+ <span+ data-slot="issue-status-icon"+ className="flex items-center justify-center rounded-full size-5 bg-success text-accent-text shrink-0"+ >+ <Check className="size-4" aria-hidden="true" />+ </span>+ );+ case IssueStatus.CANCELED:+ return (+ <span+ data-slot="issue-status-icon"+ className="flex items-center justify-center rounded-full size-5 bg-background border-2 text-control-placeholder border-control-placeholder shrink-0"+ >+ <Minus className="size-4" aria-hidden="true" />+ </span>+ );+ default:+ return null;+ }+}diff --git a/frontend/src/components/IssueTable.test.tsx b/frontend/src/components/IssueTable.test.tsxindex 66532e3f7e..d9b89f4324 100644--- a/frontend/src/components/IssueTable.test.tsx+++ b/frontend/src/components/IssueTable.test.tsx@@ -123,6 +123,9 @@ describe("IssueListItem", () => {onOpenIssue={onOpenIssue}/>);+ expect(+ screen.getByTestId("issue-list-item").querySelector("[data-slot='issue-status-icon']")+ ).toBeTruthy();fireEvent.click(screen.getByTestId("issue-list-item"));expect(onOpenIssue).toHaveBeenCalledOnce();diff --git a/frontend/src/components/IssueTable.tsx b/frontend/src/components/IssueTable.tsxindex 7d90d95c30..34f3900ed7 100644--- a/frontend/src/components/IssueTable.tsx+++ b/frontend/src/components/IssueTable.tsx@@ -14,6 +14,7 @@ import {} from "@/components/AdvancedSearch";import { HighlightLabelText } from "@/components/HighlightLabelText";import { HumanizeTs } from "@/components/HumanizeTs";+import { IssueStatusIcon } from "@/components/IssueStatusIcon";import { RouterLink } from "@/components/RouterLink";import { SelectionActionBar } from "@/components/SelectionActionBar";import { TimeRangePicker } from "@/components/TimeRangePicker";@@ -828,47 +829,6 @@ export const IssueListItem = memo(function IssueListItem({);});-// ===========================================================================-// IssueStatusIcon-// ===========================================================================--export function IssueStatusIcon({ status }: { status: IssueStatus }) {- switch (status) {- case IssueStatus.OPEN:- return (- <span className="flex items-center justify-center rounded-full size-5 bg-background border-2 border-info text-info shrink-0">- <span className="h-1.5 w-1.5 bg-info rounded-full" />- </span>- );- case IssueStatus.DONE:- return (- <span className="flex items-center justify-center rounded-full size-5 bg-success text-accent-text shrink-0">- <svg className="size-4" fill="currentColor" viewBox="0 0 20 20">- <path- fillRule="evenodd"- d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z"- clipRule="evenodd"- />- </svg>- </span>- );- case IssueStatus.CANCELED:- return (- <span className="flex items-center justify-center rounded-full size-5 bg-background border-2 text-control-placeholder border-control-placeholder shrink-0">- <svg className="size-5" fill="currentColor" viewBox="0 0 20 20">- <path- fillRule="evenodd"- d="M3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"- clipRule="evenodd"- />- </svg>- </span>- );- default:- return null;- }-}-// ===========================================================================// RiskLevelIcon// ===========================================================================diff --git a/frontend/src/components/ProjectSidebar.test.tsx b/frontend/src/components/ProjectSidebar.test.tsxindex aa8c4da8c6..4e0b7f1939 100644--- a/frontend/src/components/ProjectSidebar.test.tsx+++ b/frontend/src/components/ProjectSidebar.test.tsx@@ -38,6 +38,7 @@ const t = vi.hoisted("common.database": "Database","common.databases": "Databases","common.groups": "Groups",+ "common.home": "Home","common.issues": "Issues","common.instances": "Instances","common.manage": "Manage",@@ -139,6 +140,23 @@ beforeEach(async () => {});describe("ProjectSidebar", () => {+ test("shows Home as the active root route, including for the default project", () => {+ mocks.defaultProject = "projects/sample";+ mocks.currentRoute.name = "workspace.project.detail";+ const { container, render, unmount } = renderIntoContainer(+ <ProjectSidebar />+ );+ render();++ const home = Array.from(container.querySelectorAll("a")).find(+ (link) => link.textContent?.trim() === "Home"+ );+ expect(home?.className).toContain("router-link-active");+ expect(home?.getAttribute("href")).toContain("workspace.project.detail");++ unmount();+ });+test("renders project instances before databases", () => {const { container, render, unmount } = renderIntoContainer(<ProjectSidebar />diff --git a/frontend/src/components/ProjectSidebar.tsx b/frontend/src/components/ProjectSidebar.tsxindex 77125cbfc6..e5114def03 100644--- a/frontend/src/components/ProjectSidebar.tsx+++ b/frontend/src/components/ProjectSidebar.tsx@@ -3,6 +3,7 @@ import {ChevronRight,CircleDot,Database,+ House,Settings,ShieldCheck,Users,@@ -17,6 +18,7 @@ import {PROJECT_V1_ROUTE_AUDIT_LOGS,PROJECT_V1_ROUTE_DATABASE_GROUPS,PROJECT_V1_ROUTE_DATABASES,+ PROJECT_V1_ROUTE_DETAIL,PROJECT_V1_ROUTE_GITOPS,PROJECT_V1_ROUTE_INSTANCES,PROJECT_V1_ROUTE_ISSUES,@@ -83,6 +85,12 @@ function useSidebarItems(): SidebarItem[] {return useMemo((): SidebarItem[] => [+ {+ title: t("common.home"),+ path: PROJECT_V1_ROUTE_DETAIL,+ icon: House,+ type: "div",+ },{title: t("common.issues"),path: PROJECT_V1_ROUTE_ISSUES,diff --git a/frontend/src/components/database/TransferProjectSheet.test.tsx b/frontend/src/components/database/TransferProjectSheet.test.tsxnew file mode 100644index 0000000000..8f3a561e1d--- /dev/null+++ b/frontend/src/components/database/TransferProjectSheet.test.tsx@@ -0,0 +1,50 @@+import { render, screen } from "@testing-library/react";+import type { ReactNode } from "react";+import { describe, expect, test, vi } from "vitest";++vi.mock("react-i18next", () => ({+ useTranslation: () => ({ t: (key: string) => key }),+}));+vi.mock("@/components/database", () => ({+ DatabaseTableView: () => null,+}));+vi.mock("@/components/ProjectSelect", () => ({+ ProjectSelect: ({ value }: { value: string }) => (+ <div data-testid="project-select" data-value={value} />+ ),+}));+vi.mock("@/components/ui/radio-group", () => ({+ RadioGroup: ({ children }: { children: ReactNode }) => <div>{children}</div>,+ RadioGroupItem: ({ children }: { children: ReactNode }) => <div>{children}</div>,+}));+vi.mock("@/components/ui/sheet", () => ({+ Sheet: ({ children }: { children: ReactNode }) => <div>{children}</div>,+ SheetContent: ({ children }: { children: ReactNode }) => <div>{children}</div>,+ SheetHeader: ({ children }: { children: ReactNode }) => <div>{children}</div>,+ SheetTitle: ({ children }: { children: ReactNode }) => <div>{children}</div>,+ SheetBody: ({ children }: { children: ReactNode }) => <div>{children}</div>,+ SheetFooter: ({ children }: { children: ReactNode }) => <div>{children}</div>,+}));+vi.mock("@/stores/app", () => ({+ useAppStore: (selector: (state: { serverInfo: { defaultProject: string } }) => unknown) =>+ selector({ serverInfo: { defaultProject: "projects/default" } }),+}));++import { TransferProjectSheet } from "./TransferProjectSheet";++describe("TransferProjectSheet", () => {+ test("prefills the destination supplied by Project Home", () => {+ render(+ <TransferProjectSheet+ open+ databases={[]}+ initialProjectName="projects/orders"+ onClose={() => {}}+ onTransfer={vi.fn()}+ />+ );++ expect(screen.getByTestId("project-select").getAttribute("data-value"))+ .toBe("projects/orders");+ });+});diff --git a/frontend/src/components/database/TransferProjectSheet.tsx b/frontend/src/components/database/TransferProjectSheet.tsxindex a1d71d2350..6954a7fc58 100644--- a/frontend/src/components/database/TransferProjectSheet.tsx+++ b/frontend/src/components/database/TransferProjectSheet.tsx@@ -18,11 +18,13 @@ import type { Database } from "@/types/proto-es/v1/database_service_pb";export function TransferProjectSheet({open,databases,+ initialProjectName,onClose,onTransfer,}: {open: boolean;databases: Database[];+ initialProjectName?: string;onClose: () => void;onTransfer: (projectName: string) => Promise<void>;}) {@@ -31,16 +33,18 @@ export function TransferProjectSheet({(s) => s.serverInfo?.defaultProject ?? "");const [mode, setMode] = useState<"project" | "unassign">("project");- const [selectedProject, setSelectedProject] = useState("");+ const [selectedProject, setSelectedProject] = useState(+ initialProjectName ?? ""+ );const [transferring, setTransferring] = useState(false);useEffect(() => {if (open) {setMode("project");- setSelectedProject("");+ setSelectedProject(initialProjectName ?? "");setTransferring(false);}- }, [open]);+ }, [initialProjectName, open]);return (<Sheet open={open} onOpenChange={(next) => !next && onClose()}>diff --git a/frontend/src/components/header/HeaderBreadcrumb.test.tsx b/frontend/src/components/header/HeaderBreadcrumb.test.tsxindex 069d8e0e5e..5b863621cf 100644--- a/frontend/src/components/header/HeaderBreadcrumb.test.tsx+++ b/frontend/src/components/header/HeaderBreadcrumb.test.tsx@@ -3,7 +3,7 @@ import { cloneElement, createContext, useContext } from "react";import { act } from "react";import { createRoot } from "react-dom/client";import { beforeEach, describe, expect, test, vi } from "vitest";-import { PROJECT_V1_ROUTE_ISSUES } from "@/app/router/handles";+import { PROJECT_V1_ROUTE_DETAIL } from "@/app/router/handles";(globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }@@ -188,7 +188,7 @@ beforeEach(async () => {});describe("HeaderBreadcrumb", () => {- test("opens project switcher only from the chevron and links title to project issues", () => {+ test("opens project switcher only from the chevron and links title to project home", () => {const { container, render, unmount } = renderIntoContainer(<HeaderBreadcrumb />);@@ -196,7 +196,7 @@ describe("HeaderBreadcrumb", () => {render();const projectLink = container.querySelector<HTMLAnchorElement>(- `a[data-route-name="${PROJECT_V1_ROUTE_ISSUES}"]`+ `a[data-route-name="${PROJECT_V1_ROUTE_DETAIL}"]`);expect(projectLink).not.toBeNull();expect(projectLink?.textContent).toContain("Recent Project");@@ -254,7 +254,7 @@ describe("HeaderBreadcrumb", () => {render();expect(- container.querySelector(`a[data-route-name="${PROJECT_V1_ROUTE_ISSUES}"]`)+ container.querySelector(`a[data-route-name="${PROJECT_V1_ROUTE_DETAIL}"]`)).toBeNull();const projectButton = Array.from(container.querySelectorAll("button")).find((button) => button.textContent?.includes("Recent Project")diff --git a/frontend/src/components/header/HeaderBreadcrumb.tsx b/frontend/src/components/header/HeaderBreadcrumb.tsxindex b835e559b1..27bb952697 100644--- a/frontend/src/components/header/HeaderBreadcrumb.tsx+++ b/frontend/src/components/header/HeaderBreadcrumb.tsx@@ -11,7 +11,7 @@ import {useNavigate,WORKSPACE_ROUTE_LANDING,} from "@/app/router";-import { PROJECT_V1_ROUTE_ISSUES } from "@/app/router/handles";+import { PROJECT_V1_ROUTE_DETAIL } from "@/app/router/handles";import { RouterLink } from "@/components/RouterLink";import { Badge } from "@/components/ui/badge";import { Button } from "@/components/ui/button";@@ -276,12 +276,12 @@ export function ProjectSegment({) : (<RouterLinkto={{- name: PROJECT_V1_ROUTE_ISSUES,+ name: PROJECT_V1_ROUTE_DETAIL,params: { projectId },}}onClick={() => {const resolvedRoute = navigate.resolve({- name: PROJECT_V1_ROUTE_ISSUES,+ name: PROJECT_V1_ROUTE_DETAIL,params: { projectId },});record(resolvedRoute.fullPath);diff --git a/frontend/src/components/header/ProjectCreateDialog.test.tsx b/frontend/src/components/header/ProjectCreateDialog.test.tsxnew file mode 100644index 0000000000..dee605fe60--- /dev/null+++ b/frontend/src/components/header/ProjectCreateDialog.test.tsx@@ -0,0 +1,90 @@+import type { ReactNode } from "react";+import { fireEvent, render, screen, waitFor } from "@testing-library/react";+import { beforeEach, describe, expect, test, vi } from "vitest";++const mocks = vi.hoisted(() => ({+ createProject: vi.fn(),+ navigatePush: vi.fn(),+ notify: vi.fn(),+ onClose: vi.fn(),+ setRecentProject: vi.fn(),+}));++vi.mock("react-i18next", async (importOriginal) => ({+ ...(await importOriginal<typeof import("react-i18next")>()),+ useTranslation: () => ({ t: (key: string) => key }),+}));+vi.mock("@/app/router", () => ({+ useNavigate: () => ({ push: mocks.navigatePush }),+}));+vi.mock("@/hooks/useAppState", () => ({+ isConnectAlreadyExists: () => false,+ useCreateProject: () => ({+ createProject: mocks.createProject,+ setRecentProject: mocks.setRecentProject,+ }),+ useNotify: () => mocks.notify,+ useWorkspacePermission: () => true,+}));+vi.mock("@/stores/app", () => ({+ useAppStore: { getState: () => ({ fetchProject: vi.fn() }) },+}));+vi.mock("@/components/ResourceIdField", () => ({+ ResourceIdField: ({+ onChange,+ onValidationChange,+ }: {+ onChange: (value: string) => void;+ onValidationChange: (valid: boolean) => void;+ }) => (+ <button+ type="button"+ onClick={() => {+ onChange("new-project");+ onValidationChange(true);+ }}+ >+ set-resource-id+ </button>+ ),+}));+vi.mock("@/components/ui/sheet", () => ({+ Sheet: ({ open, children }: { open: boolean; children: ReactNode }) =>+ open ? <div>{children}</div> : null,+ SheetBody: ({ children }: { children: ReactNode }) => <div>{children}</div>,+ SheetContent: ({ children }: { children: ReactNode }) => <div>{children}</div>,+ SheetFooter: ({ children }: { children: ReactNode }) => <div>{children}</div>,+ SheetHeader: ({ children }: { children: ReactNode }) => <div>{children}</div>,+ SheetTitle: ({ children }: { children: ReactNode }) => <div>{children}</div>,+}));++import { ProjectCreateDialog } from "./ProjectCreateDialog";++beforeEach(() => {+ vi.clearAllMocks();+ mocks.createProject.mockResolvedValue({+ name: "projects/new-project",+ title: "New project",+ });+});++describe("ProjectCreateDialog", () => {+ test("opens the new project's Home after creation", async () => {+ render(<ProjectCreateDialog open onClose={mocks.onClose} />);+ fireEvent.click(screen.getByRole("button", { name: "set-resource-id" }));+ await waitFor(() =>+ expect(screen.getByRole("button", { name: "common.create" }).hasAttribute("disabled")).toBe(false)+ );++ fireEvent.click(screen.getByRole("button", { name: "common.create" }));++ await waitFor(() =>+ expect(mocks.navigatePush).toHaveBeenCalledWith({+ name: "workspace.project.detail",+ params: { projectId: "new-project" },+ })+ );+ expect(mocks.setRecentProject).toHaveBeenCalledWith("projects/new-project");+ expect(mocks.onClose).toHaveBeenCalledOnce();+ });+});diff --git a/frontend/src/components/header/ProjectCreateDialog.tsx b/frontend/src/components/header/ProjectCreateDialog.tsxindex 03c87888f9..1496c118b3 100644--- a/frontend/src/components/header/ProjectCreateDialog.tsx+++ b/frontend/src/components/header/ProjectCreateDialog.tsx@@ -2,7 +2,7 @@ import { Code, ConnectError } from "@connectrpc/connect";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";import { useNavigate } from "@/app/router";-import { PROJECT_V1_ROUTE_DATABASES } from "@/app/router/handles";+import { PROJECT_V1_ROUTE_DETAIL } from "@/app/router/handles";import {ResourceIdField,type ResourceIdFieldRef,@@ -24,10 +24,6 @@ import {useNotify,useWorkspacePermission,} from "@/hooks/useAppState";-import {- CONNECT_DATABASE_PRODUCT_INTRO,- PRODUCT_INTRO_QUERY_KEY,-} from "@/lib/productIntro";import { projectNamePrefix } from "@/lib/resourceName";import { useAppStore } from "@/stores/app";import type { Project } from "@/types/proto-es/v1/project_service_pb";@@ -115,11 +111,10 @@ export function ProjectCreateDialog({} else {setRecentProject(createdProject.name);void navigate.push({- name: PROJECT_V1_ROUTE_DATABASES,+ name: PROJECT_V1_ROUTE_DETAIL,params: {projectId: extractProjectResourceName(createdProject.name),},- query: { [PRODUCT_INTRO_QUERY_KEY]: CONNECT_DATABASE_PRODUCT_INTRO },});}diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex bd74e23295..a4fa96961d 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -2006,6 +2006,38 @@"success-prompt": "Successfully created project {{name}}."},"filter-projects": "Filter projects",+ "home": {+ "active-issues": "Your active issues",+ "active-issues-unavailable": "Issues are not available to you in this project.",+ "ai-placeholder": "Ask AI to query, change, or set up this project",+ "archived-description": "This project is archived and read-only.",+ "change-database": "Change a database",+ "change-database-description": "Plan a governed database change in this project.",+ "connect": "Connect an instance",+ "connect-description": "Connect a database server to this project.",+ "create-database": "Create a database",+ "create-database-description": "Create the first database on a connected instance.",+ "created-by-you": "You created",+ "databases": "Databases",+ "databases-load-error": "Databases could not be loaded.",+ "databases-unavailable": "Databases are not available to you in this project.",+ "members": "Manage members",+ "members-optional-description": "Optional: grant teammates access to collaborate and review.",+ "needs-review": "Needs your review",+ "next-step": "Next step",+ "no-active-issues": "No open issues created by you or awaiting your review in this project.",+ "no-databases": "No accessible databases yet.",+ "no-databases-create-description": "Create a database on a connected instance to get started.",+ "no-databases-description": "Connect an instance to bring databases into this project.",+ "no-databases-prerequisite": "An instance must be connected before databases appear here.",+ "no-databases-transfer-description": "Transfer an unassigned database into this project, or create a new one.",+ "query-database": "Query a database",+ "query-database-description": "Explore this project's databases in SQL Editor.",+ "transfer-databases": "Transfer databases",+ "transfer-databases-description": "Move an unassigned database into this project.",+ "view-all": "View all",+ "view-issues": "View issues"+ },"masking-exemption": {"advanced-search": {"scope": {diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.jsonindex 591681c021..9d52778604 100644--- a/frontend/src/locales/es-ES.json+++ b/frontend/src/locales/es-ES.json@@ -2006,6 +2006,38 @@"success-prompt": "Proyecto {{name}} creado exitosamente."},"filter-projects": "Filtrar proyectos",+ "home": {+ "active-issues": "Tus solicitudes activas",+ "active-issues-unavailable": "No puedes ver las solicitudes de este proyecto.",+ "ai-placeholder": "Pide a la IA que consulte, cambie o configure este proyecto",+ "archived-description": "Este proyecto está archivado y es de solo lectura.",+ "change-database": "Cambiar una base de datos",+ "change-database-description": "Planifica un cambio de base de datos controlado en este proyecto.",+ "connect": "Conectar una instancia",+ "connect-description": "Conecta un servidor de bases de datos a este proyecto.",+ "create-database": "Crear una base de datos",+ "create-database-description": "Crea la primera base de datos en una instancia conectada.",+ "created-by-you": "Creado por ti",+ "databases": "Bases de datos",+ "databases-load-error": "No se pudieron cargar las bases de datos.",+ "databases-unavailable": "Las bases de datos de este proyecto no están disponibles para ti.",+ "members": "Administrar miembros",+ "members-optional-description": "Opcional: concede acceso a tus compañeros para colaborar y revisar.",+ "needs-review": "Necesita tu revisión",+ "next-step": "Siguiente paso",+ "no-active-issues": "No hay solicitudes abiertas creadas por ti ni pendientes de tu revisión en este proyecto.",+ "no-databases": "Aún no hay bases de datos accesibles.",+ "no-databases-create-description": "Crea una base de datos en una instancia conectada para comenzar.",+ "no-databases-description": "Conecta una instancia para incorporar bases de datos a este proyecto.",+ "no-databases-prerequisite": "Se debe conectar una instancia antes de que aparezcan bases de datos aquí.",+ "no-databases-transfer-description": "Transfiere una base de datos sin asignar a este proyecto o crea una nueva.",+ "query-database": "Consultar una base de datos",+ "query-database-description": "Explora las bases de datos de este proyecto en el Editor SQL.",+ "transfer-databases": "Transferir bases de datos",+ "transfer-databases-description": "Mueve una base de datos sin asignar a este proyecto.",+ "view-all": "Ver todas",+ "view-issues": "Ver solicitudes"+ },"masking-exemption": {"advanced-search": {"scope": {diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.jsonindex 149fcb21a9..0c47e5719b 100644--- a/frontend/src/locales/ja-JP.json+++ b/frontend/src/locales/ja-JP.json@@ -2006,6 +2006,38 @@"success-prompt": "{{name}} が正常に作成されました。"},"filter-projects": "プロジェクトをフィルタリング",+ "home": {+ "active-issues": "あなたの対応中の課題",+ "active-issues-unavailable": "このプロジェクトの課題は表示できません。",+ "ai-placeholder": "このプロジェクトの検索、変更、設定について AI に質問",+ "archived-description": "このプロジェクトはアーカイブされており、読み取り専用です。",+ "change-database": "データベースを変更",+ "change-database-description": "このプロジェクトで管理されたデータベース変更を計画します。",+ "connect": "インスタンスを接続",+ "connect-description": "データベースサーバーをこのプロジェクトに接続します。",+ "create-database": "データベースを作成",+ "create-database-description": "接続済みインスタンスに最初のデータベースを作成します。",+ "created-by-you": "あなたが作成",+ "databases": "データベース",+ "databases-load-error": "データベースを読み込めませんでした。",+ "databases-unavailable": "このプロジェクトのデータベースは利用できません。",+ "members": "メンバーを管理",+ "members-optional-description": "任意: チームメンバーに共同作業とレビューのためのアクセス権を付与します。",+ "needs-review": "あなたのレビュー待ち",+ "next-step": "次のステップ",+ "no-active-issues": "このプロジェクトには、あなたが作成した、またはレビュー待ちの未完了の課題はありません。",+ "no-databases": "アクセスできるデータベースはまだありません。",+ "no-databases-create-description": "接続済みインスタンスにデータベースを作成して始めましょう。",+ "no-databases-description": "インスタンスを接続して、このプロジェクトにデータベースを追加します。",+ "no-databases-prerequisite": "ここにデータベースを表示するには、インスタンスの接続が必要です。",+ "no-databases-transfer-description": "未割り当てのデータベースをこのプロジェクトに移管するか、新しく作成します。",+ "query-database": "データベースをクエリ",+ "query-database-description": "SQL エディターでこのプロジェクトのデータベースを参照します。",+ "transfer-databases": "データベースを移管",+ "transfer-databases-description": "未割り当てのデータベースをこのプロジェクトに移管します。",+ "view-all": "すべて表示",+ "view-issues": "課題を見る"+ },"masking-exemption": {"advanced-search": {"scope": {diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.jsonindex f61dde6f1d..f519ab74c9 100644--- a/frontend/src/locales/vi-VN.json+++ b/frontend/src/locales/vi-VN.json@@ -2006,6 +2006,38 @@"success-prompt": "Đã tạo thành công dự án {{name}}."},"filter-projects": "Lọc dự án",+ "home": {+ "active-issues": "Yêu cầu đang xử lý của bạn",+ "active-issues-unavailable": "Bạn không thể xem các yêu cầu trong dự án này.",+ "ai-placeholder": "Hỏi AI để truy vấn, thay đổi hoặc thiết lập dự án này",+ "archived-description": "Dự án này đã được lưu trữ và ở chế độ chỉ đọc.",+ "change-database": "Thay đổi cơ sở dữ liệu",+ "change-database-description": "Lập kế hoạch thay đổi cơ sở dữ liệu có kiểm soát trong dự án này.",+ "connect": "Kết nối phiên bản",+ "connect-description": "Kết nối máy chủ cơ sở dữ liệu với dự án này.",+ "create-database": "Tạo cơ sở dữ liệu",+ "create-database-description": "Tạo cơ sở dữ liệu đầu tiên trên một phiên bản đã kết nối.",+ "created-by-you": "Bạn đã tạo",+ "databases": "Cơ sở dữ liệu",+ "databases-load-error": "Không thể tải cơ sở dữ liệu.",+ "databases-unavailable": "Bạn không thể xem cơ sở dữ liệu trong dự án này.",+ "members": "Quản lý thành viên",+ "members-optional-description": "Tùy chọn: cấp quyền truy cập để đồng đội cộng tác và đánh giá.",+ "needs-review": "Cần bạn xem xét",+ "next-step": "Bước tiếp theo",+ "no-active-issues": "Không có yêu cầu đang mở nào do bạn tạo hoặc đang chờ bạn xem xét trong dự án này.",+ "no-databases": "Chưa có cơ sở dữ liệu nào có thể truy cập.",+ "no-databases-create-description": "Tạo cơ sở dữ liệu trên một phiên bản đã kết nối để bắt đầu.",+ "no-databases-description": "Kết nối một phiên bản để đưa cơ sở dữ liệu vào dự án này.",+ "no-databases-prerequisite": "Cần kết nối một phiên bản trước khi cơ sở dữ liệu xuất hiện ở đây.",+ "no-databases-transfer-description": "Chuyển cơ sở dữ liệu chưa được gán vào dự án này hoặc tạo cơ sở dữ liệu mới.",+ "query-database": "Truy vấn cơ sở dữ liệu",+ "query-database-description": "Khám phá cơ sở dữ liệu của dự án này trong Trình soạn thảo SQL.",+ "transfer-databases": "Chuyển cơ sở dữ liệu",+ "transfer-databases-description": "Chuyển một cơ sở dữ liệu chưa được gán vào dự án này.",+ "view-all": "Xem tất cả",+ "view-issues": "Xem yêu cầu"+ },"masking-exemption": {"advanced-search": {"scope": {diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex 73d6e1a358..1da362b99c 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -2006,6 +2006,38 @@"success-prompt": "成功创建 {{name}}."},"filter-projects": "过滤项目",+ "home": {+ "active-issues": "你的待处理工单",+ "active-issues-unavailable": "你无法查看此项目的工单。",+ "ai-placeholder": "询问 AI 如何查询、更改或设置此项目",+ "archived-description": "此项目已归档,处于只读状态。",+ "change-database": "变更数据库",+ "change-database-description": "在此项目中规划受管控的数据库变更。",+ "connect": "连接实例",+ "connect-description": "将数据库服务器连接到此项目。",+ "create-database": "创建数据库",+ "create-database-description": "在已连接的实例中创建首个数据库。",+ "created-by-you": "由你创建",+ "databases": "数据库",+ "databases-load-error": "无法加载数据库。",+ "databases-unavailable": "你无法查看此项目的数据库。",+ "members": "管理成员",+ "members-optional-description": "可选:授予团队成员访问权限,以便协作和审核。",+ "needs-review": "等待你审核",+ "next-step": "下一步",+ "no-active-issues": "此项目中没有你创建或等待你审核的未完成工单。",+ "no-databases": "暂无可访问的数据库。",+ "no-databases-create-description": "在已连接的实例中创建数据库以开始使用。",+ "no-databases-description": "连接实例,将数据库加入此项目。",+ "no-databases-prerequisite": "连接实例后,数据库才会显示在这里。",+ "no-databases-transfer-description": "将未分配的数据库转入此项目,或创建新数据库。",+ "query-database": "查询数据库",+ "query-database-description": "在 SQL 编辑器中浏览此项目的数据库。",+ "transfer-databases": "转移数据库",+ "transfer-databases-description": "将未分配的数据库转入此项目。",+ "view-all": "查看全部",+ "view-issues": "查看工单"+ },"masking-exemption": {"advanced-search": {"scope": {diff --git a/frontend/src/modules/agent/components/AgentInput.test.tsx b/frontend/src/modules/agent/components/AgentInput.test.tsxindex 098eb1f738..e326ae9472 100644--- a/frontend/src/modules/agent/components/AgentInput.test.tsx+++ b/frontend/src/modules/agent/components/AgentInput.test.tsx@@ -147,9 +147,9 @@ const renderIntoContainer = (element: ReactElement) => {return {container,- render: () => {+ render: (nextElement = element) => {act(() => {- root.render(element);+ root.render(nextElement);});},unmount: () =>@@ -204,6 +204,8 @@ beforeEach(async () => {chats: initialState.chats,messagesByChatId: initialState.messagesByChatId,pendingAskByChatId: initialState.pendingAskByChatId,+ queuedUserMessage: null,+ queuedUserMessageInFlight: false,currentChatId: initialState.currentChatId,abortControllersByChatId: {},});@@ -250,6 +252,59 @@ afterEach(() => {});describe("AgentInput", () => {+ test("sends a queued Project Home message in its bound chat once", async () => {+ mocks.runAgentLoop.mockResolvedValue({ kind: "completed", totalTokensUsed: 0 });+ const page = { path: "/projects/billing", title: "Billing" };+ const store = useAgentStore.getState();+ const chat = store.createChat({ context: "projects/billing", page });+ store.queueUserMessage({ chatId: chat.id, text: "List billing databases", page });++ const view = renderIntoContainer(<AgentInput />);+ view.render();++ await act(async () => {+ await vi.waitFor(() => expect(mocks.runAgentLoop).toHaveBeenCalledOnce());+ });+ expect(useAgentStore.getState().getMessages(chat.id)[0]).toEqual(+ expect.objectContaining({ role: "user", content: "List billing databases" })+ );+ expect(mocks.buildSystemPrompt).toHaveBeenCalledWith(+ expect.objectContaining({ context: "projects/billing" })+ );+ expect(useAgentStore.getState().queuedUserMessage).toBeNull();+ view.unmount();+ });++ test("keeps the queued message busy while AI configuration loads", async () => {+ let resolveSetting!: (value: undefined) => void;+ mocks.getOrFetchSettingByName.mockReturnValue(+ new Promise<undefined>((resolve) => { resolveSetting = resolve; })+ );+ mocks.runAgentLoop.mockResolvedValue({ kind: "completed", totalTokensUsed: 0 });+ const page = { path: "/projects/billing", title: "Billing" };+ const store = useAgentStore.getState();+ const chat = store.createChat({ context: "projects/billing", page });+ store.queueUserMessage({ chatId: chat.id, text: "List billing databases", page });++ const view = renderIntoContainer(<AgentInput />);+ view.render();+ await act(async () => { await Promise.resolve(); });++ expect(mocks.getOrFetchSettingByName).toHaveBeenCalledWith(+ Setting_SettingName.AI,+ true+ );+ expect(useAgentStore.getState().queuedUserMessage).not.toBeNull();+ expect(mocks.runAgentLoop).not.toHaveBeenCalled();++ await act(async () => { resolveSetting(undefined); });+ await act(async () => {+ await vi.waitFor(() => expect(mocks.runAgentLoop).toHaveBeenCalledOnce());+ });+ expect(useAgentStore.getState().queuedUserMessage).toBeNull();+ view.unmount();+ });+test("binds an initial empty chat and uses its context for every run", async () => {mocks.runAgentLoop.mockResolvedValue({kind: "completed",diff --git a/frontend/src/modules/agent/components/AgentInput.tsx b/frontend/src/modules/agent/components/AgentInput.tsxindex 0b75d8c99a..2f94440cd3 100644--- a/frontend/src/modules/agent/components/AgentInput.tsx+++ b/frontend/src/modules/agent/components/AgentInput.tsx@@ -114,7 +114,6 @@ interface DomRefMentionOption {export function AgentInput() {const { t } = useTranslation();-// Zustand selectorsconst currentChat = useAgentStore(selectCurrentChat);const currentPendingAsk = useAgentStore(selectCurrentPendingAsk);@@ -127,6 +126,7 @@ export function AgentInput() {selectCurrentChatRequiresAIConfiguration);const currentChatId = useAgentStore((s) => s.currentChatId);+ const queuedUserMessage = useAgentStore((s) => s.queuedUserMessage);const getOrFetchSettingByName = useAppStore((s) => s.getOrFetchSettingByName);const context = currentChat?.context;const projectContext = context?.startsWith(projectNamePrefix)@@ -581,6 +581,37 @@ export function AgentInput() {[runChat]);+ useEffect(() => {+ if (!currentChatId || queuedUserMessage?.chatId !== currentChatId) return;+ const store = useAgentStore.getState();+ const message = store.takeQueuedUserMessage(currentChatId);+ if (!message) return;++ void (async () => {+ try {+ if (await blockWhenAIIsNotConfigured(message.chatId)) {+ setInput(message.text);+ return;+ }+ store.clearError(message.chatId);+ store.addMessage({+ chatId: message.chatId,+ role: "user",+ content: message.text,+ metadata: { route: message.page.path },+ });+ await startChatRun(message.chatId, message.page);+ } finally {+ store.finishQueuedUserMessage(message.chatId);+ }+ })();+ }, [+ blockWhenAIIsNotConfigured,+ currentChatId,+ queuedUserMessage,+ startChatRun,+ ]);+const send = useCallback(async () => {const store = useAgentStore.getState();const chat = selectCurrentChat(store);diff --git a/frontend/src/modules/agent/store/agent.test.ts b/frontend/src/modules/agent/store/agent.test.tsindex eb8c544e21..8d4e193b60 100644--- a/frontend/src/modules/agent/store/agent.test.ts+++ b/frontend/src/modules/agent/store/agent.test.ts@@ -62,6 +62,26 @@ afterEach(() => {const s = (store: StoreApi<AgentState>) => store.getState();describe("useAgentStore (Zustand)", () => {+ test("opens the selected chat without toggling or interrupting it", () => {+ const store = createAgentStore();+ const chatId = s(store).currentChatId;+ expect(chatId).not.toBeNull();+ s(store).startChatRun(+ chatId!,+ { path: "/projects/orders", title: "Order service" },+ { runId: "run-1" }+ );+ s(store).open();+ s(store).minimize();+ s(store).open();+ s(store).open();+ expect(s(store).visible).toBe(true);+ expect(s(store).minimized).toBe(false);+ expect(s(store).currentChatId).toBe(chatId);+ expect(s(store).getChat(chatId)?.status).toBe("running");+ expect(s(store).chats).toHaveLength(1);+ });+test("creates a default chat when no persisted state exists", () => {const store = createAgentStore();@@ -71,6 +91,24 @@ describe("useAgentStore (Zustand)", () => {expect(s(store).chats[0].totalTokensUsed).toBe(0);});+ test("takes a queued user message only for its chat and only once", () => {+ const store = createAgentStore();+ const chat = s(store).createChat({ context: "projects/orders" });+ const message = {+ chatId: chat.id,+ text: "List databases",+ page: { path: "/projects/orders", title: "Order service" },+ };+ s(store).queueUserMessage(message);++ expect(s(store).takeQueuedUserMessage("other-chat")).toBeNull();+ expect(s(store).takeQueuedUserMessage(chat.id)).toEqual(message);+ expect(s(store).takeQueuedUserMessage(chat.id)).toBeNull();+ expect(s(store).queuedUserMessage).toEqual(message);+ s(store).finishQueuedUserMessage(chat.id);+ expect(s(store).queuedUserMessage).toBeNull();+ });+test("keeps a chat's resource context when its page changes and after reload", () => {const store = createAgentStore();const chat = s(store).createChat({ context: "projects/orders" });diff --git a/frontend/src/modules/agent/store/agent.ts b/frontend/src/modules/agent/store/agent.tsindex ce5a2f2682..be1795e870 100644--- a/frontend/src/modules/agent/store/agent.ts+++ b/frontend/src/modules/agent/store/agent.ts@@ -40,6 +40,12 @@ interface AddMessageOptions extends Message {metadata?: AgentMessage["metadata"];}+interface QueuedUserMessage {+ chatId: string;+ text: string;+ page: AgentChatSnapshot;+}+const DEFAULT_CHAT_STATUS: AgentChatStatus = "idle";// --- Pure helper functions ---@@ -348,8 +354,11 @@ export interface AgentState {pendingAskByChatId: Record<string, AgentPendingAsk>;currentChatId: string | null;abortControllersByChatId: Record<string, AbortController>;+ queuedUserMessage: QueuedUserMessage | null;+ queuedUserMessageInFlight: boolean;// UI actions+ open: () => void;toggle: () => void;minimize: () => void;restore: () => void;@@ -359,6 +368,9 @@ export interface AgentState {// Chat CRUDcreateChat: (options?: CreateChatOptions) => AgentChat;+ queueUserMessage: (message: QueuedUserMessage) => void;+ takeQueuedUserMessage: (chatId: string) => QueuedUserMessage | null;+ finishQueuedUserMessage: (chatId: string) => void;ensureCurrentChat: (page?: AgentChatSnapshot, context?: string) => AgentChat;selectChatContext: (context: string,@@ -619,8 +631,24 @@ export const createAgentStore = () => {pendingAskByChatId: initial.pendingAskByChatId,currentChatId: initial.currentChatId,abortControllersByChatId: {},+ queuedUserMessage: null,+ queuedUserMessageInFlight: false,// UI actions+ open: () =>+ set((state) => {+ state.visible = true;+ state.minimized = false;+ if (typeof window !== "undefined") {+ state.position = clampAgentWindowPosition(+ window.innerWidth,+ window.innerHeight,+ state.size.width,+ state.size.height,+ state.position+ );+ }+ }),toggle: () =>set((state) => {state.visible = !state.visible;@@ -729,6 +757,30 @@ export const createAgentStore = () => {return chat;},+ queueUserMessage: (message) =>+ set((state) => {+ state.queuedUserMessage = message;+ state.queuedUserMessageInFlight = false;+ }),++ takeQueuedUserMessage: (chatId) => {+ const message = get().queuedUserMessage;+ if (message?.chatId !== chatId || get().queuedUserMessageInFlight) {+ return null;+ }+ set((state) => {+ state.queuedUserMessageInFlight = true;+ });+ return message;+ },++ finishQueuedUserMessage: (chatId) =>+ set((state) => {+ if (state.queuedUserMessage?.chatId !== chatId) return;+ state.queuedUserMessage = null;+ state.queuedUserMessageInFlight = false;+ }),+ensureCurrentChat: (page, context) => {const existing = _getChat(get().currentChatId);if (existing) {diff --git a/frontend/src/routes/auth/WorkspaceSetupPage.test.tsx b/frontend/src/routes/auth/WorkspaceSetupPage.test.tsxindex 955da348af..aaff5c770d 100644--- a/frontend/src/routes/auth/WorkspaceSetupPage.test.tsx+++ b/frontend/src/routes/auth/WorkspaceSetupPage.test.tsx@@ -779,7 +779,7 @@ describe("WorkspaceSetupPage", () => {page.unmount();});- test("can optionally create a project and continue to its databases page", async () => {+ test("can optionally create a project and continue to its Home", async () => {const page = renderWorkspaceForm();expect(page.container.textContent).toContain("Setup 1st project");@@ -852,12 +852,8 @@ describe("WorkspaceSetupPage", () => {mocks.prepareSampleProjectInstance.mock.invocationCallOrder[0]);expect(mocks.routerReplace).toHaveBeenCalledWith({- name: "workspace.project.database",+ name: "workspace.project.detail",params: { projectId: "new-project" },- query: {- syncingInstance: "sample",- intro: "project-instance-synced",- },});page.unmount();@@ -987,9 +983,8 @@ describe("WorkspaceSetupPage", () => {expect(mocks.createProject).toHaveBeenCalled();expect(mocks.prepareSampleProjectInstance).not.toHaveBeenCalled();expect(mocks.routerReplace).toHaveBeenCalledWith({- name: "workspace.project.database",+ name: "workspace.project.detail",params: { projectId: "new-project" },- query: { intro: "connect-database" },});expect(mocks.captureMetric).toHaveBeenCalledWith({event: "workspace setup submitted",@@ -1026,9 +1021,8 @@ describe("WorkspaceSetupPage", () => {}));expect(mocks.routerReplace).toHaveBeenCalledWith({- name: "workspace.project.database",+ name: "workspace.project.detail",params: { projectId: "new-project" },- query: { intro: "connect-database" },});expect(mocks.captureMetric).toHaveBeenCalledWith({event: "workspace setup submitted",diff --git a/frontend/src/routes/auth/WorkspaceSetupPage.tsx b/frontend/src/routes/auth/WorkspaceSetupPage.tsxindex 45091a09db..e4fde41a3c 100644--- a/frontend/src/routes/auth/WorkspaceSetupPage.tsx+++ b/frontend/src/routes/auth/WorkspaceSetupPage.tsx@@ -7,7 +7,7 @@ import { behaviorAnalytics } from "@/app/analytics/provider";import { router } from "@/app/router";import {PROJECT_V1_ROUTE_DASHBOARD,- PROJECT_V1_ROUTE_DATABASES,+ PROJECT_V1_ROUTE_DETAIL,} from "@/app/router/handles";import { ResourceIdField } from "@/components/ResourceIdField";import { Button } from "@/components/ui/button";@@ -23,10 +23,8 @@ import {useWorkspacePermission,} from "@/hooks/useAppState";import {- CONNECT_DATABASE_PRODUCT_INTRO,CREATE_PROJECT_PRODUCT_INTRO,PRODUCT_INTRO_QUERY_KEY,- PROJECT_INSTANCE_SYNCED_PRODUCT_INTRO,} from "@/lib/productIntro";import { cn } from "@/lib/utils";import {@@ -46,10 +44,7 @@ import { projectNamePrefix } from "@/stores/modules/v1/common";import type { ValidatedMessage } from "@/types";import { UpdateUserRequestSchema } from "@/types/proto-es/v1/user_service_pb";import { WorkspaceSchema } from "@/types/proto-es/v1/workspace_service_pb";-import {- extractInstanceResourceName,- extractProjectResourceName,-} from "@/utils";+import { extractProjectResourceName } from "@/utils";import { extractGrpcErrorMessage } from "@/utils/connect";import { WorkspaceSetupQuestionnaireStep } from "./WorkspaceSetupQuestionnaireStep";@@ -197,7 +192,6 @@ export function WorkspaceSetupPage() {);}let createdProjectName = "";- let sampleInstanceName = "";if (shouldCreateProject) {const createdProject = await createProject(projectTitle.trim(),@@ -212,10 +206,7 @@ export function WorkspaceSetupPage() {}));try {- const sampleInstance = await prepareSampleProjectInstance(- createdProject.name- );- sampleInstanceName = sampleInstance.name;+ await prepareSampleProjectInstance(createdProject.name);} catch (error) {pushNotification({module: "bytebase",@@ -248,22 +239,11 @@ export function WorkspaceSetupPage() {}));if (createdProjectName) {- const sampleInstanceId =- extractInstanceResourceName(sampleInstanceName);router.replace({- name: PROJECT_V1_ROUTE_DATABASES,+ name: PROJECT_V1_ROUTE_DETAIL,params: {projectId: extractProjectResourceName(createdProjectName),},- query: sampleInstanceId- ? {- syncingInstance: sampleInstanceId,- [PRODUCT_INTRO_QUERY_KEY]:- PROJECT_INSTANCE_SYNCED_PRODUCT_INTRO,- }- : {- [PRODUCT_INTRO_QUERY_KEY]: CONNECT_DATABASE_PRODUCT_INTRO,- },});} else {goToDashboard();diff --git a/frontend/src/routes/project/ProjectDatabasesPage.test.tsx b/frontend/src/routes/project/ProjectDatabasesPage.test.tsxindex aa15c880eb..9af71c63bb 100644--- a/frontend/src/routes/project/ProjectDatabasesPage.test.tsx+++ b/frontend/src/routes/project/ProjectDatabasesPage.test.tsx@@ -425,6 +425,24 @@ describe("ProjectDatabasesPage", () => {});});+ test("opens the create database sheet from a Project Home shortcut", async () => {+ mocks.routerCurrentQuery = { createDatabase: "1" };+ mocks.fetchInstanceList.mockResolvedValueOnce({+ instances: [{ name: "instances/prod", title: "Prod" }],+ });+ const container = document.createElement("div");+ const root = createRoot(container);++ await act(async () => {+ root.render(<ProjectDatabasesPage projectId="demo" />);+ await Promise.resolve();+ });++ expect(container.querySelector("[data-testid='create-database-sheet']")).not.toBeNull();++ act(() => root.unmount());+ });+test("only checks workspace instances for the default project", async () => {mocks.fetchInstanceList.mockImplementation(async (params) => {if (params?.parent) {diff --git a/frontend/src/routes/project/ProjectDatabasesPage.tsx b/frontend/src/routes/project/ProjectDatabasesPage.tsxindex 83e0212fc6..58cbbcc74e 100644--- a/frontend/src/routes/project/ProjectDatabasesPage.tsx+++ b/frontend/src/routes/project/ProjectDatabasesPage.tsx@@ -141,6 +141,7 @@ export function ProjectDatabasesPage({ projectId }: { projectId: string }) {availableInstanceCount === undefined? undefined: availableInstanceCount > 0;+ const createDatabaseRequested = currentRoute.query.createDatabase === "1";const [syncingRefreshExhausted, setSyncingRefreshExhausted] = useState(false);const autoRefreshCountRef = useRef(0);@@ -359,6 +360,17 @@ export function ProjectDatabasesPage({ projectId }: { projectId: string }) {};}, [canListProjectInstances, isDefault, projectName]);+ useEffect(() => {+ if (+ createDatabaseRequested &&+ hasAvailableInstance &&+ hasProjectPermission("bb.instances.list") &&+ PERMISSIONS_FOR_DATABASE_CREATE_ISSUE.every(hasProjectPermission)+ ) {+ setShowCreateDrawer(true);+ }+ }, [createDatabaseRequested, hasAvailableInstance, hasProjectPermission]);+// Batch operation handlersconst handleSyncSchema = useCallback(async () => {if (syncing) return;diff --git a/frontend/src/routes/project/ProjectHomePage.test.tsx b/frontend/src/routes/project/ProjectHomePage.test.tsxnew file mode 100644index 0000000000..c7372b9751--- /dev/null+++ b/frontend/src/routes/project/ProjectHomePage.test.tsx@@ -0,0 +1,833 @@+import type { ReactNode } from "react";+import { create } from "@bufbuild/protobuf";+import { TimestampSchema } from "@bufbuild/protobuf/wkt";+import { fireEvent, render, screen, waitFor, within } from "@testing-library/react";+import { beforeEach, describe, expect, test, vi } from "vitest";+import type { Permission } from "@/types/iam";+import { ApprovalStatus, Engine, IssueStatus, State } from "@/types/proto-es/v1/common_pb";+import { DatabaseSchema$ } from "@/types/proto-es/v1/database_service_pb";+import { InstanceResourceSchema } from "@/types/proto-es/v1/instance_service_pb";+import { IssueSchema, Issue_Type } from "@/types/proto-es/v1/issue_service_pb";+import { PlanSchema } from "@/types/proto-es/v1/plan_service_pb";++const mocks = vi.hoisted(() => ({+ state: {+ projectsByName: {+ "projects/orders": {+ name: "projects/orders",+ title: "Order service",+ state: 0,+ },+ "projects/second": {+ name: "projects/second",+ title: "Second project",+ state: 0,+ },+ },+ serverInfo: {+ defaultProject: "projects/default",+ aiEnabled: true,+ workspace: "workspaces/demo",+ },+ currentUser: { name: "users/alice", email: "[email protected]", workspace: "workspaces/demo" },+ fetchDatabases: vi.fn(),+ fetchIssueByName: vi.fn(),+ fetchInstanceList: vi.fn(),+ listIssues: vi.fn(),+ listPlans: vi.fn(),+ hasWorkspacePermission: vi.fn((_permission: Permission) => true),+ workspaceResourceName: vi.fn(() => "workspaces/demo"),+ projectPoliciesByName: {+ "projects/orders": { bindings: [{ role: "roles/projectOwner", members: ["user:[email protected]"] }] },+ "projects/second": { bindings: [{ role: "roles/projectOwner", members: ["user:[email protected]"] }] },+ },+ environmentList: [{ name: "environments/prod", title: "Production" }],+ loadEnvironmentList: vi.fn(),+ getEnvironmentByName: vi.fn((name: string) =>+ name === "environments/prod"+ ? { name, title: "Production" }+ : undefined+ ),+ hasInstanceFeature: vi.fn(() => true),+ hasFeature: vi.fn(() => true),+ loadSubscription: vi.fn(),+ },+ missedPermissions: [] as Permission[],+ probedPermissions: [] as Permission[],+ open: vi.fn(),+ createChat: vi.fn(() => ({ id: "new-chat" })),+ queueUserMessage: vi.fn(),+}));++vi.mock("react-i18next", async (importOriginal) => ({+ ...(await importOriginal<typeof import("react-i18next")>()),+ useTranslation: () => ({ t: (key: string) => key }),+}));+vi.mock("@/stores/app", () => ({+ useAppStore: Object.assign(+ (selector: (state: typeof mocks.state) => unknown) => selector(mocks.state),+ { getState: () => mocks.state }+ ),+}));+vi.mock("@/components/ComponentPermissionGuard", () => ({+ useComponentPermissionState: ({ permissions }: { permissions: Permission[] }) => {+ mocks.probedPermissions = permissions;+ return { missedPermissions: mocks.missedPermissions };+ },+}));+vi.mock("@/components/ProjectPageLayout", () => ({+ ProjectPageLayout: ({ children }: { children: ReactNode }) => (+ <div>{children}</div>+ ),+}));+vi.mock("@/components/RouterLink", () => ({+ RouterLink: ({+ to,+ children,+ ...props+ }: {+ to: { name: string; params?: Record<string, string> };+ children: ReactNode;+ }) => (+ <a href={to.name} data-to={JSON.stringify(to)} {...props}>+ {children}+ </a>+ ),+}));+vi.mock("@/modules/agent/store/agent", () => ({+ useAgentStore: Object.assign(+ (selector: (state: { chats: []; queuedUserMessage: null }) => unknown) =>+ selector({ chats: [], queuedUserMessage: null }),+ {+ getState: () => ({+ open: mocks.open,+ createChat: mocks.createChat,+ queueUserMessage: mocks.queueUserMessage,+ chats: [],+ queuedUserMessage: null,+ }),+ }+ ),+ selectHasRunningChat: () => false,+}));++import { ProjectHomePage } from "./ProjectHomePage";++beforeEach(() => {+ vi.clearAllMocks();+ mocks.state.fetchDatabases.mockReset();+ localStorage.clear();+ mocks.missedPermissions = [];+ mocks.probedPermissions = [];+ mocks.state.serverInfo.aiEnabled = true;+ mocks.state.serverInfo.defaultProject = "projects/default";+ mocks.state.projectsByName["projects/orders"].state = State.ACTIVE;+ mocks.state.projectsByName["projects/second"].state = State.ACTIVE;+ mocks.state.hasInstanceFeature.mockReturnValue(true);+ mocks.state.hasWorkspacePermission.mockReturnValue(true);+ mocks.state.fetchDatabases.mockResolvedValue({+ databases: [+ create(DatabaseSchema$, {+ name: "instances/primary/databases/default",+ project: "projects/orders",+ }),+ ],+ });+ mocks.state.fetchInstanceList.mockResolvedValue({ instances: [] });+ mocks.state.fetchIssueByName.mockReset();+ mocks.state.fetchIssueByName.mockResolvedValue(+ create(IssueSchema, { draft: false })+ );+ mocks.state.listIssues.mockResolvedValue({ issues: [] });+ mocks.state.listPlans.mockReset();+ mocks.state.listPlans.mockResolvedValue({ plans: [], nextPageToken: "" });+});++describe("ProjectHomePage", () => {+ test("shows archived status without loading active project data", () => {+ mocks.state.projectsByName["projects/orders"].state = State.DELETED;+ render(<ProjectHomePage projectId="orders" />);++ expect(screen.getByText("project.home.archived-description")).toBeTruthy();+ expect(screen.queryByRole("region", { name: "project.home.next-step" })).toBeNull();+ expect(screen.queryByRole("textbox", { name: "project.home.ai-placeholder" })).toBeNull();+ expect(mocks.state.fetchDatabases).not.toHaveBeenCalled();+ expect(mocks.state.fetchInstanceList).not.toHaveBeenCalled();+ expect(mocks.state.listIssues).not.toHaveBeenCalled();+ expect(mocks.state.listPlans).not.toHaveBeenCalled();+ });++ test("offers database change creation without plan-list permission", async () => {+ mocks.missedPermissions = ["bb.plans.list"];+ render(<ProjectHomePage projectId="orders" />);++ const next = await screen.findByRole("region", { name: "project.home.next-step" });+ expect(await within(next).findByRole("link", { name: "project.home.change-database" })).toBeTruthy();+ const query = within(next).getByRole("link", { name: "project.home.query-database" });+ expect(JSON.parse(query.getAttribute("data-to") ?? "")).toEqual({+ name: "sql-editor.project",+ params: { project: "orders" },+ });+ expect(query.className).not.toContain("bg-accent");+ expect(mocks.state.listPlans).not.toHaveBeenCalled();+ });++ test("offers database change creation without database-list permission", async () => {+ mocks.missedPermissions = ["bb.databases.list"];+ render(<ProjectHomePage projectId="orders" />);++ const next = await screen.findByRole("region", { name: "project.home.next-step" });+ expect(await within(next).findByRole("link", { name: "project.home.change-database" })).toBeTruthy();+ expect(within(next).queryByRole("link", { name: "project.home.query-database" })).toBeNull();+ expect(mocks.state.fetchDatabases).toHaveBeenCalledWith(+ expect.objectContaining({ parent: "projects/orders" })+ );+ });++ test("starts a project-bound Agent chat from the composer", async () => {+ render(<ProjectHomePage projectId="orders" />);+ expect(screen.getByText("Order service")).toBeTruthy();+ await waitFor(() => {+ expect(screen.getByRole("region", { name: "project.home.next-step" })).toBeTruthy();+ });+ const prompt = screen.getByRole("textbox", { name: "project.home.ai-placeholder" });+ expect(screen.getByRole("button", { name: "agent.send" }).hasAttribute("disabled")).toBe(true);+ fireEvent.change(prompt, { target: { value: "List databases" } });+ fireEvent.click(screen.getByRole("button", { name: "agent.send" }));+ expect(mocks.createChat).toHaveBeenCalledWith(+ expect.objectContaining({ context: "projects/orders" })+ );+ expect(mocks.queueUserMessage).toHaveBeenCalledWith(+ expect.objectContaining({ chatId: "new-chat", text: "List databases" })+ );+ expect(mocks.open).toHaveBeenCalledOnce();+ expect((prompt as HTMLTextAreaElement).value).toBe("");+ });++ test("keeps Enter for a new line and submits a multiline prompt with Send", async () => {+ render(<ProjectHomePage projectId="orders" />);+ await waitFor(() => expect(screen.getByRole("region", { name: "project.home.next-step" })).toBeTruthy());+ const prompt = screen.getByRole("textbox", { name: "project.home.ai-placeholder" });+ fireEvent.change(prompt, { target: { value: "Explain this project" } });++ const enterWasNotCanceled = fireEvent.keyDown(prompt, { key: "Enter" });+ expect(enterWasNotCanceled).toBe(true);+ expect(mocks.createChat).not.toHaveBeenCalled();++ fireEvent.change(prompt, { target: { value: "Explain this\nproject" } });+ fireEvent.click(screen.getByRole("button", { name: "agent.send" }));+ expect(mocks.createChat).toHaveBeenCalledOnce();+ expect(mocks.queueUserMessage).toHaveBeenCalledWith(+ expect.objectContaining({ text: "Explain this\nproject" })+ );+ });++ test("does not probe SQL select permission for the Agent composer", async () => {+ mocks.missedPermissions = ["bb.sql.select"];+ render(<ProjectHomePage projectId="orders" />);++ expect(mocks.probedPermissions).not.toContain("bb.sql.select");+ expect(screen.getByRole("textbox", { name: "project.home.ai-placeholder" })).toBeTruthy();+ await waitFor(() => expect(screen.getByRole("region", { name: "project.home.next-step" })).toBeTruthy());+ });++ test("opens instance creation from the setup step without duplicating the empty state action", async () => {+ mocks.state.fetchDatabases.mockResolvedValue({ databases: [] });+ render(<ProjectHomePage projectId="orders" />);+ await waitFor(() => {+ expect(screen.getAllByText("project.home.connect").length).toBeGreaterThan(0);+ });+ const action = within(screen.getByRole("region", { name: "project.home.next-step" }))+ .getByRole("link", { name: "project.home.connect" });+ expect(action.getAttribute("href")).toBe(+ "workspace.project.instance.create"+ );+ expect(within(screen.getByRole("region", { name: "project.home.databases" }))+ .queryByRole("link", { name: "project.home.connect" })).toBeNull();+ });++ test("suggests managing members for a new project", async () => {+ mocks.state.fetchDatabases.mockResolvedValue({ databases: [] });+ render(<ProjectHomePage projectId="orders" />);+ const next = await screen.findByRole("region", { name: "project.home.next-step" });+ expect(within(next).getByRole("link", { name: "project.home.members" })).toBeTruthy();+ expect(within(next).getByRole("link", { name: "project.home.members" }).getAttribute("href"))+ .toBe("workspace.project.members");+ });++ test("does not suggest managing members without write permission", async () => {+ mocks.missedPermissions = ["bb.projects.setIamPolicy"];+ mocks.state.fetchDatabases.mockResolvedValue({ databases: [] });+ render(<ProjectHomePage projectId="orders" />);+ await screen.findByRole("region", { name: "project.home.next-step" });+ expect(screen.queryByRole("link", { name: "project.home.members" })).toBeNull();+ });++ test("suggests creating a database when an instance exists but no database does", async () => {+ mocks.state.fetchDatabases.mockResolvedValue({ databases: [] });+ mocks.state.fetchInstanceList.mockResolvedValue({+ instances: [{ name: "projects/orders/instances/primary" }],+ });+ render(<ProjectHomePage projectId="orders" />);+ const next = await screen.findByRole("region", { name: "project.home.next-step" });+ const createLink = await within(next).findByRole("link", {+ name: "project.home.create-database",+ });+ expect(JSON.parse(createLink.getAttribute("data-to")!)).toEqual({+ name: "workspace.project.database",+ params: { projectId: "orders" },+ query: { createDatabase: "1" },+ });+ expect(within(screen.getByRole("region", { name: "project.home.databases" }))+ .queryByRole("link", { name: "project.home.create-database" })).toBeNull();+ expect(within(next).queryByRole("link", { name: "project.home.connect" })).toBeNull();+ });++ test("suggests creating when a workspace instance exists but has no database to transfer", async () => {+ mocks.state.fetchDatabases.mockResolvedValue({ databases: [] });+ mocks.state.fetchInstanceList.mockImplementation(async ({ parent }) => ({+ instances: parent ? [] : [{ name: "instances/shared" }],+ }));+ render(<ProjectHomePage projectId="orders" />);+ const next = await screen.findByRole("region", { name: "project.home.next-step" });+ expect(await within(next).findByRole("link", { name: "project.home.create-database" })).toBeTruthy();+ expect(within(next).queryByRole("link", { name: "project.home.connect" })).toBeNull();+ expect(mocks.state.fetchInstanceList).toHaveBeenCalledWith(+ expect.objectContaining({ parent: "projects/orders" })+ );+ expect(mocks.state.fetchInstanceList).toHaveBeenCalledWith(+ expect.objectContaining({ parent: undefined })+ );+ });++ test("offers transfer first and creation second when unassigned databases exist", async () => {+ mocks.state.fetchDatabases.mockImplementation(async ({ parent }) => ({+ databases: parent === "workspaces/demo"+ ? [create(DatabaseSchema$, {+ name: "instances/shared/databases/existing",+ project: "projects/default",+ })]+ : [],+ }));+ mocks.state.fetchInstanceList.mockImplementation(async ({ parent }) => ({+ instances: parent ? [] : [{ name: "instances/shared" }],+ }));+ render(<ProjectHomePage projectId="orders" />);+ const next = await screen.findByRole("region", { name: "project.home.next-step" });+ const transfer = await within(next).findByRole("link", {+ name: "project.home.transfer-databases",+ });+ const createLink = within(next).getByRole("link", {+ name: "project.home.create-database",+ });+ expect(JSON.parse(transfer.getAttribute("data-to")!)).toEqual({+ name: "workspace.database",+ query: {+ intro: "prepare-database",+ tip: "transfer-databases-to-project",+ targetProject: "projects/orders",+ },+ });+ expect(transfer.classList.contains("bg-accent")).toBe(true);+ expect(createLink.classList.contains("bg-accent")).toBe(false);+ expect(mocks.state.fetchDatabases).toHaveBeenCalledWith(+ expect.objectContaining({+ parent: "workspaces/demo",+ filter: { project: "projects/default" },+ })+ );+ });++ test("offers transfer without permission to list instances", async () => {+ mocks.missedPermissions = ["bb.instances.list"];+ mocks.state.hasWorkspacePermission.mockImplementation(+ (permission) => permission !== "bb.instances.list"+ );+ mocks.state.fetchDatabases.mockImplementation(async ({ parent }) => ({+ databases: parent === "workspaces/demo"+ ? [create(DatabaseSchema$, {+ name: "instances/shared/databases/existing",+ project: "projects/default",+ })]+ : [],+ }));++ render(<ProjectHomePage projectId="orders" />);++ const next = await screen.findByRole("region", { name: "project.home.next-step" });+ expect(await within(next).findByRole("link", {+ name: "project.home.transfer-databases",+ })).toBeTruthy();+ expect(mocks.state.fetchInstanceList).not.toHaveBeenCalled();+ expect(mocks.state.fetchDatabases).toHaveBeenCalledWith(+ expect.objectContaining({ parent: "workspaces/demo" })+ );+ });++ test("offers database creation for an instance before its first sync without polling", async () => {+ const setTimeoutSpy = vi.spyOn(window, "setTimeout");+ mocks.state.fetchDatabases.mockResolvedValue({ databases: [] });+ mocks.state.fetchInstanceList.mockResolvedValue({+ instances: [{ name: "instances/primary" }],+ });+ const view = render(<ProjectHomePage projectId="orders" />);+ try {+ const next = await screen.findByRole("region", { name: "project.home.next-step" });+ const createLink = await within(next).findByRole("link", { name: "project.home.create-database" });+ expect(JSON.parse(createLink.getAttribute("data-to")!)).toEqual({+ name: "workspace.project.database",+ params: { projectId: "orders" },+ query: { createDatabase: "1" },+ });+ expect(screen.getByText("project.home.no-databases-create-description")).toBeTruthy();+ expect(setTimeoutSpy.mock.calls.some(([, delay]) => delay === 5000)).toBe(false);+ expect(mocks.state.fetchDatabases.mock.calls.filter(+ ([request]) => request.parent === "projects/orders"+ )).toHaveLength(1);+ } finally {+ view.unmount();+ setTimeoutSpy.mockRestore();+ }+ });++ test("retries a failed database preview without leaving Project Home", async () => {+ mocks.state.fetchDatabases.mockRejectedValueOnce(new Error("unavailable"));+ mocks.state.fetchDatabases.mockResolvedValueOnce({+ databases: [create(DatabaseSchema$, {+ name: "instances/primary/databases/orders",+ project: "projects/orders",+ })],+ });+ render(<ProjectHomePage projectId="orders" />);++ const databases = screen.getByRole("region", { name: "project.home.databases" });+ await within(databases).findByText("project.home.databases-load-error");+ fireEvent.click(within(databases).getByRole("button", { name: "common.refresh" }));++ await within(databases).findByText("orders");+ expect(mocks.state.fetchDatabases).toHaveBeenCalledTimes(2);+ });++ test("does not suggest transfer without workspace update permission", async () => {+ mocks.state.fetchDatabases.mockResolvedValue({ databases: [] });+ mocks.state.fetchInstanceList.mockResolvedValue({+ instances: [{ name: "instances/shared" }],+ });+ mocks.state.hasWorkspacePermission.mockImplementation(+ (permission) => permission !== "bb.databases.update"+ );+ render(<ProjectHomePage projectId="orders" />);+ const next = await screen.findByRole("region", { name: "project.home.next-step" });+ expect(await within(next).findByRole("link", { name: "project.home.create-database" })).toBeTruthy();+ expect(within(next).queryByRole("link", { name: "project.home.transfer-databases" })).toBeNull();+ expect(mocks.state.fetchDatabases).not.toHaveBeenCalledWith(+ expect.objectContaining({ parent: "workspaces/demo" })+ );+ });++ test("finds a synced instance on a later page", async () => {+ mocks.state.fetchDatabases.mockResolvedValue({ databases: [] });+ mocks.state.fetchInstanceList.mockImplementation(async ({ parent, pageToken }) => {+ if (!parent) return { instances: [], nextPageToken: "" };+ if (!pageToken) {+ return {+ instances: [],+ nextPageToken: "next",+ };+ }+ return {+ instances: [{ name: "instances/second" }],+ nextPageToken: "",+ };+ });+ render(<ProjectHomePage projectId="orders" />);+ const next = await screen.findByRole("region", { name: "project.home.next-step" });+ expect(await within(next).findByRole("link", { name: "project.home.create-database" })).toBeTruthy();+ expect(mocks.state.fetchInstanceList).toHaveBeenCalledWith(+ expect.objectContaining({ parent: "projects/orders", pageToken: "next" })+ );+ });++ test("does not claim a connection is needed when instance discovery fails", async () => {+ mocks.state.fetchDatabases.mockResolvedValue({ databases: [] });+ mocks.state.fetchInstanceList.mockRejectedValue(new Error("unavailable"));+ render(<ProjectHomePage projectId="orders" />);+ await waitFor(() => expect(mocks.state.fetchInstanceList).toHaveBeenCalled());+ const next = screen.getByRole("region", { name: "project.home.next-step" });+ expect(within(next).getByRole("link", { name: "project.home.members" })).toBeTruthy();+ expect(screen.queryByRole("link", { name: "project.home.connect" })).toBeNull();+ });++ test("does not suggest connecting when the member cannot create instances", async () => {+ mocks.missedPermissions = ["bb.instances.create"];+ mocks.state.fetchDatabases.mockResolvedValue({ databases: [] });+ render(<ProjectHomePage projectId="orders" />);+ await waitFor(() => expect(mocks.state.fetchInstanceList).toHaveBeenCalled());+ expect(screen.queryByRole("link", { name: "project.home.connect" })).toBeNull();+ });++ test("does not infer project instance state without project list permission", async () => {+ mocks.missedPermissions = ["bb.instances.list"];+ mocks.state.hasWorkspacePermission.mockReturnValue(false);+ mocks.state.fetchDatabases.mockResolvedValue({ databases: [] });+ render(<ProjectHomePage projectId="orders" />);++ await waitFor(() => expect(mocks.state.fetchDatabases).toHaveBeenCalled());+ expect(mocks.state.fetchInstanceList).not.toHaveBeenCalled();+ expect(screen.queryByRole("link", { name: "project.home.connect" })).toBeNull();+ expect(screen.queryByRole("link", { name: "project.home.create-database" })).toBeNull();+ expect(screen.getByRole("link", { name: "project.home.members" })).toBeTruthy();+ });++ test("does not infer emptiness from an error or offer project instances for the default project", async () => {+ mocks.state.fetchDatabases.mockRejectedValueOnce(new Error("unavailable"));+ const view = render(<ProjectHomePage projectId="orders" />);+ await waitFor(() =>+ expect(screen.getByText("project.home.databases-load-error")).toBeTruthy()+ );+ expect(screen.queryByText("project.home.connect")).toBeNull();+ view.unmount();++ mocks.state.serverInfo.defaultProject = "projects/orders";+ mocks.state.fetchDatabases.mockResolvedValue({ databases: [] });+ render(<ProjectHomePage projectId="orders" />);+ await waitFor(() => expect(mocks.state.fetchDatabases).toHaveBeenCalled());+ expect(screen.queryByText("project.home.connect")).toBeNull();+ });++ test("hides the Agent region when AI is not enabled", async () => {+ mocks.state.serverInfo.aiEnabled = false;+ render(<ProjectHomePage projectId="orders" />);+ expect(screen.queryByRole("textbox", { name: "project.home.ai-placeholder" })).toBeNull();+ await waitFor(() => expect(screen.getByText("default")).toBeTruthy());+ });++ test("uses the project page top inset and available width without Agent", async () => {+ mocks.state.serverInfo.aiEnabled = false;+ render(<ProjectHomePage projectId="orders" />);+ await waitFor(() => expect(screen.getByRole("region", { name: "project.home.next-step" })).toBeTruthy());++ const title = screen.getByRole("heading", {+ level: 1,+ name: "Order service",+ });+ expect(title.closest("header")?.classList.contains("py-2")).toBe(false);++ const work = screen.getByRole("region", { name: "project.home.next-step" });+ expect(work.parentElement?.classList.contains("lg:max-w-5xl")).toBe(false);+ });++ test("places the Agent composer below the project title and resource", async () => {+ render(<ProjectHomePage projectId="orders" />);+ await waitFor(() => expect(screen.getByRole("region", { name: "project.home.next-step" })).toBeTruthy());++ const title = screen.getByRole("heading", {+ level: 1,+ name: "Order service",+ });+ const header = title.closest("header");+ const resourceName = screen.getByText("projects/orders");+ const composer = screen.getByRole("textbox", { name: "project.home.ai-placeholder" });+ expect(title.parentElement).toBe(header);+ expect(resourceName.parentElement).toBe(header);+ expect(composer.closest("form")?.previousElementSibling).toBe(header);+ expect(header?.classList.contains("min-w-0")).toBe(true);+ expect(resourceName.classList.contains("break-all")).toBe(true);+ expect(screen.queryByRole("button", { name: "project.home.ask-ai" })).toBeNull();+ });++ test("does not reuse the previous project's database result during navigation", async () => {+ const view = render(<ProjectHomePage projectId="orders" />);+ await waitFor(() => expect(screen.getByRole("region", { name: "project.home.next-step" })).toBeTruthy());++ mocks.state.fetchDatabases.mockImplementation(() => new Promise(() => {}));+ view.rerender(<ProjectHomePage projectId="second" />);+ expect(screen.getByText("Second project")).toBeTruthy();+ expect(screen.queryByRole("region", { name: "project.home.next-step" })).toBeNull();+ expect(screen.queryByText("project.home.connect")).toBeNull();+ await waitFor(() =>+ expect(screen.getByText("project.home.no-active-issues")).toBeTruthy()+ );+ });++ test("shows member-related issues and accessible databases below setup", async () => {+ const review = create(IssueSchema, {+ name: "projects/orders/issues/review",+ title: "Review migration",+ status: IssueStatus.OPEN,+ updateTime: create(TimestampSchema, { seconds: 1760000000n }),+ });+ mocks.state.listIssues.mockImplementation(({ find }) =>+ Promise.resolve({ issues: find.currentApprover ? [review] : [] })+ );+ mocks.state.fetchDatabases.mockResolvedValue({+ databases: [+ create(DatabaseSchema$, {+ name: "instances/primary/databases/orders",+ project: "projects/orders",+ effectiveEnvironment: "environments/prod",+ instanceResource: create(InstanceResourceSchema, { engine: Engine.POSTGRES, title: "Primary instance" }),+ }),+ ],+ });++ render(<ProjectHomePage projectId="orders" />);+ await waitFor(() => expect(screen.getByText("Review migration")).toBeTruthy());+ expect(screen.getByRole("heading", { name: "project.home.active-issues" })).toBeTruthy();+ const activeIssues = screen.getByRole("region", {+ name: "project.home.active-issues",+ });+ expect(activeIssues.querySelector("[data-slot='issue-status-icon']")).toBeTruthy();+ expect(within(activeIssues).queryByText("common.issue")).toBeNull();+ expect(screen.getByText("orders")).toBeTruthy();+ expect(screen.getByText("Production")).toBeTruthy();+ expect(screen.getByText("Primary instance")).toBeTruthy();+ expect(screen.getByRole("region", { name: "project.home.active-issues" })).toBeTruthy();+ expect(screen.getByRole("region", { name: "project.home.databases" })).toBeTruthy();+ expect(await screen.findByRole("region", { name: "project.home.next-step" })).toBeTruthy();+ expect(screen.getByRole("textbox", { name: "project.home.ai-placeholder" })).toBeTruthy();+ expect(mocks.state.listIssues).toHaveBeenCalledWith(+ expect.objectContaining({+ find: expect.objectContaining({+ currentApprover: "users/alice",+ approvalStatus: ApprovalStatus.PENDING,+ }),+ })+ );+ expect(mocks.state.listIssues).toHaveBeenCalledWith(+ expect.objectContaining({+ find: expect.objectContaining({+ creator: "users/alice",+ statusList: [IssueStatus.OPEN],+ }),+ })+ );+ expect(mocks.state.listPlans).toHaveBeenCalledWith(+ expect.objectContaining({+ find: expect.objectContaining({ specType: "change_database_config" }),+ })+ );+ });++ test("shows distinct borderless destination links beside both preview headings", async () => {+ const issue = create(IssueSchema, {+ name: "projects/orders/issues/one",+ title: "Recent change",+ creator: "users/alice",+ status: IssueStatus.OPEN,+ });+ mocks.state.listIssues.mockImplementation(({ find }) =>+ Promise.resolve({ issues: find.creator ? [issue] : [] })+ );+ render(<ProjectHomePage projectId="orders" />);+ await waitFor(() => expect(screen.getByText("Recent change")).toBeTruthy());+ const recent = screen.getByRole("region", { name: "project.home.active-issues" });+ const databases = screen.getByRole("region", { name: "project.home.databases" });+ const issuesLink = within(recent).getByRole("link", { name: "project.home.view-issues" });+ const databasesLink = within(databases).getByRole("link", { name: "project.home.view-all" });+ expect(issuesLink.getAttribute("href")).toBe("workspace.project.issue");+ expect(databasesLink.getAttribute("href")).toBe("workspace.project.database");+ expect(recent.firstElementChild?.contains(issuesLink)).toBe(true);+ expect(databases.firstElementChild?.contains(databasesLink)).toBe(true);+ expect(issuesLink.classList.contains("border")).toBe(false);+ expect(databasesLink.classList.contains("border")).toBe(false);+ expect(issuesLink.classList.contains("outline-item")).toBe(false);+ expect(databasesLink.classList.contains("outline-item")).toBe(false);+ });++ test("keeps completed issues and the empty Issues link off Home", async () => {+ const done = create(IssueSchema, {+ name: "projects/orders/issues/done",+ title: "Completed request",+ creator: "users/alice",+ status: IssueStatus.DONE,+ });+ mocks.state.listIssues.mockImplementation(({ find }) =>+ Promise.resolve({ issues: find.creator ? [done] : [] })+ );++ render(<ProjectHomePage projectId="orders" />);+ await waitFor(() => expect(screen.getByText("project.home.no-active-issues")).toBeTruthy());+ expect(screen.queryByText("Completed request")).toBeNull();+ expect(+ within(screen.getByRole("region", { name: "project.home.active-issues" }))+ .queryByRole("link", { name: "project.home.view-issues" })+ ).toBeNull();+ });++ test("hides the project Issues link without list permission", async () => {+ mocks.missedPermissions = ["bb.issues.list"];+ render(<ProjectHomePage projectId="orders" />);+ await waitFor(() => expect(mocks.state.fetchDatabases).toHaveBeenCalled());+ expect(+ within(screen.getByRole("region", { name: "project.home.active-issues" }))+ .queryByRole("link", { name: "project.home.view-issues" })+ ).toBeNull();+ });++ test("shows an honest database empty state and connects only when eligible", async () => {+ mocks.state.fetchDatabases.mockResolvedValue({ databases: [] });+ render(<ProjectHomePage projectId="orders" />);+ await waitFor(() => expect(screen.getByText("project.home.no-databases")).toBeTruthy());+ expect((await screen.findByRole("link", { name: "project.home.connect" })).getAttribute("href")).toContain("workspace.project.instance");+ expect(+ within(screen.getByRole("region", { name: "project.home.databases" }))+ .queryByRole("link", { name: "project.home.view-all" })+ ).toBeNull();+ });++ test("explains the database prerequisite without a read-only connect action", async () => {+ mocks.missedPermissions = ["bb.instances.create"];+ mocks.state.fetchDatabases.mockResolvedValue({ databases: [] });+ render(<ProjectHomePage projectId="orders" />);+ await waitFor(() =>+ expect(screen.getByText("project.home.no-databases-prerequisite")).toBeTruthy()+ );+ expect(screen.queryByRole("link", { name: "project.home.connect" })).toBeNull();+ });++ test("does not query protected previews without their permissions", async () => {+ mocks.missedPermissions = ["bb.databases.get", "bb.issues.get"];+ render(<ProjectHomePage projectId="orders" />);+ expect(mocks.state.fetchDatabases).not.toHaveBeenCalled();+ expect(mocks.state.listIssues).not.toHaveBeenCalled();+ expect(screen.getByText("project.home.databases-unavailable")).toBeTruthy();+ });++ test("previews readable databases even when the full list route is unavailable", async () => {+ mocks.missedPermissions = ["bb.databases.list"];+ render(<ProjectHomePage projectId="orders" />);+ await waitFor(() => expect(mocks.state.fetchDatabases).toHaveBeenCalled());+ expect(screen.getByText("default")).toBeTruthy();+ expect(+ within(screen.getByRole("region", { name: "project.home.databases" })).queryByRole("link", { name: "project.home.view-all" })+ ).toBeNull();+ });++ test("does not show another project's recent work during navigation", async () => {+ const issue = create(IssueSchema, {+ name: "projects/orders/issues/42",+ title: "Orders change",+ creator: "users/alice",+ });+ mocks.state.listIssues.mockImplementation(({ find }) =>+ Promise.resolve({ issues: find.creator ? [issue] : [] })+ );+ const view = render(<ProjectHomePage projectId="orders" />);+ await waitFor(() => expect(screen.getByText("Orders change")).toBeTruthy());++ mocks.state.listIssues.mockImplementation(() => new Promise(() => {}));+ view.rerender(<ProjectHomePage projectId="second" />);+ expect(screen.queryByText("Orders change")).toBeNull();+ await waitFor(() => expect(screen.getByText("default")).toBeTruthy());+ });++ test("replaces shortcuts with project setup steps", async () => {+ mocks.state.fetchDatabases.mockResolvedValue({ databases: [] });+ render(<ProjectHomePage projectId="orders" />);+ const next = await screen.findByRole("region", { name: "project.home.next-step" });+ expect((await within(next).findByRole("link", { name: "project.home.connect" })).getAttribute("href")).toBe(+ "workspace.project.instance.create"+ );+ expect(within(next).getByRole("link", { name: "project.home.members" })).toBeTruthy();+ expect(screen.queryByRole("region", { name: "project.home.shortcuts" })).toBeNull();+ expect(screen.queryByRole("button", { name: "project.home.customize" })).toBeNull();+ expect(+ within(screen.getByRole("region", { name: "project.home.databases" })).queryByRole("link", {+ name: "project.home.connect",+ })+ ).toBeNull();+ });++ test("shows database change after database creation, but hides setup after a submitted change", async () => {+ const accessIssue = create(IssueSchema, {+ name: "projects/orders/issues/access",+ title: "Access request",+ status: IssueStatus.OPEN,+ });+ mocks.state.listIssues.mockResolvedValue({ issues: [accessIssue] });+ const view = render(<ProjectHomePage projectId="orders" />);+ const next = await screen.findByRole("region", { name: "project.home.next-step" });+ expect((await within(next).findByRole("link", { name: "project.home.change-database" })).getAttribute("href"))+ .toBe("workspace.project.plan.detail");+ expect(mocks.state.listPlans).toHaveBeenCalledWith(+ expect.objectContaining({+ find: expect.objectContaining({ specType: "change_database_config" }),+ })+ );+ expect(screen.getByRole("region", { name: "project.home.next-step" })).toBeTruthy();+ view.unmount();++ mocks.state.listPlans.mockResolvedValue({+ plans: [create(PlanSchema, { issue: "projects/orders/issues/change" })],+ nextPageToken: "",+ });+ render(<ProjectHomePage projectId="orders" />);+ await waitFor(() =>+ expect(mocks.state.fetchIssueByName).toHaveBeenCalledWith(+ "projects/orders/issues/change",+ true+ )+ );+ await waitFor(() => expect(screen.queryByRole("region", { name: "project.home.next-step" })).toBeNull());+ });++ test("finds a submitted database change after unlinked plans on an earlier page", async () => {+ mocks.state.listPlans.mockImplementation(async ({ pageToken }) =>+ pageToken+ ? {+ plans: [create(PlanSchema, { issue: "projects/orders/issues/change" })],+ nextPageToken: "",+ }+ : {+ plans: [create(PlanSchema, { name: "projects/orders/plans/draft" })],+ nextPageToken: "next",+ }+ );+ render(<ProjectHomePage projectId="orders" />);+ await waitFor(() =>+ expect(mocks.state.listPlans).toHaveBeenCalledWith(+ expect.objectContaining({ pageToken: "next" })+ )+ );+ await waitFor(() => expect(screen.queryByRole("region", { name: "project.home.next-step" })).toBeNull());+ });++ test("keeps setup visible when only create-database issues exist", async () => {+ mocks.state.listIssues.mockResolvedValue({+ issues: [+ create(IssueSchema, {+ type: Issue_Type.DATABASE_CHANGE,+ plan: "projects/orders/plans/create-database",+ }),+ ],+ });+ render(<ProjectHomePage projectId="orders" />);+ const next = await screen.findByRole("region", { name: "project.home.next-step" });+ expect(await within(next).findByRole("link", { name: "project.home.change-database" })).toBeTruthy();+ expect(mocks.state.listPlans).toHaveBeenCalledWith(+ expect.objectContaining({+ find: expect.objectContaining({ specType: "change_database_config" }),+ })+ );+ });++ test("keeps setup visible when the linked database-change issue is a draft", async () => {+ mocks.state.listPlans.mockResolvedValue({+ plans: [create(PlanSchema, { issue: "projects/orders/issues/draft" })],+ nextPageToken: "",+ });+ mocks.state.fetchIssueByName.mockResolvedValue(create(IssueSchema, { draft: true }));+ render(<ProjectHomePage projectId="orders" />);+ const next = await screen.findByRole("region", { name: "project.home.next-step" });+ expect(await within(next).findByRole("link", { name: "project.home.change-database" })).toBeTruthy();+ });++ test("discovers changes with issue-read permission without issue-list permission", async () => {+ mocks.missedPermissions = ["bb.issues.list"];+ render(<ProjectHomePage projectId="orders" />);+ const next = await screen.findByRole("region", { name: "project.home.next-step" });+ expect(await within(next).findByRole("link", { name: "project.home.change-database" })).toBeTruthy();+ expect(mocks.state.listPlans).toHaveBeenCalled();+ });+});diff --git a/frontend/src/routes/project/ProjectHomePage.tsx b/frontend/src/routes/project/ProjectHomePage.tsxnew file mode 100644index 0000000000..f9da1a093d--- /dev/null+++ b/frontend/src/routes/project/ProjectHomePage.tsx@@ -0,0 +1,888 @@+import {+ ArrowRightLeft,+ ChevronRight,+ Database,+ PlugZap,+ Send,+ SquareTerminal,+ UsersRound,+ Workflow,+} from "lucide-react";+import { useEffect, useState } from "react";+import { useTranslation } from "react-i18next";+import {+ DATABASE_ROUTE_DASHBOARD,+ PROJECT_V1_ROUTE_DATABASES,+ PROJECT_V1_ROUTE_INSTANCE_CREATE,+ PROJECT_V1_ROUTE_ISSUES,+ PROJECT_V1_ROUTE_MEMBERS,+ SQL_EDITOR_PROJECT_MODULE,+} from "@/app/router/handles";+import { buildPlanCreateRoute } from "@/app/router/routeHelpers";+import { useComponentPermissionState } from "@/components/ComponentPermissionGuard";+import { DatabaseTargetDisplay } from "@/components/DatabaseTargetDisplay";+import { HumanizeTs } from "@/components/HumanizeTs";+import { IssueStatusIcon } from "@/components/IssueStatusIcon";+import { ProjectPageLayout } from "@/components/ProjectPageLayout";+import { RouterLink } from "@/components/RouterLink";+import { Button, buttonVariants } from "@/components/ui/button";+import { Textarea } from "@/components/ui/textarea";+import {+ PREPARE_DATABASE_PRODUCT_INTRO,+ PREPARE_DATABASE_TRANSFER_TIP,+ PRODUCT_INTRO_QUERY_KEY,+ PRODUCT_INTRO_TIP_QUERY_KEY,+} from "@/lib/productIntro";+import {+ selectHasRunningChat,+ useAgentStore,+} from "@/modules/agent/store/agent";+import { useAppStore } from "@/stores/app";+import type { Permission } from "@/types/iam";+import {+ ApprovalStatus,+ IssueStatus,+ State,+} from "@/types/proto-es/v1/common_pb";+import type { Database as DatabaseResource } from "@/types/proto-es/v1/database_service_pb";+import { getUserEmailInBinding } from "@/types/v1/user";+import { autoDatabaseRoute } from "@/utils/auto-route";+import { isBindingPolicyExpired } from "@/utils/v1/iam";+import { getIssueRoute } from "@/utils/v1/issue/issue";+import {+ type ActiveProjectIssue,+ selectActiveProjectIssues,+} from "./projectHomeActiveIssues";+import {+ getProjectHomeNextSteps,+ type ProjectHomeNextStep,+ type ResourceAvailability,+} from "./projectHomeNextSteps";++const HOME_PERMISSIONS: Permission[] = [+ "bb.databases.list",+ "bb.databases.get",+ "bb.databases.update",+ "bb.plans.list",+ "bb.plans.get",+ "bb.planCheckRuns.get",+ "bb.taskRuns.list",+ "bb.plans.create",+ "bb.issues.list",+ "bb.issues.get",+ "bb.instances.list",+ "bb.instances.create",+ "bb.issues.create",+ "bb.sheets.create",+ "bb.projects.getIamPolicy",+ "bb.projects.setIamPolicy",+];+const PLAN_DETAIL_PERMISSIONS: Permission[] = [+ "bb.plans.get",+ "bb.planCheckRuns.get",+ "bb.taskRuns.list",+];++function nextStepTarget(step: ProjectHomeNextStep, projectId: string) {+ const params = { projectId };+ switch (step) {+ case "connect":+ return { name: PROJECT_V1_ROUTE_INSTANCE_CREATE, params };+ case "transferDatabases":+ return {+ name: DATABASE_ROUTE_DASHBOARD,+ query: {+ [PRODUCT_INTRO_QUERY_KEY]: PREPARE_DATABASE_PRODUCT_INTRO,+ [PRODUCT_INTRO_TIP_QUERY_KEY]: PREPARE_DATABASE_TRANSFER_TIP,+ targetProject: `projects/${projectId}`,+ },+ };+ case "createDatabase":+ return {+ name: PROJECT_V1_ROUTE_DATABASES,+ params,+ query: { createDatabase: "1" },+ };+ case "changeDatabase":+ return buildPlanCreateRoute(projectId, {});+ case "queryDatabase":+ return {+ name: SQL_EDITOR_PROJECT_MODULE,+ params: { project: projectId },+ };+ case "members":+ return { name: PROJECT_V1_ROUTE_MEMBERS, params };+ }+}++export function ProjectHomePage({ projectId }: { projectId: string }) {+ const { t } = useTranslation();+ const projectName = `projects/${projectId}`;+ const project = useAppStore((state) => state.projectsByName[projectName]);+ const isArchived = project?.state === State.DELETED;+ const defaultProject = useAppStore(+ (state) => state.serverInfo?.defaultProject ?? ""+ );+ const aiEnabled = useAppStore(+ (state) => state.serverInfo?.aiEnabled === true+ );+ const hasRunningChat = useAgentStore(selectHasRunningChat);+ const hasQueuedMessage = useAgentStore(+ (state) => state.queuedUserMessage !== null+ );+ const [aiPrompt, setAiPrompt] = useState("");+ const [discoveryRefreshToken, setDiscoveryRefreshToken] = useState(0);+ const fetchDatabases = useAppStore((state) => state.fetchDatabases);+ const fetchIssueByName = useAppStore((state) => state.fetchIssueByName);+ const fetchInstanceList = useAppStore((state) => state.fetchInstanceList);+ const listIssues = useAppStore((state) => state.listIssues);+ const listPlans = useAppStore((state) => state.listPlans);+ const canListWorkspaceInstances = useAppStore((state) =>+ state.hasWorkspacePermission("bb.instances.list")+ );+ const canListWorkspaceDatabases = useAppStore((state) =>+ state.hasWorkspacePermission("bb.databases.list")+ );+ const canUpdateWorkspaceDatabases = useAppStore((state) =>+ state.hasWorkspacePermission("bb.databases.update")+ );+ const workspaceName = useAppStore((state) => state.workspaceResourceName());+ const projectPolicy = useAppStore(+ (state) => state.projectPoliciesByName[projectName]+ );+ const member = useAppStore((state) => state.currentUser?.email ?? "");+ const memberName = useAppStore((state) => state.currentUser?.name ?? "");+ useEffect(() => setAiPrompt(""), [projectName]);+ const { missedPermissions } = useComponentPermissionState({+ permissions: HOME_PERMISSIONS,+ project,+ });+ const canListDatabases = !missedPermissions.includes("bb.databases.list");+ const canGetDatabases = !missedPermissions.includes("bb.databases.get");+ const canPreviewDatabases = canGetDatabases;+ const canGetPlanDetail = PLAN_DETAIL_PERMISSIONS.every(+ (permission) => !missedPermissions.includes(permission)+ );+ const canListPlans = !missedPermissions.includes("bb.plans.list");+ const canReadIssues = !missedPermissions.includes("bb.issues.get");+ const canListIssues = !missedPermissions.includes("bb.issues.list");+ const canListProjectInstances =+ !missedPermissions.includes("bb.instances.list") &&+ projectName !== defaultProject;+ const canConnectInstance =+ projectName !== defaultProject &&+ !missedPermissions.includes("bb.instances.create");+ const canManageMembers =+ !missedPermissions.includes("bb.projects.getIamPolicy") &&+ !missedPermissions.includes("bb.projects.setIamPolicy");+ const canCreateDatabase =+ canListDatabases &&+ !missedPermissions.includes("bb.instances.list") &&+ !missedPermissions.includes("bb.issues.create") &&+ !missedPermissions.includes("bb.plans.create") &&+ !missedPermissions.includes("bb.sheets.create");+ const canTransferDatabases =+ canListWorkspaceDatabases &&+ canUpdateWorkspaceDatabases &&+ !missedPermissions.includes("bb.databases.update") &&+ Boolean(defaultProject && workspaceName);+ const canCreateChange =+ !missedPermissions.includes("bb.plans.create") &&+ !missedPermissions.includes("bb.issues.create") &&+ !missedPermissions.includes("bb.sheets.create") &&+ canGetPlanDetail;+ const canQueryDatabase =+ canListDatabases && !missedPermissions.includes("bb.projects.getIamPolicy");+ const membership =+ !projectPolicy || !member || !canManageMembers+ ? "unknown"+ : projectPolicy.bindings+ .filter((binding) => !isBindingPolicyExpired(binding))+ .some((binding) =>+ binding.members.some(+ (principal) =>+ principal.toLowerCase() !==+ getUserEmailInBinding(member).toLowerCase()+ )+ )+ ? "has-collaborators"+ : "solo";+ const [databaseState, setDatabaseState] = useState<{+ projectName: string;+ availability: ResourceAvailability;+ databases: DatabaseResource[];+ }>({ projectName, availability: "loading", databases: [] });+ const availability = !canPreviewDatabases+ ? "unknown"+ : databaseState.projectName === projectName+ ? databaseState.availability+ : "loading";+ const databases =+ databaseState.projectName === projectName ? databaseState.databases : [];+ const [instanceState, setInstanceState] = useState<{+ projectName: string;+ availability: ResourceAvailability;+ }>({ projectName, availability: "loading" });+ const instanceAvailability =+ instanceState.projectName === projectName+ ? instanceState.availability+ : "loading";+ const [transferState, setTransferState] = useState<{+ projectName: string;+ availability: ResourceAvailability;+ }>({ projectName, availability: "loading" });+ const transferableDatabaseAvailability = !canTransferDatabases+ ? "empty"+ : transferState.projectName === projectName+ ? transferState.availability+ : "loading";+ const activeIssueKey = `${projectName}:${memberName}:${canReadIssues}`;+ const [activeIssueState, setActiveIssueState] = useState<{+ key: string;+ status: "loading" | "ready" | "unavailable";+ issues: ActiveProjectIssue[];+ }>({ key: activeIssueKey, status: "loading", issues: [] });+ const activeIssues =+ activeIssueState.key === activeIssueKey ? activeIssueState.issues : [];+ const activeIssueStatus =+ activeIssueState.key === activeIssueKey+ ? activeIssueState.status+ : "loading";+ const [changeState, setChangeState] = useState<{+ projectName: string;+ status: "loading" | "not-started" | "submitted" | "unknown";+ }>({ projectName, status: "loading" });+ const changeStatus =+ changeState.projectName === projectName ? changeState.status : "loading";++ useEffect(() => {+ if (isArchived || !canPreviewDatabases) return;+ let active = true;+ setDatabaseState({ projectName, availability: "loading", databases: [] });+ void fetchDatabases({ parent: projectName, pageSize: 3, silent: true })+ .then(({ databases }) => {+ if (active) {+ setDatabaseState({+ projectName,+ availability: databases.length ? "present" : "empty",+ databases,+ });+ }+ })+ .catch(() => {+ if (active) {+ setDatabaseState({+ projectName,+ availability: "unknown",+ databases: [],+ });+ }+ });+ return () => {+ active = false;+ };+ }, [+ canPreviewDatabases,+ discoveryRefreshToken,+ fetchDatabases,+ isArchived,+ projectName,+ ]);++ useEffect(() => {+ if (isArchived || availability !== "empty") return;+ let active = true;+ if (!canListProjectInstances && !canListWorkspaceInstances) {+ setInstanceState({ projectName, availability: "unknown" });+ return;+ }+ const inspectInstances = async (parent?: string) => {+ let pageToken = "";+ do {+ const result = await fetchInstanceList({+ parent,+ pageSize: 100,+ pageToken,+ filter: { state: State.ACTIVE },+ silent: true,+ });+ if (result.instances.length > 0) {+ return "present" as const;+ }+ pageToken = result.nextPageToken;+ } while (pageToken);+ return "empty" as const;+ };+ const requests = [+ ...(canListProjectInstances ? [inspectInstances(projectName)] : []),+ ...(canListWorkspaceInstances ? [inspectInstances()] : []),+ ];+ setInstanceState({ projectName, availability: "loading" });+ void Promise.allSettled(requests).then((results) => {+ if (!active) return;+ const states = results.map((result) =>+ result.status === "fulfilled" ? result.value : "unknown"+ );+ setInstanceState({+ projectName,+ availability: states.includes("present")+ ? "present"+ : states.includes("unknown")+ ? "unknown"+ : "empty",+ });+ });+ return () => {+ active = false;+ };+ }, [+ availability,+ canListProjectInstances,+ canListWorkspaceInstances,+ fetchInstanceList,+ isArchived,+ projectName,+ discoveryRefreshToken,+ ]);++ useEffect(() => {+ if (isArchived || availability !== "empty") return;+ if (!canTransferDatabases) {+ setTransferState({ projectName, availability: "empty" });+ return;+ }+ let active = true;+ setTransferState({ projectName, availability: "loading" });+ void fetchDatabases({+ parent: workspaceName,+ pageSize: 1,+ filter: { project: defaultProject },+ silent: true,+ })+ .then(({ databases }) => {+ if (active) {+ setTransferState({+ projectName,+ availability: databases.length ? "present" : "empty",+ });+ }+ })+ .catch(() => {+ if (active) setTransferState({ projectName, availability: "unknown" });+ });+ return () => {+ active = false;+ };+ }, [+ availability,+ canTransferDatabases,+ defaultProject,+ fetchDatabases,+ isArchived,+ projectName,+ workspaceName,+ ]);++ useEffect(() => {+ if (isArchived || availability !== "present") return;+ let active = true;+ if (!canReadIssues || !canListPlans) {+ setChangeState({ projectName, status: "unknown" });+ return;+ }+ setChangeState({ projectName, status: "loading" });+ const load = async () => {+ let pageToken = "";+ try {+ do {+ const result = await listPlans({+ find: {+ project: projectName,+ specType: "change_database_config",+ state: "ACTIVE",+ },+ pageSize: 20,+ pageToken,+ });+ if (!active) return;+ for (const plan of result.plans) {+ if (!plan.issue) continue;+ const issue = await fetchIssueByName(plan.issue, true);+ if (!active) return;+ if (!issue.draft) {+ setChangeState({ projectName, status: "submitted" });+ return;+ }+ }+ pageToken = result.nextPageToken;+ } while (pageToken);+ setChangeState({ projectName, status: "not-started" });+ } catch {+ if (active) setChangeState({ projectName, status: "unknown" });+ }+ };+ void load();+ return () => {+ active = false;+ };+ }, [+ availability,+ canListPlans,+ canReadIssues,+ fetchIssueByName,+ isArchived,+ listPlans,+ projectName,+ ]);++ useEffect(() => {+ if (isArchived) return;+ let active = true;+ if (!memberName || !canReadIssues) {+ setActiveIssueState({+ key: activeIssueKey,+ status: "unavailable",+ issues: [],+ });+ return;+ }+ setActiveIssueState({ key: activeIssueKey, status: "loading", issues: [] });+ const requests = [+ listIssues({+ find: {+ project: projectName,+ query: "",+ currentApprover: memberName,+ statusList: [IssueStatus.OPEN],+ approvalStatus: ApprovalStatus.PENDING,+ orderBy: "update_time desc",+ },+ pageSize: 5,+ }).then(({ issues }) => ({ kind: "review" as const, issues })),+ listIssues({+ find: {+ project: projectName,+ query: "",+ creator: memberName,+ statusList: [IssueStatus.OPEN],+ orderBy: "update_time desc",+ },+ pageSize: 5,+ }).then(({ issues }) => ({ kind: "issues" as const, issues })),+ ];+ void Promise.allSettled(requests).then((results) => {+ if (!active) return;+ const fulfilled = results.flatMap((result) =>+ result.status === "fulfilled" ? [result.value] : []+ );+ if (!fulfilled.length) {+ setActiveIssueState({+ key: activeIssueKey,+ status: "unavailable",+ issues: [],+ });+ return;+ }+ const issues = selectActiveProjectIssues({+ projectName,+ memberName,+ awaitingReview: fulfilled.flatMap((result) =>+ result.kind === "review" ? result.issues : []+ ),+ createdIssues: fulfilled.flatMap((result) =>+ result.kind === "issues" ? result.issues : []+ ),+ }).slice(0, 3);+ setActiveIssueState({+ key: activeIssueKey,+ status:+ !issues.length && fulfilled.length !== results.length+ ? "unavailable"+ : "ready",+ issues,+ });+ });+ return () => {+ active = false;+ };+ }, [+ canReadIssues,+ listIssues,+ memberName,+ projectName,+ activeIssueKey,+ isArchived,+ ]);++ const nextSteps = getProjectHomeNextSteps({+ database: availability,+ instance: instanceAvailability,+ transferableDatabase: transferableDatabaseAvailability,+ change: changeStatus,+ membership,+ isDefault: projectName === defaultProject,+ canConnectInstance,+ canTransferDatabases,+ canCreateDatabase,+ canCreateChange,+ canQueryDatabase,+ canManageMembers,+ });++ const nextStepCopy = (step: ProjectHomeNextStep) => {+ switch (step) {+ case "connect":+ return [+ t("project.home.connect"),+ t("project.home.connect-description"),+ ];+ case "transferDatabases":+ return [+ t("project.home.transfer-databases"),+ t("project.home.transfer-databases-description"),+ ];+ case "createDatabase":+ return [+ t("project.home.create-database"),+ t("project.home.create-database-description"),+ ];+ case "changeDatabase":+ return [+ t("project.home.change-database"),+ t("project.home.change-database-description"),+ ];+ case "queryDatabase":+ return [+ t("project.home.query-database"),+ t("project.home.query-database-description"),+ ];+ case "members":+ return [+ t("project.home.members"),+ t("project.home.members-optional-description"),+ ];+ }+ };++ const nextStepIcon = (step: ProjectHomeNextStep) => {+ switch (step) {+ case "connect":+ return PlugZap;+ case "transferDatabases":+ return ArrowRightLeft;+ case "createDatabase":+ return Database;+ case "changeDatabase":+ return Workflow;+ case "queryDatabase":+ return SquareTerminal;+ case "members":+ return UsersRound;+ }+ };++ if (!project) return null;++ if (isArchived) {+ return (+ <ProjectPageLayout>+ <header className="min-w-0">+ <h1 className="max-w-full break-words text-2xl font-bold text-main">+ {project.title}+ </h1>+ <p className="mt-1 break-all text-sm text-control-light">+ {project.name}+ </p>+ </header>+ <p className="text-sm text-control-light">+ {t("project.home.archived-description")}+ </p>+ </ProjectPageLayout>+ );+ }++ const sendAIMessage = () => {+ const text = aiPrompt.trim();+ if (!text || !aiEnabled) return;+ const store = useAgentStore.getState();+ if (selectHasRunningChat(store) || store.queuedUserMessage) return;+ const page = {+ path: `${window.location.pathname}${window.location.search}${window.location.hash}`,+ title: document.title,+ };+ const chat = store.createChat({ context: project.name, page });+ store.queueUserMessage({ chatId: chat.id, text, page });+ store.open();+ setAiPrompt("");+ };++ return (+ <ProjectPageLayout>+ <header className="min-w-0">+ <h1 className="max-w-full break-words text-2xl font-bold text-main">+ {project.title}+ </h1>+ <p className="mt-1 break-all text-sm text-control-light">+ {project.name}+ </p>+ </header>++ {aiEnabled && (+ <form+ className="min-w-0 rounded-sm border border-accent/60 bg-background focus-within:border-accent focus-within:ring-1 focus-within:ring-accent"+ onSubmit={(event) => {+ event.preventDefault();+ sendAIMessage();+ }}+ >+ <Textarea+ size="md"+ rows={2}+ value={aiPrompt}+ aria-label={t("project.home.ai-placeholder")}+ placeholder={t("project.home.ai-placeholder")}+ className="min-h-20 resize-none border-0 focus:border-0 focus:ring-0"+ onChange={(event) => setAiPrompt(event.target.value)}+ />+ <div className="flex flex-wrap items-center justify-between gap-2 px-3 pb-3">+ <span className="min-w-0 flex-1 truncate text-xs text-control-light">+ {t("agent.context")}: {project.title}+ </span>+ <Button+ type="submit"+ size="sm"+ disabled={!aiPrompt.trim() || hasRunningChat || hasQueuedMessage}+ >+ <Send className="size-4" />+ {t("agent.send")}+ </Button>+ </div>+ </form>+ )}++ {nextSteps.length > 0 && (+ <section className="min-w-0" aria-labelledby="project-home-next-step">+ <h2+ id="project-home-next-step"+ className="border-b border-block-border pb-3 text-base font-semibold text-main"+ >+ {t("project.home.next-step")}+ </h2>+ {nextSteps.map((step, index) => {+ const Icon = nextStepIcon(step);+ const [title, description] = nextStepCopy(step);+ return (+ <div+ key={step}+ className="flex min-w-0 flex-wrap items-center gap-3 border-b border-block-border py-4"+ >+ <Icon+ className="size-4 shrink-0 text-control"+ aria-hidden="true"+ />+ <div className="min-w-0 flex-1">+ <h3 className="text-sm font-medium text-main">{title}</h3>+ <p className="text-xs text-control-light">{description}</p>+ </div>+ <RouterLink+ to={nextStepTarget(step, projectId)}+ className={buttonVariants({+ size: "sm",+ appearance:+ index === 0 && step !== "members" ? "solid" : "outline",+ })}+ >+ {title}+ </RouterLink>+ </div>+ );+ })}+ </section>+ )}++ <div className="mt-4 grid min-w-0 grid-cols-1 gap-8 lg:grid-cols-5">+ <section+ className="min-w-0 lg:col-span-3"+ aria-labelledby="project-home-active-issues"+ >+ <div className="mb-3 flex min-w-0 items-center justify-between gap-2">+ <h2+ id="project-home-active-issues"+ className="text-base font-semibold text-main"+ >+ {t("project.home.active-issues")}+ </h2>+ {canListIssues &&+ activeIssueStatus === "ready" &&+ activeIssues.length > 0 && (+ <RouterLink+ to={{ name: PROJECT_V1_ROUTE_ISSUES, params: { projectId } }}+ className="shrink-0 rounded-xs text-xs font-medium text-control-light no-underline hover:text-main focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2"+ >+ {t("project.home.view-issues")}+ </RouterLink>+ )}+ </div>+ {activeIssueStatus === "ready" && activeIssues.length ? (+ <div className="border-t border-block-border">+ {activeIssues.map((item) => {+ const title = item.issue.title || item.name.split("/").at(-1);+ const canOpen = !item.issue.plan || canGetPlanDetail;+ const content = (+ <>+ <span className="flex h-6 shrink-0 items-center">+ <IssueStatusIcon status={item.issue.status} />+ </span>+ <span className="min-w-0 flex-1">+ <span className="block truncate text-base font-medium">+ {title}+ </span>+ <span className="mt-1 flex flex-wrap items-center gap-x-1.5 gap-y-1 text-xs text-control-light">+ <span>{t("common.open")}</span>+ <span aria-hidden="true">·</span>+ <span>+ {item.relation === "review"+ ? t("project.home.needs-review")+ : t("project.home.created-by-you")}+ </span>+ {item.updatedAt > 0 && (+ <>+ <span aria-hidden="true">·</span>+ <span>+ {t("common.updated")}{" "}+ <HumanizeTs tsMs={item.updatedAt} mode="queue" />+ </span>+ </>+ )}+ </span>+ </span>+ {canOpen && (+ <ChevronRight+ className="size-4 shrink-0 text-control-light"+ aria-hidden="true"+ />+ )}+ </>+ );+ return (+ <div key={item.name} className="border-b border-block-border">+ {canOpen ? (+ <RouterLink+ to={getIssueRoute(item.issue)}+ className="flex min-w-0 items-start gap-2 rounded-xs px-1 py-3 text-main no-underline outline-item hover:bg-control-bg/60"+ >+ {content}+ </RouterLink>+ ) : (+ <div className="flex min-w-0 items-start gap-2 px-1 py-3 text-main">+ {content}+ </div>+ )}+ </div>+ );+ })}+ </div>+ ) : (+ <p className="border-t border-block-border py-4 text-sm text-control-light">+ {activeIssueStatus === "loading"+ ? t("common.loading")+ : activeIssueStatus === "unavailable"+ ? t("project.home.active-issues-unavailable")+ : t("project.home.no-active-issues")}+ </p>+ )}+ </section>++ <section+ className="min-w-0 lg:col-span-2"+ aria-labelledby="project-home-databases"+ >+ <div className="mb-3 flex min-w-0 items-center justify-between gap-2">+ <h2+ id="project-home-databases"+ className="text-base font-semibold text-main"+ >+ {t("project.home.databases")}+ </h2>+ {canListDatabases && availability === "present" && (+ <RouterLink+ to={{ name: PROJECT_V1_ROUTE_DATABASES, params: { projectId } }}+ className="shrink-0 rounded-xs text-xs font-medium text-control-light no-underline hover:text-main focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2"+ >+ {t("project.home.view-all")}+ </RouterLink>+ )}+ </div>+ {availability === "present" ? (+ <div className="border-t border-block-border">+ {databases.map((database) => (+ <RouterLink+ key={database.name}+ to={autoDatabaseRoute(database)}+ className="flex min-w-0 items-center gap-3 border-b border-block-border px-1 py-4 text-main no-underline outline-item hover:bg-control-bg"+ >+ <DatabaseTargetDisplay+ database={database}+ showEnvironment+ className="min-w-0 flex-1"+ />+ <ChevronRight+ className="size-4 shrink-0 text-control-light"+ aria-hidden="true"+ />+ </RouterLink>+ ))}+ </div>+ ) : (+ <div className="border-t border-block-border py-4 text-sm text-control-light">+ <p>+ {availability === "loading"+ ? t("common.loading")+ : availability === "empty"+ ? t("project.home.no-databases")+ : canPreviewDatabases+ ? t("project.home.databases-load-error")+ : t("project.home.databases-unavailable")}+ </p>+ {availability === "empty" && (+ <>+ {transferableDatabaseAvailability === "present" &&+ canTransferDatabases && (+ <p className="mt-1">+ {t("project.home.no-databases-transfer-description")}+ </p>+ )}+ {transferableDatabaseAvailability !== "present" &&+ instanceAvailability === "empty" && (+ <p className="mt-1">+ {canConnectInstance+ ? t("project.home.no-databases-description")+ : t("project.home.no-databases-prerequisite")}+ </p>+ )}+ {transferableDatabaseAvailability !== "present" &&+ instanceAvailability === "present" && (+ <p className="mt-1">+ {t("project.home.no-databases-create-description")}+ </p>+ )}+ </>+ )}+ {availability === "unknown" && canPreviewDatabases && (+ <Button+ type="button"+ size="sm"+ appearance="outline"+ className="mt-2"+ onClick={() => setDiscoveryRefreshToken((value) => value + 1)}+ >+ {t("common.refresh")}+ </Button>+ )}+ </div>+ )}+ </section>+ </div>+ </ProjectPageLayout>+ );+}diff --git a/frontend/src/routes/project/projectHomeActiveIssues.test.ts b/frontend/src/routes/project/projectHomeActiveIssues.test.tsnew file mode 100644index 0000000000..39a6bc6714--- /dev/null+++ b/frontend/src/routes/project/projectHomeActiveIssues.test.ts@@ -0,0 +1,91 @@+import { create } from "@bufbuild/protobuf";+import { TimestampSchema } from "@bufbuild/protobuf/wkt";+import { describe, expect, test } from "vitest";+import { IssueStatus } from "@/types/proto-es/v1/common_pb";+import { IssueSchema } from "@/types/proto-es/v1/issue_service_pb";+import { selectActiveProjectIssues } from "./projectHomeActiveIssues";++const time = (seconds: number) =>+ create(TimestampSchema, { seconds: BigInt(seconds) });++describe("selectActiveProjectIssues", () => {+ test("keeps only member-related issues in the current project, newest first", () => {+ const review = create(IssueSchema, {+ name: "projects/orders/issues/review",+ title: "Review migration",+ updateTime: time(30),+ });+ const created = create(IssueSchema, {+ name: "projects/orders/issues/created",+ creator: "users/alice",+ updateTime: time(10),+ });+ const unrelated = create(IssueSchema, {+ name: "projects/orders/issues/unrelated",+ creator: "users/bob",+ updateTime: time(50),+ });+ const otherProject = create(IssueSchema, {+ name: "projects/other/issues/review",+ updateTime: time(60),+ });+ const result = selectActiveProjectIssues({+ projectName: "projects/orders",+ memberName: "users/alice",+ awaitingReview: [review, otherProject],+ createdIssues: [created, unrelated],+ });++ expect(result.map(({ name, relation }) => [name, relation])).toEqual([+ [review.name, "review"],+ [created.name, "created"],+ ]);+ });++ test("deduplicates created and review issues, preferring the review relation", () => {+ const issue = create(IssueSchema, {+ name: "projects/orders/issues/one",+ creator: "users/alice",+ updateTime: time(10),+ });+ const result = selectActiveProjectIssues({+ projectName: "projects/orders",+ memberName: "users/alice",+ awaitingReview: [issue],+ createdIssues: [issue],+ });++ expect(result.map(({ name, relation }) => [name, relation])).toEqual([+ [issue.name, "review"],+ ]);+ });++ test("keeps completed and canceled issues out of the active preview", () => {+ const open = create(IssueSchema, {+ name: "projects/orders/issues/open",+ creator: "users/alice",+ status: IssueStatus.OPEN,+ updateTime: time(10),+ });+ const done = create(IssueSchema, {+ name: "projects/orders/issues/done",+ creator: "users/alice",+ status: IssueStatus.DONE,+ updateTime: time(30),+ });+ const canceled = create(IssueSchema, {+ name: "projects/orders/issues/canceled",+ creator: "users/alice",+ status: IssueStatus.CANCELED,+ updateTime: time(20),+ });+ const result = selectActiveProjectIssues({+ projectName: "projects/orders",+ memberName: "users/alice",+ awaitingReview: [],+ createdIssues: [done, canceled, open],+ });++ expect(result.map(({ name }) => name)).toEqual([open.name]);+ });+});diff --git a/frontend/src/routes/project/projectHomeActiveIssues.ts b/frontend/src/routes/project/projectHomeActiveIssues.tsnew file mode 100644index 0000000000..9249c9077a--- /dev/null+++ b/frontend/src/routes/project/projectHomeActiveIssues.ts@@ -0,0 +1,59 @@+import { getTimeForPbTimestampProtoEs } from "@/types";+import { IssueStatus } from "@/types/proto-es/v1/common_pb";+import type { Issue } from "@/types/proto-es/v1/issue_service_pb";++export type ActiveProjectIssue = {+ name: string;+ relation: "review" | "created";+ updatedAt: number;+ issue: Issue;+};++export function selectActiveProjectIssues({+ projectName,+ memberName,+ awaitingReview,+ createdIssues,+}: {+ projectName: string;+ memberName: string;+ awaitingReview: Issue[];+ createdIssues: Issue[];+}): ActiveProjectIssue[] {+ const issues = new Map<string, ActiveProjectIssue>();+ for (const issue of createdIssues) {+ if (+ issue.name.startsWith(`${projectName}/issues/`) &&+ issue.creator === memberName &&+ issue.status !== IssueStatus.DONE &&+ issue.status !== IssueStatus.CANCELED+ ) {+ issues.set(issue.name, {+ name: issue.name,+ relation: "created",+ updatedAt:+ getTimeForPbTimestampProtoEs(issue.updateTime ?? issue.createTime) ??+ 0,+ issue,+ });+ }+ }+ for (const issue of awaitingReview) {+ if (+ issue.name.startsWith(`${projectName}/issues/`) &&+ issue.status !== IssueStatus.DONE &&+ issue.status !== IssueStatus.CANCELED+ ) {+ issues.set(issue.name, {+ name: issue.name,+ relation: "review",+ updatedAt:+ getTimeForPbTimestampProtoEs(issue.updateTime ?? issue.createTime) ??+ 0,+ issue,+ });+ }+ }++ return [...issues.values()].sort((a, b) => b.updatedAt - a.updatedAt);+}diff --git a/frontend/src/routes/project/projectHomeNextSteps.test.ts b/frontend/src/routes/project/projectHomeNextSteps.test.tsnew file mode 100644index 0000000000..f7d5dfceb9--- /dev/null+++ b/frontend/src/routes/project/projectHomeNextSteps.test.ts@@ -0,0 +1,174 @@+import { describe, expect, test } from "vitest";+import { getProjectHomeNextSteps } from "./projectHomeNextSteps";++const input = {+ database: "empty" as const,+ instance: "empty" as const,+ transferableDatabase: "empty" as const,+ change: "not-started" as const,+ membership: "solo" as const,+ isDefault: false,+ canConnectInstance: true,+ canTransferDatabases: true,+ canCreateDatabase: true,+ canCreateChange: true,+ canQueryDatabase: true,+ canManageMembers: true,+};++describe("getProjectHomeNextSteps", () => {+ test("connects an instance first in a new project", () => {+ expect(getProjectHomeNextSteps(input)).toEqual(["connect", "members"]);+ });++ test("creates a database when a usable instance exists", () => {+ expect(getProjectHomeNextSteps({ ...input, instance: "present" })).toEqual([+ "createDatabase",+ "members",+ ]);+ });++ test("offers transfer first and creation second for unassigned databases", () => {+ expect(+ getProjectHomeNextSteps({+ ...input,+ instance: "present",+ transferableDatabase: "present",+ })+ ).toEqual(["transferDatabases", "createDatabase", "members"]);+ });++ test("offers transfer without instance-list access when unassigned databases exist", () => {+ expect(+ getProjectHomeNextSteps({+ ...input,+ instance: "unknown",+ transferableDatabase: "present",+ canCreateDatabase: false,+ })+ ).toEqual(["transferDatabases", "members"]);+ });++ test("waits for transfer discovery before choosing the primary action", () => {+ expect(+ getProjectHomeNextSteps({+ ...input,+ instance: "present",+ transferableDatabase: "loading",+ })+ ).toEqual(["members"]);+ });++ test("falls back to creation when transfer is unavailable", () => {+ expect(+ getProjectHomeNextSteps({+ ...input,+ instance: "present",+ transferableDatabase: "present",+ canTransferDatabases: false,+ })+ ).toEqual(["createDatabase", "members"]);+ expect(+ getProjectHomeNextSteps({+ ...input,+ instance: "present",+ transferableDatabase: "unknown",+ })+ ).toEqual(["createDatabase", "members"]);+ });++ test("keeps membership setup available while resource state is uncertain", () => {+ expect(getProjectHomeNextSteps({ ...input, instance: "unknown" })).toEqual([+ "members",+ ]);+ expect(getProjectHomeNextSteps({ ...input, database: "unknown" })).toEqual([+ "members",+ ]);+ });++ test("offers database change creation when plan history is unavailable", () => {+ expect(+ getProjectHomeNextSteps({+ ...input,+ database: "present",+ change: "unknown",+ })+ ).toEqual(["changeDatabase", "queryDatabase", "members"]);+ });++ test("waits for initial discovery before showing membership setup", () => {+ expect(getProjectHomeNextSteps({ ...input, database: "loading" })).toEqual(+ []+ );+ expect(+ getProjectHomeNextSteps({+ ...input,+ database: "present",+ change: "loading",+ })+ ).toEqual([]);+ });++ test("offers a first database change and optional membership setup", () => {+ expect(getProjectHomeNextSteps({ ...input, database: "present" })).toEqual([+ "changeDatabase",+ "queryDatabase",+ "members",+ ]);+ expect(+ getProjectHomeNextSteps({+ ...input,+ database: "present",+ membership: "has-collaborators",+ })+ ).toEqual(["changeDatabase", "queryDatabase"]);+ });++ test("only offers querying alongside a database change when SQL Editor is available", () => {+ expect(+ getProjectHomeNextSteps({+ ...input,+ database: "present",+ canQueryDatabase: false,+ })+ ).toEqual(["changeDatabase", "members"]);+ expect(+ getProjectHomeNextSteps({+ ...input,+ database: "present",+ canCreateChange: false,+ })+ ).toEqual(["members"]);+ });++ test("hides setup after the first submitted database change", () => {+ expect(+ getProjectHomeNextSteps({+ ...input,+ database: "present",+ change: "submitted",+ })+ ).toEqual([]);+ });++ test("does not show an action the member cannot take", () => {+ expect(+ getProjectHomeNextSteps({+ ...input,+ canConnectInstance: false,+ canManageMembers: false,+ })+ ).toEqual([]);+ expect(+ getProjectHomeNextSteps({+ ...input,+ database: "present",+ canCreateChange: false,+ })+ ).toEqual(["members"]);+ });++ test("does not show project setup on the default project", () => {+ expect(getProjectHomeNextSteps({ ...input, isDefault: true })).toEqual([]);+ });+});diff --git a/frontend/src/routes/project/projectHomeNextSteps.ts b/frontend/src/routes/project/projectHomeNextSteps.tsnew file mode 100644index 0000000000..973637c7f5--- /dev/null+++ b/frontend/src/routes/project/projectHomeNextSteps.ts@@ -0,0 +1,75 @@+export type ResourceAvailability = "loading" | "present" | "empty" | "unknown";++export type ProjectHomeNextStep =+ | "connect"+ | "transferDatabases"+ | "createDatabase"+ | "changeDatabase"+ | "queryDatabase"+ | "members";++export type ProjectHomeNextStepInput = {+ database: ResourceAvailability;+ instance: ResourceAvailability;+ transferableDatabase: ResourceAvailability;+ change: "loading" | "not-started" | "submitted" | "unknown";+ membership: "unknown" | "solo" | "has-collaborators";+ isDefault: boolean;+ canConnectInstance: boolean;+ canTransferDatabases: boolean;+ canCreateDatabase: boolean;+ canCreateChange: boolean;+ canQueryDatabase: boolean;+ canManageMembers: boolean;+};++export function getProjectHomeNextSteps(+ input: ProjectHomeNextStepInput+): ProjectHomeNextStep[] {+ const canOfferTransfer =+ input.database === "empty" &&+ input.canTransferDatabases &&+ input.transferableDatabase === "present";+ if (+ input.isDefault ||+ input.change === "submitted" ||+ input.database === "loading" ||+ (input.database === "present" && input.change === "loading")+ ) {+ return [];+ }++ const steps: ProjectHomeNextStep[] = [];+ const transferIsLoading =+ input.canTransferDatabases && input.transferableDatabase === "loading";+ if (input.database === "empty" && !transferIsLoading) {+ if (canOfferTransfer) {+ steps.push("transferDatabases");+ }+ if (+ input.instance === "empty" &&+ !canOfferTransfer &&+ input.canConnectInstance+ ) {+ steps.push("connect");+ } else if (input.instance === "present") {+ if (input.canCreateDatabase) {+ steps.push("createDatabase");+ }+ }+ } else if (+ input.database === "present" &&+ (input.change === "not-started" || input.change === "unknown") &&+ input.canCreateChange+ ) {+ steps.push("changeDatabase");+ if (input.canQueryDatabase) {+ steps.push("queryDatabase");+ }+ }++ if (input.membership === "solo" && input.canManageMembers) {+ steps.push("members");+ }+ return steps;+}diff --git a/frontend/src/routes/workspace/DatabasesPage.test.tsx b/frontend/src/routes/workspace/DatabasesPage.test.tsxindex 06b1cfd89c..f314a638e4 100644--- a/frontend/src/routes/workspace/DatabasesPage.test.tsx+++ b/frontend/src/routes/workspace/DatabasesPage.test.tsx@@ -119,7 +119,16 @@ vi.mock("@/components/database", () => ({/>),LabelEditorSheet: () => null,- TransferProjectSheet: () => null,+ TransferProjectSheet: ({+ initialProjectName,+ }: {+ initialProjectName?: string;+ }) => (+ <div+ data-testid="transfer-project-sheet"+ data-initial-project={initialProjectName ?? ""}+ />+ ),}));const DatabaseTableMock = ({@@ -212,6 +221,31 @@ beforeEach(async () => {});describe("DatabasesPage", () => {+ test("carries the Project Home transfer target into the transfer sheet", async () => {+ mocks.currentRoute = {+ query: { targetProject: "projects/orders" },+ };+ const container = document.createElement("div");+ const root = createRoot(container);++ await act(async () => {+ root.render(+ <MemoryRouter>+ <DatabasesPage />+ </MemoryRouter>+ );+ await Promise.resolve();+ });++ expect(+ container+ .querySelector("[data-testid='transfer-project-sheet']")+ ?.getAttribute("data-initial-project")+ ).toBe("projects/orders");++ act(() => root.unmount());+ });+test("passes selected project-instance databases to batch operations", async () => {const databaseName ="projects/app/instances/bound/databases/project-database";diff --git a/frontend/src/routes/workspace/DatabasesPage.tsx b/frontend/src/routes/workspace/DatabasesPage.tsxindex a77d9edaac..d4af8fa60c 100644--- a/frontend/src/routes/workspace/DatabasesPage.tsx+++ b/frontend/src/routes/workspace/DatabasesPage.tsx@@ -50,6 +50,7 @@ import {} from "@/stores/modules/v1/common";import {isValidDatabaseName,+ isValidProjectName,UNKNOWN_ENVIRONMENT_NAME,unknownEnvironment,} from "@/types";@@ -562,6 +563,12 @@ export function DatabasesPage() {<TransferProjectSheetopen={showTransferDrawer}databases={selectedDatabases}+ initialProjectName={+ typeof currentRoute.query.targetProject === "string" &&+ isValidProjectName(currentRoute.query.targetProject)+ ? currentRoute.query.targetProject+ : undefined+ }onClose={() => setShowTransferDrawer(false)}onTransfer={handleTransferProject}/>diff --git a/frontend/src/routes/workspace/ProjectsPage.test.tsx b/frontend/src/routes/workspace/ProjectsPage.test.tsxindex 0b69b44c35..a5a5ae024a 100644--- a/frontend/src/routes/workspace/ProjectsPage.test.tsx+++ b/frontend/src/routes/workspace/ProjectsPage.test.tsx@@ -1,9 +1,14 @@-import { render, waitFor } from "@testing-library/react";-import { StrictMode, type ReactNode } from "react";+import { fireEvent, render, waitFor } from "@testing-library/react";+import { StrictMode, type MouseEvent, type ReactNode } from "react";import { describe, expect, test, vi } from "vitest";+import { PROJECT_V1_ROUTE_DETAIL } from "@/app/router/handles";import { ProjectsPage } from "./ProjectsPage";-const mocks = vi.hoisted(() => ({ fetchProjectList: vi.fn() }));+const mocks = vi.hoisted(() => ({+ fetchProjectList: vi.fn(),+ routerPush: vi.fn(),+ routerResolve: vi.fn(() => ({ fullPath: "/projects/visible" })),+}));vi.mock("@/stores/app", () => {const state = {isLoggedIn: () => true,@@ -21,7 +26,7 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));vi.mock("@/app/router", () => ({- router: {},+ router: { push: mocks.routerPush, resolve: mocks.routerResolve },useCurrentRoute: () => ({ query: {} }),}));vi.mock("@/app/router/NavigationScrollRestoration", () => ({@@ -39,8 +44,24 @@ vi.mock("@/components/PermissionGuard", () => ({PermissionGuard: () => null,}));vi.mock("@/components/ProjectTable", () => ({- ProjectTable: ({ projectList }: { projectList: { name: string }[] }) => (- <div>{projectList.map((p) => p.name).join(",")}</div>+ ProjectTable: ({+ projectList,+ onRowClick,+ }: {+ projectList: { name: string }[];+ onRowClick?: (project: { name: string }, event: MouseEvent<HTMLElement>) => void;+ }) => (+ <div>+ {projectList.map((project) => (+ <button+ key={project.name}+ type="button"+ onClick={(event) => onRowClick?.(project, event)}+ >+ {project.name}+ </button>+ ))}+ </div>),}));vi.mock("@/components/WorkspacePageLayout", () => {@@ -80,6 +101,30 @@ vi.mock("@/utils", async (original) => ({}));describe("ProjectsPage", () => {+ test("opens Project Home from a project row and in a new tab", async () => {+ mocks.fetchProjectList.mockResolvedValue({+ projects: [{ name: "projects/visible" }],+ nextPageToken: "",+ });+ const open = vi.spyOn(window, "open").mockImplementation(() => null);+ const view = render(<ProjectsPage />);+ const row = await view.findByRole("button", { name: "projects/visible" });+ const destination = {+ name: PROJECT_V1_ROUTE_DETAIL,+ params: { projectId: "visible" },+ };++ fireEvent.click(row);+ expect(mocks.routerPush).toHaveBeenCalledWith(destination);++ fireEvent.click(row, { metaKey: true });+ expect(mocks.routerResolve).toHaveBeenLastCalledWith(destination);+ expect(open).toHaveBeenCalledWith("/projects/visible", "_blank");++ view.unmount();+ open.mockRestore();+ });+test("restarts the canceled initial fetch during StrictMode replay", async () => {const signals: AbortSignal[] = [];mocks.fetchProjectList.mockImplementation(diff --git a/frontend/src/routes/workspace/ProjectsPage.tsx b/frontend/src/routes/workspace/ProjectsPage.tsxindex 9cd12238d9..f1d5c5827d 100644--- a/frontend/src/routes/workspace/ProjectsPage.tsx+++ b/frontend/src/routes/workspace/ProjectsPage.tsx@@ -2,10 +2,7 @@ import { Archive, Check, EllipsisVertical, Plus, Trash2 } from "lucide-react";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";import { router, useCurrentRoute } from "@/app/router";-import {- PROJECT_V1_ROUTE_DATABASES,- PROJECT_V1_ROUTE_ISSUES,-} from "@/app/router/handles";+import { PROJECT_V1_ROUTE_DETAIL } from "@/app/router/handles";import {markListScrollRestorationEntry,useListScrollRestorationLoadMore,@@ -53,9 +50,7 @@ import {useURLSearchParam,} from "@/hooks/useURLSearchParam";import {- CONNECT_DATABASE_PRODUCT_INTRO,CREATE_PROJECT_PRODUCT_INTRO,- PRODUCT_INTRO_QUERY_KEY,useProductIntro,} from "@/lib/productIntro";import {@@ -76,9 +71,9 @@ import {const parseProjectSearch = createAdvancedSearchParser(["state", "label"]);-export function projectIssuesRoute(project: Project) {+function projectHomeRoute(project: Project) {return {- name: PROJECT_V1_ROUTE_ISSUES,+ name: PROJECT_V1_ROUTE_DETAIL,params: { projectId: getProjectName(project.name) },};}@@ -590,20 +585,19 @@ export function ProjectsPage() {const handleCreated = useCallback((project: Project) => {router.push({- name: PROJECT_V1_ROUTE_DATABASES,+ name: PROJECT_V1_ROUTE_DETAIL,params: { projectId: getProjectName(project.name) },- query: { [PRODUCT_INTRO_QUERY_KEY]: CONNECT_DATABASE_PRODUCT_INTRO },});}, []);const handleRowClick = useCallback((project: Project, e: React.MouseEvent<HTMLElement>) => {- const route = router.resolve(projectIssuesRoute(project));+ const route = router.resolve(projectHomeRoute(project));if (e.ctrlKey || e.metaKey) {window.open(route.fullPath, "_blank");} else {markListScrollRestorationEntry();- router.push(projectIssuesRoute(project));+ router.push(projectHomeRoute(project));}},[]diff --git a/frontend/src/routes/workspace/general/AIAugmentationSection.test.tsx b/frontend/src/routes/workspace/general/AIAugmentationSection.test.tsxnew file mode 100644index 0000000000..06aed80d4b--- /dev/null+++ b/frontend/src/routes/workspace/general/AIAugmentationSection.test.tsx@@ -0,0 +1,102 @@+import { createRef, type ReactNode } from "react";+import { act, fireEvent, render, screen } from "@testing-library/react";+import { beforeEach, describe, expect, test, vi } from "vitest";+import type { SectionHandle } from "./useSettingSection";++const mocks = vi.hoisted(() => ({+ getOrFetchSettingByName: vi.fn(),+ upsertSetting: vi.fn(),+ refreshServerInfo: vi.fn(),+}));++vi.mock("react-i18next", () => ({+ useTranslation: () => ({ t: (key: string) => key }),+}));+vi.mock("@/hooks/useAppState", () => ({+ useServerState: () => ({ isSaaSMode: false }),+}));+vi.mock("@/lib/productIntro", () => ({+ AI_ASSISTANT_PRODUCT_INTRO: "ai-assistant",+ useProductIntro: vi.fn(),+}));+vi.mock("@/utils", () => ({+ hasWorkspacePermissionV2: () => true,+}));+vi.mock("@/stores/app", () => {+ const state = {+ settingsByName: {},+ getSettingByName: () => undefined,+ getOrFetchSettingByName: mocks.getOrFetchSettingByName,+ upsertSetting: mocks.upsertSetting,+ refreshServerInfo: mocks.refreshServerInfo,+ };+ return {+ useAppStore: Object.assign(+ (selector: (value: typeof state) => unknown) => selector(state),+ { getState: () => state }+ ),+ };+});+vi.mock("@/components/ComponentPermissionGuard", () => ({+ ComponentPermissionGuard: ({ children }: { children: ReactNode }) => children,+}));+vi.mock("@/components/PermissionGuard", () => ({+ PermissionGuard: ({ children }: { children: ReactNode }) => children,+}));+vi.mock("@/components/LearnMoreLink", () => ({+ LearnMoreLink: () => null,+}));+vi.mock("@/components/ui/alert", () => ({+ Alert: ({ description }: { description: ReactNode }) => <div>{description}</div>,+}));+vi.mock("@/components/ui/form", () => ({+ FormField: ({ children, title }: { children?: ReactNode; title: ReactNode }) => (+ <div>{title}{children}</div>+ ),+ FormFieldGroup: ({ children }: { children: ReactNode }) => <div>{children}</div>,+ FormSection: ({ children }: { children: ReactNode }) => <section>{children}</section>,+}));+vi.mock("@/components/ui/input", () => ({+ Input: (props: React.InputHTMLAttributes<HTMLInputElement>) => <input {...props} />,+}));+vi.mock("@/components/ui/select", () => ({+ Select: ({ children }: { children: ReactNode }) => <div>{children}</div>,+ SelectContent: ({ children }: { children: ReactNode }) => <div>{children}</div>,+ SelectItem: ({ children }: { children: ReactNode }) => <div>{children}</div>,+ SelectTrigger: ({ children }: { children: ReactNode }) => <div>{children}</div>,+ SelectValue: ({ children }: { children: ReactNode }) => <div>{children}</div>,+}));+vi.mock("@/components/ui/switch", () => ({+ Switch: ({ checked, onCheckedChange }: { checked: boolean; onCheckedChange: (checked: boolean) => void }) => (+ <input+ aria-label="enable-ai"+ type="checkbox"+ checked={checked}+ onChange={(event) => onCheckedChange(event.target.checked)}+ />+ ),+}));++import { AIAugmentationSection } from "./AIAugmentationSection";++describe("AIAugmentationSection", () => {+ beforeEach(() => {+ vi.clearAllMocks();+ mocks.upsertSetting.mockResolvedValue(undefined);+ mocks.refreshServerInfo.mockResolvedValue(undefined);+ });++ test("saves AI without depending on a second actuator request", async () => {+ mocks.refreshServerInfo.mockRejectedValue(new Error("refresh failed"));+ const ref = createRef<SectionHandle>();+ render(+ <AIAugmentationSection ref={ref} title="AI" onDirtyChange={vi.fn()} />+ );++ fireEvent.click(screen.getByRole("checkbox", { name: "enable-ai" }));+ await act(async () => ref.current?.update());++ expect(mocks.upsertSetting).toHaveBeenCalledOnce();+ expect(mocks.refreshServerInfo).not.toHaveBeenCalled();+ });+});diff --git a/frontend/src/stores/app/workspace.test.ts b/frontend/src/stores/app/workspace.test.tsnew file mode 100644index 0000000000..1a595bcef4--- /dev/null+++ b/frontend/src/stores/app/workspace.test.ts@@ -0,0 +1,103 @@+import { create } from "@bufbuild/protobuf";+import { beforeEach, describe, expect, test, vi } from "vitest";+import { ActuatorInfoSchema } from "@/types/proto-es/v1/actuator_service_pb";+import {+ AISettingSchema,+ Setting_SettingName,+ SettingSchema,+ SettingValueSchema,+} from "@/types/proto-es/v1/setting_service_pb";+import { createWorkspaceSlice } from "./workspace";++const mocks = vi.hoisted(() => ({+ updateSetting: vi.fn(),+}));++vi.mock("@/api", () => ({+ settingServiceClientConnect: { updateSetting: mocks.updateSetting },+}));+vi.mock("@/stores/workspaceSwitchChannel", () => ({+ workspaceSwitchChannel: { addEventListener: vi.fn() },+}));++const createStore = () => {+ const state: Record<string, unknown> = {};+ const set = (updater: unknown) => {+ const patch =+ typeof updater === "function"+ ? (updater as (value: typeof state) => object)(state)+ : updater;+ Object.assign(state, patch);+ };+ Object.assign(+ state,+ createWorkspaceSlice(set as never, (() => state) as never, {} as never)+ );+ state.serverInfo = create(ActuatorInfoSchema, { aiEnabled: false });+ return state as ReturnType<typeof createWorkspaceSlice>;+};++const aiSetting = (enabled: boolean) =>+ create(SettingSchema, {+ name: "settings/AI",+ value: create(SettingValueSchema, {+ value: {+ case: "ai",+ value: create(AISettingSchema, { enabled }),+ },+ }),+ });++describe("workspace AI setting cache", () => {+ beforeEach(() => vi.clearAllMocks());++ test("updates Ask AI availability from a successful setting response", async () => {+ const store = createStore();+ const enabled = aiSetting(true);+ mocks.updateSetting.mockResolvedValueOnce(enabled);++ await store.upsertSetting({+ name: Setting_SettingName.AI,+ value: enabled.value!,+ });++ expect(store.serverInfo?.aiEnabled).toBe(true);+ expect(store.settingsByName[enabled.name]).toBe(enabled);++ const disabled = aiSetting(false);+ mocks.updateSetting.mockResolvedValueOnce(disabled);+ await store.upsertSetting({+ name: Setting_SettingName.AI,+ value: disabled.value!,+ });+ expect(store.serverInfo?.aiEnabled).toBe(false);+ });++ test("does not change Ask AI availability when the setting save fails", async () => {+ const store = createStore();+ mocks.updateSetting.mockRejectedValueOnce(new Error("save failed"));++ await expect(+ store.upsertSetting({+ name: Setting_SettingName.AI,+ value: aiSetting(true).value!,+ })+ ).rejects.toThrow("save failed");++ expect(store.serverInfo?.aiEnabled).toBe(false);+ });++ test("does not change Ask AI availability for a validation-only response", async () => {+ const store = createStore();+ const setting = aiSetting(true);+ mocks.updateSetting.mockResolvedValueOnce(setting);++ await store.upsertSetting({+ name: Setting_SettingName.AI,+ value: setting.value!,+ validateOnly: true,+ });++ expect(store.serverInfo?.aiEnabled).toBe(false);+ });+});diff --git a/frontend/src/stores/app/workspace.ts b/frontend/src/stores/app/workspace.tsindex e25d95cad5..38bb32fe05 100644--- a/frontend/src/stores/app/workspace.ts+++ b/frontend/src/stores/app/workspace.ts@@ -436,6 +436,19 @@ export const createWorkspaceSlice: AppSliceCreator<WorkspaceSlice> = (}));get().setSettingByName(response);+ const settingValue = response.value?.value;+ if (+ !validateOnly &&+ name === Setting_SettingName.AI &&+ settingValue?.case === "ai"+ ) {+ set((state) => ({+ serverInfo: state.serverInfo && {+ ...state.serverInfo,+ aiEnabled: settingValue.value.enabled,+ },+ }));+ }return response;},diff --git a/frontend/src/types/proto-es/v1/actuator_service_pb.d.ts b/frontend/src/types/proto-es/v1/actuator_service_pb.d.tsindex 0978872943..0ac62fe99c 100644--- a/frontend/src/types/proto-es/v1/actuator_service_pb.d.ts+++ b/frontend/src/types/proto-es/v1/actuator_service_pb.d.ts@@ -201,6 +201,13 @@ export declare type ActuatorInfo = Message<"bytebase.v1.ActuatorInfo"> & {* @generated from field: bytebase.v1.MCPSetting mcp_setting = 30;*/mcpSetting?: MCPSetting | undefined;++ /**+ * Whether the workspace AI setting enables the AI agent.+ *+ * @generated from field: bool ai_enabled = 31;+ */+ aiEnabled: boolean;};/**diff --git a/frontend/src/types/proto-es/v1/actuator_service_pb.js b/frontend/src/types/proto-es/v1/actuator_service_pb.jsindex 85d7ed8db3..c99f855950 100644--- a/frontend/src/types/proto-es/v1/actuator_service_pb.js+++ b/frontend/src/types/proto-es/v1/actuator_service_pb.js@@ -15,7 +15,7 @@ import { file_v1_setting_service } from "./setting_service_pb";* Describes the file v1/actuator_service.proto.*/export const file_v1_actuator_service = /*@__PURE__*/- fileDesc("Chl2MS9hY3R1YXRvcl9zZXJ2aWNlLnByb3RvEgtieXRlYmFzZS52MSIYChZHZXRBY3R1YXRvckluZm9SZXF1ZXN0ItEBCgpTYW1wbGVJbmZvEhYKCWF2YWlsYWJsZRgBIAEoCEID4EEDEjgKCWluc3RhbmNlcxgCIAMoCzIgLmJ5dGViYXNlLnYxLlNhbXBsZUluZm8uSW5zdGFuY2VCA+BBAxpxCghJbnN0YW5jZRIvCghpbnN0YW5jZRgBIAEoCUId4EED+kEXChVieXRlYmFzZS5jb20vSW5zdGFuY2USNAoLZXhwaXJlX3RpbWUYAiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wQgPgQQMi5AQKDEFjdHVhdG9ySW5mbxIUCgd2ZXJzaW9uGAEgASgJQgPgQQMSFwoKZ2l0X2NvbW1pdBgCIAEoCUID4EEDEhEKBHNhYXMYBCABKAhCA+BBAxIZCgxleHRlcm5hbF91cmwYCCABKAlCA+BBAxI5ChBsYXN0X2FjdGl2ZV90aW1lGAsgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcEID4EEDEhYKCXdvcmtzcGFjZRgNIAEoCUID4EEDEiAKE3VubGljZW5zZWRfZmVhdHVyZXMYDyADKAlCA+BBAxIlChhhY3RpdmF0ZWRfaW5zdGFuY2VfY291bnQYFCABKAVCA+BBAxIhChR0b3RhbF9pbnN0YW5jZV9jb3VudBgVIAEoBUID4EEDEiMKFmV4dGVybmFsX3VybF9mcm9tX2ZsYWcYFyABKAhCA+BBAxIaCg1yZXBsaWNhX2NvdW50GBggASgFQgPgQQMSHAoPZGVmYXVsdF9wcm9qZWN0GBogASgJQgPgQQMSHgoRdXNlcl9jb3VudF9pbl9pYW0YGyABKAVCA+BBAxIiChVhY3RpdmVfdmNzX3VzZXJfY291bnQYHCABKAVCA+BBAxIsCgZzYW1wbGUYHSABKAsyFy5ieXRlYmFzZS52MS5TYW1wbGVJbmZvQgPgQQMSMQoLbWNwX3NldHRpbmcYHiABKAsyFy5ieXRlYmFzZS52MS5NQ1BTZXR0aW5nQgPgQQNKBAgDEARKBAgFEAhKBAgJEApKBAgKEAtKBAgMEA1KBAgOEA9KBAgQEBRKBAgWEBdKBAgZEBoyhgEKD0FjdHVhdG9yU2VydmljZRJzCg9HZXRBY3R1YXRvckluZm8SIy5ieXRlYmFzZS52MS5HZXRBY3R1YXRvckluZm9SZXF1ZXN0GhkuYnl0ZWJhc2UudjEuQWN0dWF0b3JJbmZvIiDaQQCg6jABgtPkkwITEhEvdjEvYWN0dWF0b3IvaW5mb0KqAQoPY29tLmJ5dGViYXNlLnYxQhRBY3R1YXRvclNlcnZpY2VQcm90b1ABWjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxogIDQlhYqgILQnl0ZWJhc2UuVjHKAgtCeXRlYmFzZVxWMeICF0J5dGViYXNlXFYxXEdQQk1ldGFkYXRh6gIMQnl0ZWJhc2U6OlYxYgZwcm90bzM", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_timestamp, file_v1_annotation, file_v1_setting_service]);+ fileDesc("Chl2MS9hY3R1YXRvcl9zZXJ2aWNlLnByb3RvEgtieXRlYmFzZS52MSIYChZHZXRBY3R1YXRvckluZm9SZXF1ZXN0ItEBCgpTYW1wbGVJbmZvEhYKCWF2YWlsYWJsZRgBIAEoCEID4EEDEjgKCWluc3RhbmNlcxgCIAMoCzIgLmJ5dGViYXNlLnYxLlNhbXBsZUluZm8uSW5zdGFuY2VCA+BBAxpxCghJbnN0YW5jZRIvCghpbnN0YW5jZRgBIAEoCUId4EED+kEXChVieXRlYmFzZS5jb20vSW5zdGFuY2USNAoLZXhwaXJlX3RpbWUYAiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wQgPgQQMi/QQKDEFjdHVhdG9ySW5mbxIUCgd2ZXJzaW9uGAEgASgJQgPgQQMSFwoKZ2l0X2NvbW1pdBgCIAEoCUID4EEDEhEKBHNhYXMYBCABKAhCA+BBAxIZCgxleHRlcm5hbF91cmwYCCABKAlCA+BBAxI5ChBsYXN0X2FjdGl2ZV90aW1lGAsgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcEID4EEDEhYKCXdvcmtzcGFjZRgNIAEoCUID4EEDEiAKE3VubGljZW5zZWRfZmVhdHVyZXMYDyADKAlCA+BBAxIlChhhY3RpdmF0ZWRfaW5zdGFuY2VfY291bnQYFCABKAVCA+BBAxIhChR0b3RhbF9pbnN0YW5jZV9jb3VudBgVIAEoBUID4EEDEiMKFmV4dGVybmFsX3VybF9mcm9tX2ZsYWcYFyABKAhCA+BBAxIaCg1yZXBsaWNhX2NvdW50GBggASgFQgPgQQMSHAoPZGVmYXVsdF9wcm9qZWN0GBogASgJQgPgQQMSHgoRdXNlcl9jb3VudF9pbl9pYW0YGyABKAVCA+BBAxIiChVhY3RpdmVfdmNzX3VzZXJfY291bnQYHCABKAVCA+BBAxIsCgZzYW1wbGUYHSABKAsyFy5ieXRlYmFzZS52MS5TYW1wbGVJbmZvQgPgQQMSMQoLbWNwX3NldHRpbmcYHiABKAsyFy5ieXRlYmFzZS52MS5NQ1BTZXR0aW5nQgPgQQMSFwoKYWlfZW5hYmxlZBgfIAEoCEID4EEDSgQIAxAESgQIBRAISgQICRAKSgQIChALSgQIDBANSgQIDhAPSgQIEBAUSgQIFhAXSgQIGRAaMoYBCg9BY3R1YXRvclNlcnZpY2UScwoPR2V0QWN0dWF0b3JJbmZvEiMuYnl0ZWJhc2UudjEuR2V0QWN0dWF0b3JJbmZvUmVxdWVzdBoZLmJ5dGViYXNlLnYxLkFjdHVhdG9ySW5mbyIg2kEAoOowAYLT5JMCExIRL3YxL2FjdHVhdG9yL2luZm9CqgEKD2NvbS5ieXRlYmFzZS52MUIUQWN0dWF0b3JTZXJ2aWNlUHJvdG9QAVo0Z2l0aHViLmNvbS9ieXRlYmFzZS9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MaICA0JYWKoCC0J5dGViYXNlLlYxygILQnl0ZWJhc2VcVjHiAhdCeXRlYmFzZVxWMVxHUEJNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_timestamp, file_v1_annotation, file_v1_setting_service]);/*** Describes the message bytebase.v1.GetActuatorInfoRequest.diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex 2f1585cc75..3fee8a3d0f 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -19,7 +19,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -64,7 +63,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -109,7 +107,6 @@ paths:- name: Connect-Protocol-Versionin: headerdescription: Define the version of the Connect protocol- required: trueschema:$ref: '#/components/schemas/connect-protocol-version'example: 1@@ -16927,6 +16924,11 @@ components:title: mcp_settingdescription: The MCP (Model Context Protocol) setting in the current workspace.readOnly: true+ aiEnabled:+ type: boolean+ title: ai_enabled+ description: Whether the workspace AI setting enables the AI agent.+ readOnly: truetitle: ActuatorInfoadditionalProperties: falsedescription: |-@@ -31996,7 +31998,7 @@ components:description: 'A URL that acts as a globally unique identifier for the type of the serialized message. For example: `type.googleapis.com/google.rpc.ErrorInfo`.'value:type: string- format: binary+ format: bytedescription: The Protobuf message, serialized as bytes and base64-encoded. The specific message type is identified by the `type` field.debug:type: objectdiff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.htmlindex 1ea281785d..f01ce27be8 100644--- a/proto/gen/grpc-doc/store/index.html+++ b/proto/gen/grpc-doc/store/index.html@@ -1657,7 +1657,7 @@ The server computes expire_time from this value at activation time. </p></td><td><p>Lowercase hex SHA-256 of query after trimming boundary space, tab, LF, CR,vertical tab, and form feed. Derived by the store for grant matching. </p></td></tr>-+</tbody></table>diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex b819a475f4..dc5fa23b4e 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -5068,6 +5068,7 @@ Actuator concept is similar to the Spring Boot Actuator.| active_vcs_user_count | [int32](#int32) | | The number of active VCS users seen in the active window. || sample | [SampleInfo](#bytebase-v1-SampleInfo) | | Sample setup availability and provisioned resources. || mcp_setting | [MCPSetting](#bytebase-v1-MCPSetting) | | The MCP (Model Context Protocol) setting in the current workspace. |+| ai_enabled | [bool](#bool) | | Whether the workspace AI setting enables the AI agent. |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex aa62d3d4f1..e438ae262d 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -14842,6 +14842,13 @@ Format: projects/{id} </p></td><td><p>The MCP (Model Context Protocol) setting in the current workspace. </p></td></tr>+ <tr>+ <td>ai_enabled</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether the workspace AI setting enables the AI agent. </p></td>+ </tr>+</tbody></table>diff --git a/proto/v1/v1/actuator_service.proto b/proto/v1/v1/actuator_service.protoindex 866fdf3468..56ebf6ea0c 100644--- a/proto/v1/v1/actuator_service.proto+++ b/proto/v1/v1/actuator_service.proto@@ -103,4 +103,7 @@ message ActuatorInfo {// The MCP (Model Context Protocol) setting in the current workspace.MCPSetting mcp_setting = 30 [(google.api.field_behavior) = OUTPUT_ONLY];++ // Whether the workspace AI setting enables the AI agent.+ bool ai_enabled = 31 [(google.api.field_behavior) = OUTPUT_ONLY];}