Skip to content

fix(titlebar): modal stacking and localized window controls - #46

Open
HandSonic wants to merge 105 commits into
mainfrom
fix/titlebar-modal-stacking
Open

HandSonic wants to merge 105 commits into
mainfrom
fix/titlebar-modal-stacking

Conversation

@HandSonic

@HandSonic HandSonic commented Aug 23, 2026 •

Copy link
Copy Markdown
Owner

Related issue

N/A — two defects found by reviewing the OtterMind#2711 desktop chrome series; described below.

Summary

  • The app title bar has carried z-index 10001 since the 4.0.0 code drop (splash-era convention) where it hosted no interactive chrome. Since 2771426 it hosts the real Windows window controls, which now render above antd modal masks (z-index 1000): while an unsaved-changes confirmation is open, the close button stays clickable and can quit the whole application, bypassing the guard. Lowered to 999 — the highest value below the modal layer and above every in-flow workspace stacking context; dropdown menus opened from the bar portal to body and styles/global.ts already forces .ant-dropdown to z-index 11000, so menu behavior is unchanged.
  • The minimize/maximize/restore/close buttons hardcoded English aria-label/title strings while the rest of the bar is localized. They now use common.window.{minimize,maximize,restore,close}, added to every maintained locale (en-US, zh-CN, ja-JP, ko-KR, es-ES); i18n source hashes refreshed via validate-i18n.cjs --write-source-hashes (same method as dd27eb2) plus a new key-parity test wired as test:i18n-window-controls.

Affected surfaces

  • Frontend / Web
  • Backend / API / Storage
  • Database plugin / Driver
  • JCEF / Desktop packaging
  • CI / Build / Release
  • Documentation only

Verification

  • node scripts/validate-i18n.cjs passes; windowControls.test.ts passes (all locales define the four keys non-empty); fork CI green: fix(titlebar): modal stacking and localized window controls #46.
  • z-index claims verified against the codebase: antd modal layer 1000, styles/global.ts .ant-dropdown 11000, in-flow content max 100.

Risk and compatibility

  • Public API or stored data: N/A.
  • Database or driver compatibility: N/A.
  • Network, privacy, or security: N/A.
  • Community / Local / Pro boundary: N/A.
  • Backward compatibility: purely visual stacking + tooltip text.

Reviewer map

  • Start here: AppTitleBar/style.ts (z-index + comment), AppTitleBar/index.tsx (i18n keys), src/i18n/*/common.ts.
  • Failure condition: any future in-flow element above z-index 999 would need the constant revisited.
  • Rollback or disable path: revert the two commits independently.

Contributor declaration

  • I linked the Issue that defines this change.
  • I tested the affected behavior and reported the actual results above.
  • I did not include credentials, private data, or generated build output.
  • I disclosed substantial AI assistance below, or this PR contains no substantial AI-generated code.

AI assistance: substantial — fixes and tests drafted with AI assistance, verified locally and cross-checked by a second pass.

Latest-main revalidation (2026-09-04)

  • Rebased onto upstream 144a04e; current head 4b0a584.
  • i18n validation, window-control locale tests, shortcut/platform tests, and targeted TypeScript ESLint passed.
  • Included in the green combined Community production build and bundle verification.

HandSonic and others added 17 commits August 20, 2026 03:29
Add `visible` field to TableIndex domain model, read the `Visible` column
from SHOW INDEXES in MySQL metadata, generate INVISIBLE keyword in index
DDL, and add buildAlterIndexVisibility for ALTER INDEX syntax.

Frontend: add a "Visible" column to the index editor with a
VISIBLE/INVISIBLE toggle, disabled for primary keys, gated to MySQL only.

Test fixtures: init.sql, grants.sql, cleanup.sql, README.md under
script/test-fixtures/mysql/MYSQL-OBJ-006/.

Closes OtterMind#2574
Replace hardcoded INVISIBLE, ALTER INDEX strings with constants
SQL_INVISIBLE and SQL_ALTER_INDEX from MysqlSqlConstants.
…ABLE

buildAlterIndexVisibility was dead code: a visibility-only change fell
through to DROP+ADD, rebuilding the whole index. ALTER TABLE now emits
ALTER INDEX ... VISIBLE/INVISIBLE when the modified index differs from
the stored one only in visibility (and is not the primary key), and
falls back to the rebuild path otherwise.
Add `visible` field to TableColumn domain model, detect "INVISIBLE"
from the EXTRA column in information_schema, and generate the INVISIBLE
keyword in column DDL via MysqlColumnTypeEnum.

Frontend: add a "Visible" column to the column editor with a
VISIBLE/INVISIBLE toggle, gated to MySQL only.

Test fixtures: init.sql, grants.sql, cleanup.sql, README.md under
script/test-fixtures/mysql/MYSQL-OBJ-003/.

Closes OtterMind#2571
Replace hardcoded INVISIBLE string with SQL_INVISIBLE constant
from MysqlMetaDataConstants in MysqlColumnTypeEnum.
MySQL column grammar requires VISIBLE/INVISIBLE before the COMMENT
clause; the previous order produced ERROR 1064 for invisible columns
that carry a comment.
Adds a read-only Active Transactions view for the datasource node:
- Lists innodb_trx joined with processlist: transaction ID, state,
  start time, age, isolation level, rows locked/modified, thread ID,
  user, host, database, and current SQL.
- Works on MySQL 5.7 and 8.0; SQL text is null without PROCESS and
  surfaced as an explicit unavailable state instead of a blank value.
- New tree menu entry with a refreshable table dialog, i18n in all five
  locales, and MYSQL-OPS-002 fixtures (admin vs limited accounts).
…tolerant fallback

1. Add `resolveShellCandidates` method to return available shell candidates based on the operating system
2. Modify `create` method to sequentially try starting shells from the candidate list, automatically falling back to the next on failure
3. Add unit tests to verify shell candidate resolution and exception scenarios
4. Add compatibility handling for scenarios where enterprise security software blocks the default shell
…igurable default shell and improved shell candidate resolution

- Introduce DEFAULT_SHELL_PROPERTY configuration property for setting the default shell
- Add processFactory factory method to support custom process creation logic
- Refactor create method to accept pre-resolved shell candidate list
- Extract PtyProcess startup logic into a separate startProcess method
- Add proper argument configuration for PowerShell and CMD commands (-NoLogo, -NoExit, -Command, etc.)
- Improve shell candidate resolution order on Windows (pwsh → PowerShell → cmd)
- Add support for zsh and bash colored prompts
- Add test helper methods to reset factory and event publisher state
- Add comprehensive unit tests covering shell configuration and failover scenarios
- Change inner classes and enums to public to support external access
- Add command parser interface to support custom command lookup logic
Aias00 and others added 19 commits September 1, 2026 22:51
…erformance

perf(mysql): avoid full parse for ordinary completion scripts
refactor(terminal): refactor terminal shell startup logic with fault-tolerant fallback
…-column-2571

feat(mysql): invisible column management for MySQL 8.0.23+
…edit-actions

fix(result): stabilize sorting and edit actions
…active-transaction-2595

# Conflicts:
#	chat2db-community-client/package.json
…-theme-accent

fix(workspace): smooth panel resizing and restore theme accents
…ansaction-2595

feat(mysql): active InnoDB transaction inspection (OtterMind#2595)
@HandSonic
HandSonic force-pushed the fix/titlebar-modal-stacking branch from b8cf153 to 88c05c0 Compare September 3, 2026 08:24
openai0229 and others added 9 commits September 3, 2026 17:16
…-expiration

fix(redis): persist no-expiration TTL updates
# Conflicts:
#	chat2db-community-client/package.json
#	chat2db-community-client/src/pages/main/workspace/components/WorkspaceExtend/GlobalExtendComponents/accountGrantsRequest.test.ts
#	chat2db-community-client/src/pages/main/workspace/components/WorkspaceExtend/GlobalExtendComponents/accountGrantsRequest.ts
…atest-request

fix(frontend): ignore stale account grants
The app title bar has carried z-index: 10001 since the initial 4.0.0
code drop (d404467), where it only needed to outrank the host splash
overlay convention (OpenScreenAnimation z-index 10000, removed early in
init) while the bar hosted no interactive chrome. Since 2771426 the
bar hosts real window controls (minimize/maximize/close via jcefApi),
and antd modal masks/wraps plus the custom DraggableResizableModal
overlay render at z-index 1000, so on the Windows desktop build the
window close button floated above every confirmation dialog and could
close the app while an unsaved-changes guard modal was open.

Lower the bar to z-index 999: the highest value still below the modal
layer (1000), and above every in-flow workspace stacking context (max
z-index inside content is 100). Dropdown menus opened from the bar
(CommunityAppMenu) are unaffected because they portal to document.body
and global.ts already forces .ant-dropdown to z-index 11000. The
-webkit-app-region drag area is not influenced by z-index.
The Windows window control buttons (minimize/maximize/restore/close)
hardcoded English aria-label/title strings while the rest of the title
bar (CommunityAppMenu) already uses i18n('common.menu.*').

Add common.window.{minimize,maximize,restore,close} to every maintained
locale (en-US, zh-CN, ja-JP, ko-KR, es-ES) and use them for both the
aria-label and title of the three window control buttons. Refresh the
English source hashes in scripts/i18n-source-hashes.json via
'node ./scripts/validate-i18n.cjs --write-source-hashes' (same method as
dd27eb2) and add a key-parity test (yarn test:i18n-window-controls)
asserting the four keys exist non-empty in every locale.
@HandSonic
HandSonic force-pushed the fix/titlebar-modal-stacking branch from 88c05c0 to 4b0a584 Compare September 3, 2026 21:08
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.

5 participants