- Remove firstSet guard in AppConfig.setValues to immediately persist stop loss and risk settings to DB
- Normalize LOSS_MAX_MONEY to positive value for UI while correctly comparing in AutoTradingManager
- Activate canAddNewPosition in AutoTradingManager based on actual holding count (< maxAllowedStocks)
- Bypass max holding limit for existing holding watering (!hasCode) so averaging down continues
- Verified with compileKotlin and full project build
- Decouple sell order tick offsets:
- Separate morningSellOrderAppend (morning exit sell order above avg price) and stopLossOrderAppend (stop-loss sell order tick offset from current price) in TradeConfig and TradeConfigPanel
- Add steady uptrend entry toggle:
- Add useSteadyUptrend boolean flag in TradeConfig to allow users to toggle steady 5/20 MA trendline pre-pass vs strict statistical rebound filtering
- Add UI switch field in TradeConfigPanel
- Fix flat price (0.0% fluctuation) drop bug in candidate discovery filter (AutoTradingManager)
- Correct ConfigIndex enum ordinal calculation (remove +10 gap in GRADE_2_BUY) and fix LOSS_MAXRATE label typo
- Align profit target formula between UI and engine: baseProfitRate = PROFIT_INDEX * gradeGuide (plus TAX_INDEX)
- Dynamically link SystemSleepPreventer operating hours to KisSession.startTime() and KisSession.endTime()
- Verified clean build with ./gradlew compileKotlin (0 errors)
- Extract Exposed database tables (TradeStatus, ConfigTable, AutoTradeTable, TradeLogTable, HolidayTable) from DatabaseFactory into dedicated package database.schema.Tables
- Decouple AutoTradeItem into model.AutoTradeItem with Kotlinx Serializable support
- Decouple in-memory log store TradingLogStore into ui.store.TradingLogStore
- Package root-level Defines.kt into config.Defines with appropriate package declaration
- Extract KisSession singleton state management from model.AppConfig into dedicated model.KisSession
- Update package declarations and import paths across Main.kt, SettingsScreen, TradingDecisionLog, AutoTradingManager, LlamaServerManager, RagService, KisTradeService, and TradingReportManager
- Verified clean build with ./gradlew compileKotlin (0 errors)
- Replace OS curl process fork in NewsService.sendTelegramMessage with Ktor asynchronous client.post
- Eliminate ProcessBuilder and platform-dependent shell execution for Telegram alerts
- Update todo.md checklist and completion status
- Implement thread-safe coroutine TokenBucket KisRateLimiter to strictly limit KIS API requests to <= 3/sec (prevent EGW00201 errors)
- Integrate KisRateLimiter across all REST order/balance/quote endpoints in KisTradeService
- Dynamically resolve current and previous year DART report codes (Q3/Semi/Q1/Annual) in NewsService.fetchFinancialGrowth instead of hardcoded 2024
- Support dynamic Ollama model detection via /api/tags in RagService to prevent 404 when model name differs
- Add JVM ShutdownHook to BrowserManager and enable image/CSS resource blocking in DynamicNewsScraper to prevent zombie Chromium processes and speed up scraping
- Add thread-safe dbTransaction wrapper and dbQuery (newSuspendedTransaction) to DatabaseFactory to prevent H2 file lock contention
- Lazy initialize RagService.embeddingModel to prevent fixed port mismatch before PortFinder executes
- Replace global pkill in LlamaServerManager with targeted port/PID-based cleanup
- Remove redundant errorStream reader thread in LlamaServerManager and ensure descendant process destruction on stop
- Convert DartCodeManager XML parsing from DOM to StAX streaming to eliminate high heap memory consumption (300MB -> few MB)
- Make shared collections in DynamicNewsScraper and AutoTradingManager thread-safe (ConcurrentHashMap, Collections.synchronizedList)
- Reduce KisTradeService Ktor logging level from ALL to HEADERS/NONE to prevent high I/O overhead and credential exposure
- Add ARCHITECTURE.md and todo.md system documentation