Skip to content

Fix kak#1078

Merged
zhangshanwen merged 6 commits into
mainfrom
fix-kak
May 22, 2026
Merged

Fix kak#1078
zhangshanwen merged 6 commits into
mainfrom
fix-kak

Conversation

@zhangshanwen

Copy link
Copy Markdown
Contributor

No description provided.

Add a Success field to the Messages struct and provide translations for en_US, zh_CN and ja_JP so the success label is localizable. Update the preset copy button handler in settings.go to use msgr.Success (localized) instead of a hardcoded "success" string and keep the color argument (ColorSuccess). This centralizes the success message for i18n and ensures consistency across UI messages.
Reset listing dialog minHeight before re-locking to offsetHeight to avoid flicker and handle missing element safely (presets/listing_builder.go). Replace the VAutocomplete schedule control with a compact VBtn (icons, flat variant, density, height and class tweaks) to improve appearance and interaction, and adjust related classes/attributes (publish/version_compo.go). Also normalize dialog width string from "900px" to "900" for the listing builder configuration.
Update go.mod to require github.com/qor5/x/v3 at pseudo-version v3.2.1-0.20260522031431-46d6ad4cfc7e and regenerate go.sum to include the new module checksums. No other source changes.
@deepsource-io

deepsource-io Bot commented May 22, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 00185a9...9c1dbad on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
Go May 22, 2026 4:10a.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@codecov

codecov Bot commented May 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
pagebuilder/messages.go 33.33% <ø> (ø)
pagebuilder/settings.go 93.37% <100.00%> (ø)
presets/listing_builder.go 84.39% <100.00%> (ø)
publish/version_compo.go 88.83% <100.00%> (+0.11%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

zhangshanwen and others added 3 commits May 22, 2026 11:43
- GO-W1004: set SkipDefaultTransaction:true on the test-only gorm.Config in
  pagebuilder_test.go; the implicit transaction wrapping is unnecessary for
  the plain test connection.
- GO-W5003: introduce a typed modelBuilderCtxKey instead of using bare string
  as the context key for *ModelBuilder lookups. Updated ContextValueProvider,
  the publish-side reader, and the publish_test.go inline producer to use it.
- GO-R1005: silence the cyclomatic-complexity finding on TestPageBuilder via
  //skipcq. The 62 complexity comes from ~70 inline ReqFunc closures in a
  table-driven test; extracting them wouldn't reduce control-flow complexity
  meaningfully and would obscure the test data layout.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ia skipcq

The previous attempt to fix DeepSource GO-W5003 by introducing modelBuilderCtxKey
in pagebuilder/model.go broke the cross-package context-key contract: publish
package (and microsite, l10n) still read context.Value with utils.GetObjectName()
as a plain string, so PublishUrl's lookup returned nil and TestPageBuilderCampaign
sub-tests for publish/unpublish failed in CI.

Restore the plain-string key on the producer (ContextValueProvider) and reader
(PublishUrl) sides and annotate the test line that DeepSource flagged with a
//skipcq:GO-W5003 directive. A clean typed-key fix requires coordinated changes
across pagebuilder, publish, microsite, and l10n and is out of scope for this PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…uppressed

Per review feedback: don't suppress DeepSource findings with //skipcq when we
can't (or won't) cleanly fix them in this PR. The two remaining findings are:

- GO-R1005 (cyclomatic complexity 62 on TestPageBuilder): the function is a
  72-case table-driven test with inline ReqFunc closures; extracting them to
  helpers would just move the complexity, not reduce it.
- GO-W5003 (string as ctx key in publish_test.go:47): pagebuilder writes and
  publish reads via a plain-string key today; switching to a typed key needs
  coordinated changes across pagebuilder, publish, microsite, and l10n.

Leaving these for follow-up.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@zhangshanwen zhangshanwen merged commit 2938d81 into main May 22, 2026
10 checks passed
@zhangshanwen zhangshanwen deleted the fix-kak branch May 22, 2026 04:30
@zhangshanwen zhangshanwen restored the fix-kak branch May 22, 2026 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants