Skip to content

feat: configurable landing page for static sites#2733

Merged
davydkov merged 7 commits intolikec4:mainfrom
purple52:feat/configure-landing-page
Mar 12, 2026
Merged

feat: configurable landing page for static sites#2733
davydkov merged 7 commits intolikec4:mainfrom
purple52:feat/configure-landing-page

Conversation

@purple52
Copy link
Copy Markdown
Contributor

@purple52 purple52 commented Mar 10, 2026

Closes #2091

Summary

Adds a landingPage configuration option to the project config, allowing users to control what is shown when visiting the root of a generated static site:

  • redirect: true — redirect straight to the index view
  • include — show only matching views in the grid (by view ID or #tag)
  • exclude — hide matching views from the grid (by view ID or #tag)

Example configs:

// Redirect to index view
{
  "name": "my-project",
  "landingPage": {
    "redirect": true
  }
}

// Filter grid by inclusion
{
  "name": "my-project",
  "landingPage": {
    "include": ["cloud", "#overview"]
  }
}

// Filter grid by exclusion
{
  "name": "my-project",
  "landingPage": {
    "exclude": ["#internal", "legacy-backend"]
  }
}

Changes

  • packages/config — Add landingPage field to LikeC4ProjectJsonConfigSchema as a z.union of redirect: true, include, and exclude variants. Schema validation tests included.
  • packages/vite-plugin — Wire landingPage through the likec4:projects virtual module and HMR change detection.
  • packages/likec4/app — Implement redirect in the / route's beforeLoad (redirects to index view). Add filterLandingPageViews utility for include/exclude filtering in the single-project index grid. 6 filter tests.
  • packages/likec4/src/vite — Build-time validation: warn if include/exclude patterns match no views (single and multi-project).
  • schemas/ — Regenerated JSON schema.
  • apps/docs — Document landingPage configuration with examples.

Checklist

  • I've thoroughly read the latest contribution guidelines.
  • I've rebased my branch onto main before creating this PR.
  • My commit messages follow conventional spec
  • I've added tests to cover my changes (if applicable).
  • I've verified that all new and existing tests have passed locally for mobile, tablet, and desktop screen sizes.
  • My change requires documentation updates.
  • I've updated the documentation accordingly.

Note: 5 e2e visual snapshot tests fail, but these failures also reproduce on main — they are caused by dependency updates since the last screenshot baseline was committed.

Summary by CodeRabbit

  • New Features

    • Landing page options: redirect to the index view, or filter displayed views by including/excluding specific view IDs or tags; early redirect applied when configured.
  • Bug Fixes / Observability

    • Runtime warnings when landing page filters match no views.
  • Documentation

    • Added landing page configuration docs with examples for redirect, include, and exclude (duplicate block present).
  • Tests

    • Added validation and view-filtering tests for landing page behavior.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 10, 2026

🦋 Changeset detected

Latest commit: 22cde07

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 19 packages
Name Type
@likec4/config Patch
@likec4/vite-plugin Patch
likec4 Patch
@likec4/docs-astro Patch
@likec4/language-server Patch
@likec4/language-services Patch
@likec4/mcp Patch
likec4-vscode Patch
@likec4/playground Patch
@likec4/style-preset Patch
@likec4/styles Patch
@likec4/core Patch
@likec4/diagram Patch
@likec4/generators Patch
@likec4/layouts Patch
@likec4/log Patch
@likec4/react Patch
@likec4/tsconfig Patch
@likec4/vscode-preview Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 10, 2026

📝 Walkthrough

Walkthrough

Adds an optional project-level landingPage config (redirect | include | exclude), schema and JSON Schema entries, runtime validation and warnings, a view-filtering utility with tests, plugin/virtual-module type propagation, route redirect/filter integration, and duplicated docs content inserted twice.

Changes

Cohort / File(s) Summary
Configuration Schema
packages/config/src/schema.ts, schemas/likec4-config.schema.json
Adds optional landingPage union type (`{ redirect: true }
Filtering Implementation & Tests
packages/likec4/app/src/filterLandingPageViews.ts, packages/likec4/app/src/filterLandingPageViews.spec.ts
New filterLandingPageViews(views, filter) utility and unit tests. Supports ID and #tag patterns, include/exclude semantics.
Route & UI Integration
packages/likec4/app/src/routes/_single/single-index.tsx, packages/likec4/app/src/routes/index.tsx
Root loader adds early redirect when landingPage.redirect === true; single-index now applies filterLandingPageViews(allViews, landingPage) before rendering.
Vite Plugin & Virtual Modules
packages/vite-plugin/src/plugin.ts, packages/vite-plugin/src/virtuals/_shared.ts, packages/vite-plugin/src/virtuals/projects.ts, packages/vite-plugin/src/modules.d.ts
Propagates landingPage into project objects and virtual modules; adds LandingPageConfig and VirtualModuleProject types; includes landingPage in generated project data.
Build-time Validation
packages/likec4/src/vite/vite-build.ts
Emits warnings when landingPage.include/exclude patterns match no diagrams/views (single- and multi-project code paths).
Config Tests
packages/config/src/schema.spec.ts
Adds tests covering valid/invalid landingPage shapes and edge cases (empty arrays, conflicting include/exclude, lone "#" selectors, redirect constraints, undefined).
Documentation
apps/docs/src/content/docs/dsl/Config/index.mdx
Adds landing page configuration section with JSON examples for redirect, include, and exclude; the block was inserted twice, producing duplicated docs.
Changeset
.changeset/landing-page-config.md
Adds changeset with package bumps and a short description of the new landingPage option.

Sequence Diagram(s)

sequenceDiagram
  participant Browser
  participant Loader
  participant Projects
  participant Vite
  participant UI

  Browser->>Loader: GET "/"
  Loader->>Projects: read projects (includes landingPage)
  Projects-->>Loader: projects[] (with landingPage)
  alt first project landingPage.redirect === true
    Loader->>Browser: redirect to /view/index (mask root)
  else
    Loader->>Vite: compute views/diagrams
    Vite-->>Loader: views list
    Loader->>UI: render single-index with views
    UI->>UI: filterLandingPageViews(views, landingPage)
    UI-->>Browser: rendered filtered grid
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested reviewers

  • davydkov

Poem

🐰 I hopped through code with nimble paws,
Landing pages learned new laws.
Redirect, include, fences set,
Views sorted neat — no tangled net.
Carrots, tests, and tiny draws.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: configurable landing page for static sites' clearly summarizes the main change: adding configuration options for the landing page behavior in static sites.
Description check ✅ Passed The description provides a clear summary of changes, includes concrete examples, documents affected packages, and completes most checklist items. All required information is present and well-structured.
Linked Issues check ✅ Passed The PR implementation fully addresses issue #2091 by providing include/exclude filtering and redirect functionality to control which views appear on the landing page grid.
Out of Scope Changes check ✅ Passed All changes are directly related to implementing the landingPage configuration feature. No unrelated modifications or scope creep detected in the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan for PR comments
  • Generate coding plan

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (3)
packages/likec4/src/vite/vite-build.ts (1)

81-93: Extract the landing-page matcher into shared code.

This #tag/view.id matching logic is now duplicated in both build paths and separately in packages/likec4/app/src/filterLandingPageViews.ts. Pulling it into one shared helper will keep the warning behavior aligned with the actual runtime filter.

Also applies to: 103-115

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/likec4/src/vite/vite-build.ts` around lines 81 - 93, Extract the
duplicated "#tag"/"view.id" matching logic into a single shared helper (e.g.,
matchLandingPage or landingPageMatcher) and replace the inline logic in
vite-build.ts (the landingPage check that uses patterns.some(p =>
p.startsWith('#') ? v.tags?.some(t => t === p.slice(1)) : v.id === p)) and the
code in filterLandingPageViews.ts to call that helper; ensure the helper accepts
(diagrams, patterns) or (view, patterns) and implements the exact semantics:
pattern starting with '#' matches view.tags entries (compare to p.slice(1)),
otherwise matches view.id, and keep the existing hasMatch/warning behavior by
importing and invoking the new helper from both places.
packages/likec4/app/src/filterLandingPageViews.ts (1)

4-29: Accept the minimal view shape instead of full LayoutedView.

This helper only uses id and tags, but the current signature forces callers/tests to manufacture full LayoutedViews and is already leaking an as any into the new spec. A small reusable input type here keeps the API honest and removes that unsafe cast downstream.

♻️ Suggested refactor
 import type { LikeC4ProjectConfig } from '@likec4/config'
 import type { LayoutedView } from '@likec4/core/types'

+export type LandingPageView = Pick<LayoutedView, 'id' | 'tags'>
+
 export function filterLandingPageViews(
-  views: ReadonlyArray<LayoutedView>,
+  views: ReadonlyArray<LandingPageView>,
   filter: LikeC4ProjectConfig['landingPage'],
-): ReadonlyArray<LayoutedView> {
+): ReadonlyArray<LandingPageView> {
   if (!filter) return views

   if ('include' in filter) {
     return views.filter(view => matchesAny(view, filter.include))
   }
@@
   return views
 }

-function matchesAny(view: LayoutedView, patterns: string[]): boolean {
+function matchesAny(view: LandingPageView, patterns: ReadonlyArray<string>): boolean {
   return patterns.some(pattern => {

As per coding guidelines, "Agent types and interfaces should be defined separately and reused across the codebase" and "TypeScript-first repo; use explicit types Avoid using any, casts with as".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/likec4/app/src/filterLandingPageViews.ts` around lines 4 - 29,
Change filterLandingPageViews and matchesAny to accept a small reusable input
type (e.g., an interface with id: string and tags?: string[]) instead of
LayoutedView so callers/tests no longer need to fabricate full LayoutedView or
use `as any`; define this MinimalView type near other shared types and update
the function signatures (filterLandingPageViews(views:
ReadonlyArray<MinimalView>, ...) and matchesAny(view: MinimalView, patterns:
string[])) and any call sites/tests to pass the minimal shape; ensure logic
inside matchesAny still uses view.id and view.tags the same way and export the
new type for reuse across the codebase.
packages/likec4/app/src/filterLandingPageViews.spec.ts (1)

18-45: Add a redirect regression test.

landingPage.redirect is part of the new public contract, and this helper currently treats it as a no-op only through the final fall-through. An explicit spec here would keep that behavior from regressing if the branching changes later.

➕ Suggested test
 describe('filterLandingPageViews', () => {
   const views = [
     mockView('landscape', ['public']),
     mockView('context', ['public']),
     mockView('internal', ['draft']),
     mockView('detail', []),
   ]

   it('returns all views when no filter', () => {
     expect(filterLandingPageViews(views, undefined)).toEqual(views)
   })
+
+  it('returns all views when redirect is configured', () => {
+    expect(filterLandingPageViews(views, { redirect: true })).toEqual(views)
+  })

   it('includes by view ID', () => {

As per coding guidelines, "Aim to cover new features with relevant tests; keep test names descriptive."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/likec4/app/src/filterLandingPageViews.spec.ts` around lines 18 - 45,
Add a spec to filterLandingPageViews.spec.ts that verifies landingPage.redirect
is treated as a no-op by filterLandingPageViews: create a test (e.g., "treats
landingPage.redirect as no-op") that passes a view object with a
landingPage.redirect property to filterLandingPageViews (both with undefined
filter and with include/exclude filters) and assert the view is preserved in
results; reference the filterLandingPageViews helper and the
landingPage.redirect field so the test prevents regression if branching changes
later.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/config/src/schema.ts`:
- Around line 108-122: The landingPage schema currently allows selectors equal
to "#" which leads to an empty tag in filterLandingPageViews.ts; update the
element schema used in the include and exclude arrays inside the landingPage
union (the z.string().nonempty() instances) to reject the single-character "#"
(e.g. replace with z.string().nonempty().refine(s => s !== '#', { message:
'selector cannot be "#"' })) so "#tag" remains allowed but a lone "#" is
invalid; make this change for both include and exclude array element schemas in
the landingPage config.

In `@packages/vite-plugin/src/modules.d.ts`:
- Around line 3-10: The LandingPageConfig union type is mismatched with
runtime/schema: update the variant currently defined as { redirectTo: string }
to match the runtime shape { redirect: true } so consumers of the
likec4:projects module get correct types; edit the LandingPageConfig declaration
(and any related Project.landingPage usage) to replace redirectTo with a {
redirect: true } variant and ensure the Project type still allows landingPage?:
LandingPageConfig.

---

Nitpick comments:
In `@packages/likec4/app/src/filterLandingPageViews.spec.ts`:
- Around line 18-45: Add a spec to filterLandingPageViews.spec.ts that verifies
landingPage.redirect is treated as a no-op by filterLandingPageViews: create a
test (e.g., "treats landingPage.redirect as no-op") that passes a view object
with a landingPage.redirect property to filterLandingPageViews (both with
undefined filter and with include/exclude filters) and assert the view is
preserved in results; reference the filterLandingPageViews helper and the
landingPage.redirect field so the test prevents regression if branching changes
later.

In `@packages/likec4/app/src/filterLandingPageViews.ts`:
- Around line 4-29: Change filterLandingPageViews and matchesAny to accept a
small reusable input type (e.g., an interface with id: string and tags?:
string[]) instead of LayoutedView so callers/tests no longer need to fabricate
full LayoutedView or use `as any`; define this MinimalView type near other
shared types and update the function signatures (filterLandingPageViews(views:
ReadonlyArray<MinimalView>, ...) and matchesAny(view: MinimalView, patterns:
string[])) and any call sites/tests to pass the minimal shape; ensure logic
inside matchesAny still uses view.id and view.tags the same way and export the
new type for reuse across the codebase.

In `@packages/likec4/src/vite/vite-build.ts`:
- Around line 81-93: Extract the duplicated "#tag"/"view.id" matching logic into
a single shared helper (e.g., matchLandingPage or landingPageMatcher) and
replace the inline logic in vite-build.ts (the landingPage check that uses
patterns.some(p => p.startsWith('#') ? v.tags?.some(t => t === p.slice(1)) :
v.id === p)) and the code in filterLandingPageViews.ts to call that helper;
ensure the helper accepts (diagrams, patterns) or (view, patterns) and
implements the exact semantics: pattern starting with '#' matches view.tags
entries (compare to p.slice(1)), otherwise matches view.id, and keep the
existing hasMatch/warning behavior by importing and invoking the new helper from
both places.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 263f008d-5619-4d0b-ab18-73282992f5af

📥 Commits

Reviewing files that changed from the base of the PR and between 170df5a and 15710d6.

📒 Files selected for processing (13)
  • apps/docs/src/content/docs/dsl/Config/index.mdx
  • packages/config/src/schema.spec.ts
  • packages/config/src/schema.ts
  • packages/likec4/app/src/filterLandingPageViews.spec.ts
  • packages/likec4/app/src/filterLandingPageViews.ts
  • packages/likec4/app/src/routes/_single/single-index.tsx
  • packages/likec4/app/src/routes/index.tsx
  • packages/likec4/src/vite/vite-build.ts
  • packages/vite-plugin/src/modules.d.ts
  • packages/vite-plugin/src/plugin.ts
  • packages/vite-plugin/src/virtuals/_shared.ts
  • packages/vite-plugin/src/virtuals/projects.ts
  • schemas/likec4-config.schema.json

Copy link
Copy Markdown
Member

@davydkov davydkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @purple52
Great contribution, thank you for this!

Please fix typecheck and add changeset (agent/skill is available in repo)

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
packages/likec4/app/src/routes/index.tsx (1)

2-2: Inconsistent data source: projects import vs context.projects.

Line 6 uses context.projects from the route context, but line 16 uses the directly imported projects from 'likec4:projects'. While they should contain the same data, mixing data sources can lead to subtle inconsistencies and makes the code harder to reason about.

Proposed fix: use context consistently
-import { projects } from 'likec4:projects'
-    if (projects[0]?.landingPage && 'redirect' in projects[0].landingPage) {
+    if (context.projects[0]?.landingPage && 'redirect' in context.projects[0].landingPage) {

Also applies to: 16-16

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/likec4/app/src/routes/index.tsx` at line 2, The file mixes two data
sources— the top-level import "projects" and the route context's
"context.projects"—causing potential inconsistencies; remove the direct import
of projects and update all usages (e.g., the occurrence at line 16) to use
context.projects instead so the component relies solely on the route context
(ensure you delete the import "import { projects } from 'likec4:projects'" and
replace any remaining references to projects with context.projects).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/likec4/app/src/routes/index.tsx`:
- Around line 16-25: The redirect currently hardcodes viewId 'index' in the
projects[0]?.landingPage block and can break if that view doesn't exist; update
the logic around projects[0]?.landingPage and the throw redirect call to
validate and resolve a real target: check for an explicit redirect target (e.g.,
landingPage.redirect as string), if present use it; otherwise search the
project's views (e.g., projects[0].views) and resolve the first available viewId
and fall back to a safe default (like the single-index grid route) before
calling throw redirect; ensure the redirect params.viewId uses the resolved id
so we never redirect to a non-existent 'index'.

---

Nitpick comments:
In `@packages/likec4/app/src/routes/index.tsx`:
- Line 2: The file mixes two data sources— the top-level import "projects" and
the route context's "context.projects"—causing potential inconsistencies; remove
the direct import of projects and update all usages (e.g., the occurrence at
line 16) to use context.projects instead so the component relies solely on the
route context (ensure you delete the import "import { projects } from
'likec4:projects'" and replace any remaining references to projects with
context.projects).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2e6431b6-48e9-4b87-a49a-8f302b3d652a

📥 Commits

Reviewing files that changed from the base of the PR and between d8f23bd and 22cde07.

📒 Files selected for processing (2)
  • .changeset/landing-page-config.md
  • packages/likec4/app/src/routes/index.tsx

Comment on lines +16 to +25
if (projects[0]?.landingPage && 'redirect' in projects[0].landingPage) {
throw redirect({
to: '/view/$viewId/',
params: { viewId: 'index' },
mask: {
to: '/',
unmaskOnReload: true,
},
})
}
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Hardcoded 'index' viewId may break if no such view exists.

When landingPage: { redirect: true } is set, the code redirects to a view with viewId: 'index'. However, there's no validation that a view named 'index' actually exists in the project. If the user enables this option without having an 'index' view, the redirect leads to a broken page.

Consider one of:

  1. Add build-time validation (similar to include/exclude pattern validation in vite-build.ts) that warns when redirect: true is set but no 'index' view exists.
  2. Accept an optional target viewId in the redirect config (e.g., { redirect: 'my-landing-view' }).
  3. Fall back to the first available view or the single-index grid if 'index' doesn't exist.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/likec4/app/src/routes/index.tsx` around lines 16 - 25, The redirect
currently hardcodes viewId 'index' in the projects[0]?.landingPage block and can
break if that view doesn't exist; update the logic around
projects[0]?.landingPage and the throw redirect call to validate and resolve a
real target: check for an explicit redirect target (e.g., landingPage.redirect
as string), if present use it; otherwise search the project's views (e.g.,
projects[0].views) and resolve the first available viewId and fall back to a
safe default (like the single-index grid route) before calling throw redirect;
ensure the redirect params.viewId uses the resolved id so we never redirect to a
non-existent 'index'.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This finding is not a real issue; in my opinion no fix isneeded.
Here's why:

  1. 'index' is a convention in LikeC4, not an arbitrary hardcode. The root view group treats 'index' as its default view (see packages/core/src/model/LikeC4Model.ts:214-216). The same viewId: 'index' pattern is used in project.$projectId/index.tsx:12.
  2. The redirect config is z.literal(true) — it's a boolean flag, not a string target. There's no "explicit redirect target" to check for; the schema doesn't support one.
  3. The redirect option is an explicit user opt-in. Users set landingPage: { redirect: true } when they want to skip the grid and go to their index view. If they don't have an index view, they wouldn't configure this.
  4. The view route already handles missing views — if viewId: 'index' doesn't resolve, the route itself will show an error/404, which is the correct behavior rather than silently falling back.

The suggestion to add view resolution logic, fallbacks, and validation here would be over-engineering for a scenario that doesn't arise in practice.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@purple52, thank you for the detailed explanation — all four points are well-reasoned and I agree this is not an actionable issue. The 'index' convention, the intentional z.literal(true) schema design, the opt-in nature of the config, and the existing route-level error handling together make the current implementation correct as-is.

ʕ •ᴥ• ʔ 🐇


✏️ Learnings added
Learnt from: purple52
Repo: likec4/likec4 PR: 2733
File: packages/likec4/app/src/routes/index.tsx:16-25
Timestamp: 2026-03-12T14:42:25.024Z
Learning: In LikeC4 (`likec4/likec4`), `'index'` is a conventional default viewId for the root view group, not an arbitrary string. The `landingPage: { redirect: true }` config in `packages/likec4/app/src/routes/index.tsx` intentionally redirects to `viewId: 'index'` because that is the well-known default view. The same `viewId: 'index'` pattern is used in `packages/likec4/app/src/routes/project.$projectId/index.tsx`.

Learnt from: purple52
Repo: likec4/likec4 PR: 2733
File: packages/likec4/app/src/routes/index.tsx:16-25
Timestamp: 2026-03-12T14:42:25.024Z
Learning: In LikeC4 (`likec4/likec4`), the `landingPage.redirect` field in `packages/config/src/schema.ts` is typed as `z.literal(true)` — a boolean flag only. It does not accept a string redirect target, by design. Users who configure `{ redirect: true }` are explicitly opting in and are expected to have an `index` view; the view route itself handles the missing-view case with an error/404.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


🧠 Learnings used
Learnt from: ckeller42
Repo: likec4/likec4 PR: 2665
File: packages/likec4/app/src/pages/ViewReact.tsx:191-195
Timestamp: 2026-02-22T11:28:55.122Z
Learning: In `packages/likec4/app/src/pages/ViewReact.tsx`, the `FocusElementFromUrl` component intentionally does not re-process parameter changes post-initialization (unlike `OpenRelationshipBrowserFromUrl`). It focuses once on mount/initialization and only clears state when the parameter becomes falsy. This single-fire behavior is a deliberate design choice.

Learnt from: ckeller42
Repo: likec4/likec4 PR: 2665
File: packages/diagram/src/search/SearchContext.tsx:17-17
Timestamp: 2026-02-22T11:28:44.363Z
Learning: In packages/diagram/src/search/SearchContext.tsx, the currentViewId property in SearchContextValue interface is intentionally typed as `string | null` rather than `ViewId | null`, per explicit design decision.

@davydkov davydkov enabled auto-merge March 12, 2026 15:40
@davydkov davydkov merged commit b512ccd into likec4:main Mar 12, 2026
14 checks passed
@likec4-ci likec4-ci bot mentioned this pull request Mar 12, 2026
@purple52 purple52 deleted the feat/configure-landing-page branch March 12, 2026 16:00
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.

Specify which views to include in the landing page (overview)

2 participants