Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Allowed types:

1. 确保 `master` 分支代码已更新 (pull latest)。
2. 创建发布分支,如 `release-v1.2.0`。
3. 更新 `frontend/package.json` 中的版本号。
3. 更新 `frontend/package.json`、`frontend/tauri/tauri.conf.json` 中的版本号。
4. 运行全链路测试 (`npm run test:e2e` 与 `go test ./...`) 确保版本稳定性。
5. 提交变更并创建 PR。
6. PR 合并后,切换回 `master` 分支并拉取最新代码。
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ function App() {
<div className="flex flex-col h-screen bg-white overflow-hidden">
{/* Titlebar / Tab Bar */}
<div className="titlebar h-11 flex items-end bg-[#f3f3f3] border-b border-gray-200 pl-20 pr-4 select-none draggable-region">
<div className="flex items-end gap-1 overflow-x-auto scrollbar-hide h-full no-drag">
<div className="flex items-end gap-1 overflow-x-auto overflow-y-hidden scrollbar-hide h-full no-drag">
{sessions.map((session, index) => (
<div
key={session.id}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<title>vstable</title>
</head>
<body>
<body spellcheck="false" autocorrect="off" autocapitalize="off">
<div id="root"></div>
<script type="module" src="./main.tsx"></script>
</body>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/layouts/TabWorkspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const TabWorkspace: React.FC<TabWorkspaceProps> = ({ isMaximized, setIsMa
>
<div
ref={tabContainerRef}
className="flex items-end gap-1 overflow-x-auto no-drag scrollbar-hide flex-1 h-full elastic-scroll"
className="flex items-end gap-1 overflow-x-auto overflow-y-hidden no-drag scrollbar-hide flex-1 h-full"
onDoubleClick={(e) => {
if (e.target === e.currentTarget) setIsMaximized(!isMaximized);
}}
Expand Down
2 changes: 1 addition & 1 deletion frontend/tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub fn run() {
});

// Give the sidecar some time to start before the frontend tries to connect
std::thread::sleep(std::time::Duration::from_secs(2));
std::thread::sleep(std::time::Duration::from_millis(500));

Ok(())
})
Expand Down
11 changes: 10 additions & 1 deletion frontend/tauri/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,16 @@ pub fn prost_value_to_json(v: prost_types::Value) -> serde_json::Value {
Some(Kind::NumberValue(n)) => serde_json::Value::Number(
serde_json::Number::from_f64(n).unwrap_or(serde_json::Number::from(0)),
),
Some(Kind::StringValue(s)) => serde_json::Value::String(s),
Some(Kind::StringValue(s)) => {
// Attempt to parse string as JSON. If it's a valid JSON object or array,
// return the parsed value instead of the string.
if (s.starts_with('{') && s.ends_with('}')) || (s.starts_with('[') && s.ends_with(']')) {
if let Ok(json_val) = serde_json::from_str(&s) {
return json_val;
}
}
serde_json::Value::String(s)
}
Some(Kind::ListValue(l)) => {
serde_json::Value::Array(l.values.into_iter().map(prost_value_to_json).collect())
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
"productName": "vstable",
"version": "0.1.0",
"version": "0.5.2",
"identifier": "com.rust17.vstable",
"build": {
"frontendDist": "../dist",
Expand Down
Loading