Conversation
当 WebSocket 因网络问题断开时,updateSubscriptions() 只检查订阅集合是否相同, 未检查连接是否真的存在,导致断开后无法重连。 现在会额外检查需要的连接是否都存在,如果缺失则重新建立连接。 Made-with: Cursor
- 后端:手动下单 API,trigger_type 区分 AUTO/MANUAL,价格 4 位小数向上取整 - 前端:监控页手动买入 Up/Down 按钮、二次确认弹窗、策略信息移动端适配 - 下单价格最多 4 位小数;确认页方向仅显示 Up/Down;按钮文案改为「买入 Up/Down」 Made-with: Cursor
- 后端 initMonitor 支持可选 periodStartUnix,按指定周期取市场与 tokenIds - 前端周期切换时调用 monitorInit 传入 pushPeriod,确保 tokenIds 与当前周期一致 - 修复切换周期无变化及手动下单报 orderbook does not exist Made-with: Cursor
- 移动端策略选择器:标题与下拉框垂直布局,支持换行显示 - 下拉框选项支持文本换行,避免长策略名称被截断 - 移动端手动下单按钮改为底部悬浮固定显示 - 两个按钮均分屏幕宽度,符合移动端触摸操作规范 Made-with: Cursor
- 后端返回 amountMode 和 amountValue 字段,支持前端获取策略配置 - 手动下单确认弹窗显示用户可用余额(绿色高亮) - 价格输入框右侧添加"获取最新价"按钮,支持实时更新价格 - 数量输入框右侧添加"最大"按钮,根据余额自动计算最大购买数量 - 修正数量计算逻辑:FIXED 和 RATIO 模式均按实际金额计算数量,保留2位小数 - FIXED 模式:使用配置的固定金额 - RATIO 模式:按比例计算可用余额 - 数量计算使用保留小数方式(而非向上取整),确保精确匹配投入金额 - 示例:固定1U,价格0.4,自动填充2.5张 - 示例:比例30%,余额20U,价格0.4,自动填充15张 Made-with: Cursor
- 移除 RATIO 模式下对 defaultAmountUsdc 的 Math.floor 取整 - 保持精确的金额用于计算数量,确保符合用户预期 - 修复示例:60%比例,余额2.95U,价格0.682 - 修复前:数量 = 1.47(金额被截断为1U) - 修复后:数量 = 2.60(金额正确为1.77U) Made-with: Cursor
- 修改前:只能整数数量,导致余额浪费 - 示例:余额2.95U,价格0.86 → 数量3张(浪费0.37U) - 修改后:保留2位小数,充分利用余额 - 示例:余额2.95U,价格0.86 → 数量3.43张(利用全部余额) Made-with: Cursor
- 修改所有价格限制从 1 改为 0.99 - 影响位置: - handleOpenManualOrderModal: 默认价格计算 - handlePriceChange: 手动修改价格 - handleFetchLatestPrice: 获取最新价 - handleSizeChange: 修改数量时重新计算价格 - handleManualOrder: 提交订单时 - 确保价格不会超过 Polymarket 的最高限制 0.99 Made-with: Cursor
- 刷新页面时保留当前选择的策略(localStorage 缓存) - 移动端下单弹窗改为 BottomSheet 样式,更紧凑 - 买入按钮实时显示当前价格,如 "买入 Up (0.50)" - 周期切换时自动关闭弹窗并提示用户 Made-with: Cursor
- 赎回通知区分输赢:赢的仓位显示"赎回成功",输的仓位显示"已结算(无收益)" - 买入/卖出/赎回通知消息中添加钱包可用余额显示 - 新增多语言文案支持 Made-with: Cursor
- 移动端:Cell 样式美化,渐变背景头部,资产常驻显示 - PC 端:操作列改用图标,合并跟单/回测数到图标 Badge - 跟单/回测数量用 Badge 显示,数量为 0 时半透明禁用 Made-with: Cursor
- 优化 AccountList、BacktestList、CopyTradingList、CryptoTailStrategyList、LeaderList、TemplateList、UserList 页面操作栏 - 添加空数据状态提示 - 添加相关多语言翻译 key Made-with: Cursor
- 后端: 收益曲线 API (pnl-curve)、CryptoTailStrategyService.getPnlCurve、gt 扩展导入 - 前端: CryptoTailPnlCurveModal 弹窗,统计卡片+时间筛选+ECharts 累计收益图 - 策略列表: 桌面/移动端「收益曲线」入口,图标改为蓝色(#1890ff) - 切换时间范围保留旧数据避免图表容器卸载导致空白 - 今日/7天/30天用折线、全部用平滑曲线 - 多语言: viewPnlCurve、pnlCurve.* (zh-CN/zh-TW/en) Made-with: Cursor
- 操作列编辑、统计等改为 Tooltip+图标点击,与策略列表风格统一 - 操作列宽度 200 -> 160 Made-with: Cursor
Made-with: Cursor
将12列精简为8列: - 合并"数量"和"平均价格"为"持仓"列 - 合并"当前价格"、"当前价值"、"盈亏"、"已实现盈亏"为"当前价值/盈亏"列 - 减少列宽度,提升表格紧凑性 Made-with: Cursor
- Remove package-only build type, unify to single build flow - Add TG notification after package upload (before Docker build) - Add TG notification after Docker image push - Update notification messages to English - Rename "Tag" to "Version" in notifications Made-with: Cursor
后端:
- 新增通知模板表与实体、DTO、Repository、NotificationTemplateService
- 支持 {{variable}} 模板语法,提供模板类型与变量接口
- TelegramNotificationService 改为通过模板渲染发送(ORDER_SUCCESS/ORDER_FAILED/ORDER_FILTERED/CRYPTO_TAIL_SUCCESS/REDEEM_SUCCESS/REDEEM_NO_RETURN)
- 模板 CRUD、重置默认、测试发送接口
- 补全订单过滤相关 i18n key(zh/en/zh-TW)
前端:
- 消息推送设置抽离为独立页 /system-settings/notification
- 系统设置概览改为入口卡片,侧栏增加「消息推送设置」菜单
- NotificationSettingsPage: 机器人配置 + 模板配置双卡片布局(与概览一致)
- 模板配置支持选择类型、编辑内容、变量面板(点击复制、悬停说明)、保存/重置/测试
- 多语言 key 补全(notificationSettings.templates.*、templateTypes.*)
Made-with: Cursor
- 布局优化:模板类型改为顶部Tabs,内容区70%+变量面板30% - 变量Tag UI优化:更精致的样式和悬浮效果 - 多语言:添加模板类型描述、变量label/description的i18n key(三语言) - 后端精简:移除DTO中冗余的label/description/templateTypeName字段 - 清理:移除未使用的templates状态和fetchTemplates方法 Made-with: Cursor
Made-with: Cursor
- 将 create-release.sh 脚本改造为 Cursor skill - 支持生成中英文 Release 内容 - 自动在 Issue #1 发布面向用户的公告 - 支持 commit 过滤(排除版本内修复) Made-with: Cursor
- 实际成交价公式: original_size * price / size_matched,数量展示用 size_matched - OrderPushService/OrderStatusUpdateService/CryptoTail: 用公式计算 avgFilledPrice,移除 getTrades 依赖 - TelegramNotificationService: 有 avgFilledPrice 时展示数量用 filled,ORDER_SUCCESS/CRYPTO_TAIL 一致 - 前端订单推送: 有成交时展示 size_matched;无 orderDetail 时用 WebSocket 数据计算价格与数量 - OrderDetailDto 增加 avgFilledPrice;PolymarketClobService 移除 getAvgFilledPriceFromTradeIds Made-with: Cursor
- 手动卖出订单通知:side 固定为 SELL,outcome 使用 request.side(市场方向) - 创建订单失败时从 API errorBody 解析 error 字段(Gson),用于 TG 通知展示 - 成功/失败分支均使用 NewOrderResponse.getErrorMessage() 获取错误文案 Made-with: Cursor
- 修复移动端 Tooltip 与点击事件冲突导致变量无法复制的问题 - 添加移动端备用复制方法(textarea + execCommand) - 移除变量标签中的复制图标 - 移动端模板输入框调整为 15 行 - 调整系统设置菜单顺序 Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.