Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
096fc4e
Merge pull request #61 from QueryaHub/main
ZhuchkaTriplesix May 28, 2026
10047ee
ci: automate PR milestone/labels from linked theme issues
ZhuchkaTriplesix May 28, 2026
633836e
feat(theme): add QueryaTheme, workbench and editor token models
ZhuchkaTriplesix May 28, 2026
48a30f9
feat(theme): VS Code theme JSON/JSONC parser
ZhuchkaTriplesix May 28, 2026
b3aed0d
feat(theme): parse VS Code HEX/RGBA color strings
ZhuchkaTriplesix May 28, 2026
3ec6111
fix(theme): satisfy prefer_const_* lints in QueryaTheme
ZhuchkaTriplesix May 28, 2026
4571918
Merge pull request #62 from QueryaHub/issue/38-querya-workbench-theme…
ZhuchkaTriplesix May 28, 2026
cd5de55
Merge pull request #63 from QueryaHub/issue/39-vscode-theme-jsonc-parser
ZhuchkaTriplesix May 28, 2026
1b85001
feat(theme): add QueryaThemeScope for workbench and editor tokens
ZhuchkaTriplesix May 28, 2026
4385c80
Merge pull request #64 from QueryaHub/issue/53-vscode-color-parser
ZhuchkaTriplesix May 28, 2026
935505e
Merge pull request #65 from QueryaHub/issue/54-querya-theme-scope
ZhuchkaTriplesix May 28, 2026
5ce3258
feat(theme): ThemeController and runtime theme in QueryaApp
ZhuchkaTriplesix May 28, 2026
184445c
feat(theme): map VS Code workbench colors subset to QueryaTheme
ZhuchkaTriplesix May 28, 2026
828a94a
Merge pull request #66 from QueryaHub/issue/40-41-theme-controller-ru…
ZhuchkaTriplesix May 28, 2026
75a9277
Merge pull request #67 from QueryaHub/issue/44-vscode-workbench-colors
ZhuchkaTriplesix May 28, 2026
af629f3
feat(theme): user color overrides with deep merge pipeline
ZhuchkaTriplesix May 28, 2026
a8b93e7
Merge pull request #68 from QueryaHub/issue/45-theme-color-overrides
ZhuchkaTriplesix May 28, 2026
16008c4
feat(theme): migrate P0 workbench surfaces off QueryaColors
ZhuchkaTriplesix May 28, 2026
565ed3c
Merge pull request #69 from QueryaHub/issue/42-migrate-workbench-colors
ZhuchkaTriplesix May 28, 2026
af46339
feat(theme): appearance settings and VS Code theme import (#43)
ZhuchkaTriplesix May 28, 2026
011f32e
Merge pull request #70 from QueryaHub/issue/43-theme-preferences-ui
ZhuchkaTriplesix May 28, 2026
6f97224
feat(theme): SqlEditorChrome and editor tokens from QueryaTheme (#60)
ZhuchkaTriplesix May 28, 2026
19d6a71
fix(test): remove unnecessary widgets import in theme test shell
ZhuchkaTriplesix May 28, 2026
267dcfe
Merge pull request #71 from QueryaHub/issue/60-sql-editor-chrome-tokens
ZhuchkaTriplesix May 28, 2026
2e22bb1
feat(editor): add QueryaCodeEditor abstraction (#47)
ZhuchkaTriplesix May 28, 2026
d2f406b
Merge pull request #72 from QueryaHub/issue/47-querya-code-editor
ZhuchkaTriplesix May 28, 2026
43ae251
docs(editor): spike report for code editor package selection (#48)
ZhuchkaTriplesix May 28, 2026
6586f4e
Merge pull request #73 from QueryaHub/issue/48-editor-spike-report
ZhuchkaTriplesix May 28, 2026
f3b17fb
feat(editor): SQL syntax highlighting via syntax_highlight (#49)
ZhuchkaTriplesix May 28, 2026
385254d
chore(editor): remove obsolete sql_syntax_highlighting stub
ZhuchkaTriplesix May 28, 2026
ea3dd9c
fix(test): remove unused material import in highlighter test
ZhuchkaTriplesix May 28, 2026
0eb5624
Merge pull request #74 from QueryaHub/issue/49-sql-syntax-highlighting
ZhuchkaTriplesix May 28, 2026
1a61021
feat(editor): JSON highlighting in Mongo document editor (#50)
ZhuchkaTriplesix May 28, 2026
629e113
Merge pull request #75 from QueryaHub/issue/50-json-syntax-highlighting
ZhuchkaTriplesix May 28, 2026
775d2d8
feat(theme): VS Code tokenColors resolution for syntax highlighting (…
ZhuchkaTriplesix May 28, 2026
e95092e
Merge pull request #76 from QueryaHub/issue/46-token-colors
ZhuchkaTriplesix May 28, 2026
a79d207
test(theme): expand theme pipeline unit and fixture coverage (#58)
ZhuchkaTriplesix May 28, 2026
34de212
docs(theme): add theme system guide and README link (#55)
ZhuchkaTriplesix May 28, 2026
591194d
Merge pull request #77 from QueryaHub/issue/58-theme-pipeline-tests
ZhuchkaTriplesix May 28, 2026
3452bbf
Merge pull request #78 from QueryaHub/issue/55-theme-docs
ZhuchkaTriplesix May 28, 2026
6f66130
refactor(theme): migrate P0 workbench surfaces to design tokens (#59)
ZhuchkaTriplesix May 28, 2026
530020d
Merge pull request #79 from QueryaHub/issue/59-p0-workbench-surfaces
ZhuchkaTriplesix May 28, 2026
438644e
feat(theme): SqlEditorChrome tokens for SQL workspaces (#60)
ZhuchkaTriplesix May 28, 2026
417e604
Merge pull request #80 from QueryaHub/issue/60-sql-editor-chrome-tokens
ZhuchkaTriplesix May 28, 2026
8540c56
feat(theme): enable Querya Light preset in main shell (#51)
ZhuchkaTriplesix May 28, 2026
8e73fcb
Merge pull request #81 from QueryaHub/issue/51-querya-light-preset
ZhuchkaTriplesix May 28, 2026
e46770f
feat(theme): optional animated theme transitions (#57)
ZhuchkaTriplesix May 28, 2026
a05abeb
Merge pull request #82 from QueryaHub/issue/57-theme-animation
ZhuchkaTriplesix May 28, 2026
49fc199
docs(editor): code_forge and LSP evaluation (#52)
ZhuchkaTriplesix May 28, 2026
e2254d8
Merge pull request #83 from QueryaHub/issue/52-code-forge-evaluation
ZhuchkaTriplesix May 28, 2026
59a4c9e
docs: mark theme system epic #37 complete
ZhuchkaTriplesix May 28, 2026
0cec2ef
Merge pull request #84 from QueryaHub/chore/theme-milestone-complete
ZhuchkaTriplesix May 28, 2026
8515b3b
fix(theme): preferences UI, material theme, and scope for dialogs
ZhuchkaTriplesix May 28, 2026
0eed8ae
chore(theme): add cyberpunk sample themes for import testing
ZhuchkaTriplesix May 28, 2026
cafe4e3
chore(release): bump version to 0.3.0+4
ZhuchkaTriplesix May 28, 2026
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
43 changes: 37 additions & 6 deletions .cursor/rules/gitflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,47 @@ git checkout -b issue/38-querya-workbench-theme-models

## GitHub labels & milestones

На **issues** и **PRs** через `gh`:
### Milestone: **Theme system**

Epic [#37](https://github.com/QueryaHub/Querya-Desktop/issues/37) и дочерние issues **#38–#60** (кроме закрытого #56) — milestone [Theme system](https://github.com/QueryaHub/Querya-Desktop/milestone/1).

Новые theme-issues: label `theme` → workflow [issue-theme-milestone.yml](.github/workflows/issue-theme-milestone.yml) проставит milestone автоматически. Шаблон: [.github/ISSUE_TEMPLATE/theme_task.yml](.github/ISSUE_TEMPLATE/theme_task.yml).

### PR: labels + milestone (автоматика)

1. Ветка **`issue/<number>-<slug>`** (рекомендуется), например `issue/38-workbench-theme-models`.
2. В PR body: **`Closes #38`** (или Fixes/Resolves).
3. В title опционально: `feat(theme): … (#38)`.

Workflow [pr-linked-issue-metadata.yml](.github/workflows/pr-linked-issue-metadata.yml) копирует **все labels** и **milestone** с linked issue на PR при open/edit/sync.

Шаблон PR: [.github/pull_request_template.md](.github/pull_request_template.md).

### Ручное создание PR (если автоматика не сработала)

```bash
gh pr create --base dev \
--milestone "Theme system" \
--label "theme,enhancement" \
--title "feat(theme): QueryaWorkbenchTheme models (#38)" \
--body "$(cat <<'EOF'
## Summary

Closes #38
EOF
)"
```

Для editor-задач добавь label `editor`: `--label "theme,editor,enhancement"`.

### Issues

```bash
gh issue edit 38 --add-label "theme,enhancement"
gh pr create --base dev --label "theme,enhancement" \
--body "Closes #38" --title "feat(theme): QueryaWorkbenchTheme models (#38)"
gh issue edit 38 --milestone "Theme system" --add-label "theme,enhancement"
```

Актуальные labels в репо: `bug`, `enhancement`, `documentation`, `theme`, `editor`, `epic`, …
Для темизации: `theme`, `editor`, `epic` (см. epic [#37](https://github.com/QueryaHub/Querya-Desktop/issues/37)).
Labels: `bug`, `enhancement`, `documentation`, `theme`, `editor`, `epic`.

После merge: issue `CLOSED`; `git fetch` + `git pull --ff-only` на `dev`.

Expand Down
2 changes: 1 addition & 1 deletion .flutter-plugins-dependencies

Large diffs are not rendered by default.

47 changes: 47 additions & 0 deletions .github/ISSUE_TEMPLATE/theme_task.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Theme system task
description: Task under epic #37 (theming / editor)
title: "Theme: "
labels:
- theme
- enhancement
projects: []
body:
- type: markdown
attributes:
value: |
Epic: [#37 — Theme system](https://github.com/QueryaHub/Querya-Desktop/issues/37)
Milestone: **Theme system**
- type: textarea
id: summary
attributes:
label: Summary
description: One paragraph — what and why
validations:
required: true
- type: textarea
id: acceptance
attributes:
label: Acceptance criteria
description: Checkbox list
value: |
- [ ]
validations:
required: true
- type: dropdown
id: phase
attributes:
label: Phase
options:
- "0 — Foundation"
- "1 — App & UI"
- "2 — Editor MVP"
- "3 — Advanced"
validations:
required: true
- type: checkboxes
id: labels_extra
attributes:
label: Extra labels
options:
- label: editor
- label: documentation
37 changes: 37 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
## Summary

<!-- What changed and why (1–3 sentences). -->

## Linked issue

<!-- Use branch `issue/<number>-<slug>` and/or: -->

Closes #

## Checklist

- [ ] `flutter analyze` and `flutter test` pass locally
- [ ] Scope matches the linked issue only (no drive-by refactors)
- [ ] PR targets **`dev`** (not `main`, unless hotfix)

## Metadata (automation)

If the branch is `issue/<n>-…` or the body contains `Closes #n`, workflow **[PR linked issue metadata](.github/workflows/pr-linked-issue-metadata.yml)** copies **labels** and **milestone** from the linked issue onto this PR.

For **Theme system** work, ensure the issue has milestone **Theme system** and labels such as `theme`, `editor`, `enhancement`.

Manual override when creating the PR:

```bash
gh pr create --base dev \
--milestone "Theme system" \
--label "theme,enhancement" \
--title "feat(theme): short description (#NN)" \
--body "$(cat <<'EOF'
## Summary
...

Closes #NN
EOF
)"
```
50 changes: 50 additions & 0 deletions .github/workflows/issue-theme-milestone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# New issues with label `theme` → milestone Theme system
name: Issue theme milestone

on:
issues:
types: [opened, labeled]

permissions:
issues: write

jobs:
assign-milestone:
runs-on: ubuntu-latest
steps:
- name: Set Theme system milestone on theme issues
uses: actions/github-script@v7
with:
script: |
const issue = context.payload.issue;
if (!issue?.labels) return;

const hasTheme = issue.labels.some(
(l) => (typeof l === 'string' ? l : l.name) === 'theme'
);
if (!hasTheme) return;

if (issue.milestone?.title === 'Theme system') {
core.info('Milestone already set.');
return;
}

const owner = context.repo.owner;
const repo = context.repo.repo;
const milestones = await github.paginate(
github.rest.issues.listMilestones,
{ owner, repo, state: 'open', per_page: 100 }
);
const milestone = milestones.find((m) => m.title === 'Theme system');
if (!milestone) {
core.setFailed('Milestone "Theme system" not found');
return;
}

await github.rest.issues.update({
owner,
repo,
issue_number: issue.number,
milestone: milestone.number,
});
core.info(`Milestone Theme system set on #${issue.number}`);
103 changes: 103 additions & 0 deletions .github/workflows/pr-linked-issue-metadata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# Copy milestone + labels from linked issues onto the PR.
# Triggers: branch issue/<n>-*, PR title/body "Closes #n", etc.
name: PR linked issue metadata

on:
pull_request:
types: [opened, edited, synchronize, reopened]

permissions:
pull-requests: write
issues: read

jobs:
apply-from-linked-issues:
runs-on: ubuntu-latest
steps:
- name: Apply milestone and labels from linked issues
uses: actions/github-script@v7
with:
script: |
const pr = context.payload.pull_request;
const owner = context.repo.owner;
const repo = context.repo.repo;

const issueIds = new Set();

// issue/38-short-slug
const branchMatch = pr.head.ref.match(/^issue\/(\d+)(?:-|$)/i);
if (branchMatch) issueIds.add(Number(branchMatch[1]));

const body = pr.body || '';
const title = pr.title || '';

for (const m of body.matchAll(
/(?:close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved)\s+#(\d+)/gi
)) {
issueIds.add(Number(m[1]));
}

// feat(theme): short description (#38)
const titleTail = title.match(/\(#(\d+)\)\s*$/);
if (titleTail) issueIds.add(Number(titleTail[1]));

if (issueIds.size === 0) {
core.info('No linked issue numbers found; skipping.');
return;
}

const labelNames = new Set();
let milestoneTitle = null;

for (const num of issueIds) {
let issue;
try {
const res = await github.rest.issues.get({
owner,
repo,
issue_number: num,
});
issue = res.data;
} catch (e) {
core.warning(`Issue #${num} not found: ${e.message}`);
continue;
}

for (const l of issue.labels) {
if (typeof l === 'string') labelNames.add(l);
else if (l.name) labelNames.add(l.name);
}

if (issue.milestone?.title) {
milestoneTitle = issue.milestone.title;
}
}

if (labelNames.size > 0) {
await github.rest.issues.setLabels({
owner,
repo,
issue_number: pr.number,
labels: [...labelNames],
});
core.info(`Labels set: ${[...labelNames].join(', ')}`);
}

if (milestoneTitle) {
const milestones = await github.paginate(
github.rest.issues.listMilestones,
{ owner, repo, state: 'open', per_page: 100 }
);
const milestone = milestones.find((m) => m.title === milestoneTitle);
if (milestone) {
await github.rest.issues.update({
owner,
repo,
issue_number: pr.number,
milestone: milestone.number,
});
core.info(`Milestone set: ${milestoneTitle}`);
} else {
core.warning(`Milestone not found: ${milestoneTitle}`);
}
}
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,29 @@ All notable changes to this project are documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.3.0] - 2026-05-28

### Added

- **Theme system** — runtime dark/light/system modes, **Querya Light** preset, optional **Animate theme changes** in Preferences.
- **VS Code themes** — import `.json` / `.jsonc` (`colors` + `tokenColors`); user color overrides; persisted imported theme.
- **Syntax highlighting** — SQL and JSON in `QueryaCodeEditor` via `syntax_highlight`; `tokenColors` mapped to TextMate scopes; isolate highlight for large buffers.
- **Editor** — `QueryaCodeEditor` abstraction, `SqlEditorChrome` from theme tokens, `QueryaThemeScope` for workbench/editor tokens.
- **Samples** — `themes/samples/cyberpunk-neon.json` (+ JSONC) for manual import testing.
- **Docs** — [docs/theme.md](docs/theme.md), [docs/theme-import.md](docs/theme-import.md), [docs/editor-spike-report.md](docs/editor-spike-report.md), [docs/code-forge-evaluation.md](docs/code-forge-evaluation.md).

### Changed

- **Workbench UI** — P0 surfaces (sidebar, SQL chrome, empty hero, main shell) use design tokens instead of hardcoded `QueryaColors`.
- **Preferences** — Appearance section (theme mode, preset, import, animation); Material `DropdownMenu` for stable menus in scrollable dialogs.
- **Imported themes** — `mutedForeground` clamped for readable helper text when VS Code sidebar colors are low-contrast.

### Fixed

- **Preferences (dark / imported themes)** — readable labels and dropdown text via `materialTheme` + `popoverForeground` hints.
- **Preferences dropdown** — Color preset menu no longer stretches full screen (`expandedInsets` instead of `width: infinity`).
- **Dialogs / SQL editor** — `QueryaThemeScope` on `ShadcnApp.builder` so overlays (Preferences, SQL editor) resolve theme tokens.

## [0.2.0] - 2026-04-24

### Added
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ flutter build macos
## More documentation

- [Security / local data](docs/security.md)
- [Theme system](docs/theme.md)
- [User guide](docs/user-guide.md)
- [Releases](docs/tags-and-releases.md)
- [Release checklist](docs/release-checklist.md)
Expand Down
Loading
Loading