Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { DefaultQueryHistoryRepository } from "./QueryHistoryRepository.js";
export const QueryHistoryRepositoryFeature = createFeature({
name: "QueryHistoryRepository",
register(container) {
container.register(DefaultQueryHistoryRepository).inSingletonScope();
// One per container, so query history is stored per tenant. See PlaygroundRepositoryFeature.
container.register(DefaultQueryHistoryRepository).inContainerScope();
},
resolve(container) {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import { DefaultPlaygroundRepository } from "./PlaygroundRepository.js";
export const PlaygroundRepositoryFeature = createFeature({
name: "PlaygroundRepository",
register(container) {
container.register(DefaultPlaygroundRepository).inSingletonScope();
// One per container, so it reads the tenant-prefixed LocalStorage of the container that resolves
// it. A root singleton would see only the root LocalStorage and share tabs across tenants.
container.register(DefaultPlaygroundRepository).inContainerScope();
},
resolve(container) {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { DefaultPlaygroundPresenter } from "./PlaygroundPresenter.js";
export const PlaygroundPresenterFeature = createFeature({
name: "PlaygroundPresenter",
register(container) {
container.register(DefaultPlaygroundPresenter).inSingletonScope();
// One per container: the presenter reads the per-tenant playground repositories.
container.register(DefaultPlaygroundPresenter).inContainerScope();
},
resolve(container) {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { DefaultQueryHistoryPresenter } from "./QueryHistoryPresenter.js";
export const QueryHistoryFeature = createFeature({
name: "QueryHistoryPresenter",
register(container) {
container.register(DefaultQueryHistoryPresenter).inSingletonScope();
// One per container: the presenter reads the per-tenant query history repository.
container.register(DefaultQueryHistoryPresenter).inContainerScope();
},
resolve(container) {
return {
Expand Down
Loading