Feat/html edit#726
Merged
Merged
Conversation
linonetwo
force-pushed
the
feat/html-edit
branch
from
June 24, 2026 14:11
17a9e3a to
b865a02
Compare
Introduce WorkspaceType.html, htmlFileLocation on IWorkspace, and path/git-scope utilities. Sanitize and create flows skip tidgi.config for HTML workspaces.
Strategy pattern isolates folder vs single-file HTML startup, HTTP routing, and git scope resolution.
Route GET/PUT through workspace strategies, start HTML HTTP server instead of wiki worker, and delegate stopWiki to HtmlWiki.
Add gitScope helpers, scoped commit/log for HTML workspaces, and GitLog filtering by workspace file path.
Open HTML file from Add Workspace, filter edit sections by type, show HTML path, optional file deletion, and workspace menu support.
English and Simplified Chinese strings for open HTML file, settings labels, and delete confirmations.
Cover path/git scope, registry filtering, scoped git ops, GitLog scope, and Cucumber scenarios for add workspace and git log isolation.
…tercept Inject TiddlyFox-style saver bootstrap into served HTML wikis and bridge saves through IPC instead of triggering browser downloads.
Force HTML workspaces to standalone mode and hide advanced main/sub options in the import dialog.
Generate blank HTML via tiddlywiki CLI and exercise real UI save flow with active workspace view targeting.
Replace in-step dugite mobile simulation with a separate Node mock server so sync E2E exercises the same network boundary as a real mobile client.
Remove the mock mobile Git HTTP server from Desktop E2E so NodeJS wiki sync tests stay on their existing path.
Expose authenticated GET/PUT endpoints for HTML workspaces so mobile clients can sync single-file wikis without Git.
Avoid Node globals in renderer-loaded workspace settings code and cover HTML workspace rename persistence.
…larify save paths - Make restartWiki delegate HTML workspaces to HtmlWikiService instead of the NodeJS wiki worker path. - Replace the regex-based file chooser Cucumber step with a plain expression. - Expand JSDoc to explain the relationship between the injected bootstrap saver and the Electron download-boundary fallback.
- Replace regex with two Cucumber Expression step definitions, since optional groups cannot contain parameter types per spec. - Add type assertion for ipaddr.js IPv4/IPv6 union match() call.
Inline read & validation in readHtmlWikiFile and writeHtmlWikiFile to eliminate the time-of-check-to-time-of-use gap between validateHtmlWikiFile and subsequent fs.readFile.
linonetwo
force-pushed
the
feat/html-edit
branch
from
June 25, 2026 08:47
3991966 to
a41bb8e
Compare
linonetwo
added a commit
that referenced
this pull request
Jun 25, 2026
* feat(workspaces): add HTML wiki workspace type and path helpers Introduce WorkspaceType.html, htmlFileLocation on IWorkspace, and path/git-scope utilities. Sanitize and create flows skip tidgi.config for HTML workspaces. * feat(workspaces): add folder and HTML wiki strategies Strategy pattern isolates folder vs single-file HTML startup, HTTP routing, and git scope resolution. * feat(htmlWiki): wire HTML wiki into IPC routes and workspace lifecycle Route GET/PUT through workspace strategies, start HTML HTTP server instead of wiki worker, and delegate stopWiki to HtmlWiki. * feat(git): scope git operations to single HTML file Add gitScope helpers, scoped commit/log for HTML workspaces, and GitLog filtering by workspace file path. * feat(ui): add HTML wiki workspace UI and settings Open HTML file from Add Workspace, filter edit sections by type, show HTML path, optional file deletion, and workspace menu support. * feat(i18n): add HTML wiki workspace translations English and Simplified Chinese strings for open HTML file, settings labels, and delete confirmations. * test(htmlWiki): add unit and E2E coverage for HTML workspaces Cover path/git scope, registry filtering, scoped git ops, GitLog scope, and Cucumber scenarios for add workspace and git log isolation. * chore(deps): sync pnpm-lock for registry-js on Windows * test(e2e): enforce strict cucumber args via run-e2e entry * fix(workspaces): keep workspacePaths out of preload bundle * fix(htmlWiki): route HTML workspaces away from node wiki worker * fix(gitLog): use renderer-safe git scope and dedupe loads for HTML wikis * refactor(e2e): consolidate cucumber arg validation into run-e2e.ts * fix(lint): resolve ESLint issues on HTML wiki branch * feat(htmlWiki): persist saves via bootstrap injection and download intercept Inject TiddlyFox-style saver bootstrap into served HTML wikis and bridge saves through IPC instead of triggering browser downloads. * feat(htmlWiki): hide sub-workspace settings for HTML imports Force HTML workspaces to standalone mode and hide advanced main/sub options in the import dialog. * test(e2e): add HTML wiki import, save, and reopen scenarios Generate blank HTML via tiddlywiki CLI and exercise real UI save flow with active workspace view targeting. * test(e2e): route mobile sync through mock HTTP server Replace in-step dugite mobile simulation with a separate Node mock server so sync E2E exercises the same network boundary as a real mobile client. * test(e2e): restore direct mobile sync steps Remove the mock mobile Git HTTP server from Desktop E2E so NodeJS wiki sync tests stay on their existing path. * feat(htmlWiki): add whole-file HTML sync API Expose authenticated GET/PUT endpoints for HTML workspaces so mobile clients can sync single-file wikis without Git. * fix(html): keep workspace settings renderer-safe Avoid Node globals in renderer-loaded workspace settings code and cover HTML workspace rename persistence. * fix(html): stabilize HTML workspace review fixes * ci: trigger CI run on latest html workspace fixes * fix(html): route HTML workspace restart through HtmlWikiService and clarify save paths - Make restartWiki delegate HTML workspaces to HtmlWikiService instead of the NodeJS wiki worker path. - Replace the regex-based file chooser Cucumber step with a plain expression. - Expand JSDoc to explain the relationship between the injected bootstrap saver and the Electron download-boundary fallback. * fix: resolve Cucumber Expression syntax error and TS union type issue - Replace regex with two Cucumber Expression step definitions, since optional groups cannot contain parameter types per spec. - Add type assertion for ipaddr.js IPv4/IPv6 union match() call. * fix(htmlWiki): remove TOCTOU race condition in htmlFileIO Inline read & validation in readHtmlWikiFile and writeHtmlWikiFile to eliminate the time-of-check-to-time-of-use gap between validateHtmlWikiFile and subsequent fs.readFile. ---------
linonetwo
added a commit
that referenced
this pull request
Jun 25, 2026
#726 removed IS_TEST_ENV (process.env.NODE_ENV) from SchemaRenderer and GenericSchemaRenderer to keep them renderer-safe. Restore the test-mode behavior properly through window.service.context.get('isTest'): - In test mode, all preference sections are rendered immediately - In test mode, lazy-loading idle callbacks are skipped - Falls back to incremental loading in production
linonetwo
added a commit
that referenced
this pull request
Jun 25, 2026
* fix: restore missing rememberLastPageVisited switch in workspace config Closes #728 - Remove early return when rememberLastPageVisited is false, so the section is always visible - Add Switch component to toggle rememberLastPageVisited preference - Replace usePromiseValue with usePreferenceObservable for reactive updates - Only show lastUrl TextField when the toggle is enabled * fix: handle tidgi deep links from within WebView pages Three-layer interception for tidgi:// URLs: - will-navigate handler in setupViewEventHandlers - window.open() handler in handleNewWindow - protocol handler fallback in setupIpcServerRoutesHandlers * fix: improve LastUrlItem UI with toggle switch Replace always-visible TextField with a Switch to toggle rememberLastPageVisited preference, showing the TextField only when enabled * chore: update template/wiki submodule * fix: guard process.env access in protocol.ts for renderer safety * revert silly deepseek * fix: remove process.env from protocol.ts for renderer safety protocol.ts is imported by both main and renderer processes, but process.env is not available in the renderer (browser) context. - protocol.ts now always exports 'tidgi' (renderer-safe) - main.ts uses isTest from environment.ts for test-mode scheme - handleNewWindow/setupViewEventHandlers check both prefix variants - deepLink/index.ts computes test-aware scheme locally * fix: compute protocol scheme via isTest instead of hardcoding Use isTest from environment.ts in main process files to derive the correct scheme (tidgi-test in test mode, tidgi otherwise). Remove protocol.ts import from renderer files (Search.tsx, EmbeddingItem.tsx) - the renderer always uses the production scheme 'tidgi', and should not depend on process.env-sensitive constants. * fix: add getProtocolScheme to deepLink service for renderer use Renderer processes now obtain the protocol scheme via IPC (window.service.deepLink.getProtocolScheme()) instead of importing protocol.ts directly or hardcoding 'tidgi'. The main process DeepLinkService uses isTest from environment.ts to return the correct scheme (tidgi or tidgi-test). * fix: restore process.env in protocol.ts, use TIDGI_PROTOCOL_SCHEME everywhere protocol.ts now properly computes tidgi/tidgi-test via process.env. All main process files use the canonical TIDGI_PROTOCOL_SCHEME constant. Renderer files get the scheme via window.service.deepLink.getProtocolScheme(). * fix: use context.get('isTest') instead of dedicated getProtocolScheme Renderer obtains test-mode status via window.service.context.get('isTest'), the canonical way to forward environment variables from main to renderer. Removes the unnecessary getProtocolScheme from DeepLinkService. * fix: restore test-mode section rendering via context service #726 removed IS_TEST_ENV (process.env.NODE_ENV) from SchemaRenderer and GenericSchemaRenderer to keep them renderer-safe. Restore the test-mode behavior properly through window.service.context.get('isTest'): - In test mode, all preference sections are rendered immediately - In test mode, lazy-loading idle callbacks are skipped - Falls back to incremental loading in production * chore: update template/wiki submodule * feat: support tidgi://workspaceId/preferences/section deep links New URL format: tidgi://<workspaceId>/preferences/<sectionId> opens the edit workspace window for the given workspace. - deepLink handler parses /preferences/ pathname for workspace-scoped links - protocol handler catches /preferences/ pathname in addition to hostname - EmbeddingItem now includes workspaceId in the deep link URL * fix: keep externalAPI as global preferences deep link externalAPI is a global PreferenceSection, not workspace-specific. Use tidgi://preferences/externalAPI (without workspaceId) for it. * feat: support tidgi://workspace/preferences/<section> deep links - tidgi://workspace/preferences/<section> opens settings for the active workspace. - tidgi://<workspaceId>/preferences/<section> also works. - EditWorkspace window now accepts preferenceGotoTab metadata and scrolls to the requested section. - Adds unit tests for the workspace-scoped preferences deep link. * Update wiki
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.