Skip to content

Commit

Permalink
+++
Browse files Browse the repository at this point in the history
  • Loading branch information
Offirmo committed Nov 4, 2024
1 parent 00acfeb commit 6e1ff87
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ change -- category -- C2 = Widespread change requiring high customer/ecosystem e
change -- category -- C3 = Localised change requiring high customer/ecosystem effort
change -- category -- C4 = Change requiring low customer/ecosystem effort
change -- category -- C5 = Change requiring no customer/ecosystem effort
change -- category -- dynamic categorization = gathered through tooling + PRs
change -- management
change -- release tracks https://support.atlassian.com/organization-administration/docs/manage-product-release-tracks/
change -- support readiness
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ it's not about lowering the bar, it's about helping more people reach it.
jamais assez / 1st times
Johari window https://en.wikipedia.org/wiki/Johari_window
juger vs. évaluer
keep only the ones saying it's doable
keeping up with the jones
law of Shitty Click-Through Rates: Most marketing strategies have a short window of success, as click-through rates decrease as tactics mature. For example, the first banner-ad has a click-through rate of more than 70%. Now we avoid them with ad-blockers.
le premier jour du reste de sa vie
Expand Down Expand Up @@ -272,6 +273,7 @@ mutual assured destruction https://en.wikipedia.org/wiki/Mutual_assured_destruct
Mutually Exclusive, Collectively Exhaustive (MECE) https://strategyu.co/wtf-is-mece-mutually-exclusive-collectively-exhaustive/
naiveté: abus sexuels, mafia
needs / wants https://en.wikipedia.org/wiki/Need
Never interrupt someone doing what you said couldn't be done.
never-Ending Now: The structure of our social media feeds blinds us to history, as it causes us to live in an endless cycle of ephemeral content consumption. The structure of the Internet pulls people away from age-old wisdom.
no conflict / safe conflict / extreme conflict
Nobel https://www.nobelprize.org/all-nobel-prizes-2024/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './recap/index.js'
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ export * from './items.js'
export * from './meta.js'
export * from './monster.js'
export * from './wallet.js'
export * from './engagement/index.js'
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Immutable } from '@offirmo-private/state-utils'
import { type Hyperlink, type Uri‿str, type URI‿x, type SchemeSpecificURIPart } from '@offirmo-private/ts-types-web'
import * as RichText from '@offirmo-private/rich-text-format'

import { type HypermediaContentType } from '@tbrpg/definitions'
import * as AppState from '@tbrpg/state'
import * as AppRichText from '@tbrpg/ui--rich-text'
import {
Expand All @@ -20,7 +21,7 @@ import {
import { prettifyꓽjson } from '../services/misc.js'

import {
type HATEOASEngagement,
type HATEOASPendingEngagement,
type HATEOASServer,
} from '../to-export-to-own-package/hateoas/types.js'
import {
Expand All @@ -35,13 +36,12 @@ import {

const DEBUG = false

type HypermediaType = RichText.Document

class AppHateoasServer implements HATEOASServer<HypermediaType, Action> {
class AppHateoasServer implements HATEOASServer<HypermediaContentType, Action> {
app_sugar: Game = new Game()
pending_async: Array<Promise<void>> = []

async get(url: Immutable<Hyperlink['href']> = DEFAULT_ROOT_URI): Promise<HypermediaType> {
async get(url: Immutable<Hyperlink['href']> = DEFAULT_ROOT_URI): Promise<HypermediaContentType> {
DEBUG && console.group(`↘ HATEOASᐧget("${url}")`)

////////////
Expand Down Expand Up @@ -121,7 +121,7 @@ class AppHateoasServer implements HATEOASServer<HypermediaType, Action> {
}

case '/session': { // for recap
$builder = $builder.pushNode(AppState.getꓽrecap(state.u_state))
$builder = $builder.pushNode(AppRichText.getꓽrecap(state.u_state))

const hyperlinkꘌcontinue_to: Hyperlink = {
href: '/session/adventures/',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const DEBUG = false

/////////////////////////////////////////////////

type ContentType = string | RichText.Document
type ContentType = RichText.NodeLike

class HypermediaBrowserWithChatInterface<ActionType> implements StepIterator<ContentType> {
// hypermedia
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,32 @@ import { Immutable } from '@offirmo-private/state-utils'
import {
type Hyperlink,
} from '@offirmo-private/ts-types-web'
import { type PendingEngagement } from '@oh-my-rpg/state--engagement'

/////////////////////////////////////////////////

/*
interface HATEOASEngagement<HypermediaType> {
type: 'flow' | 'non-flow'
$doc: HypermediaType
ack_action: any // TODO type better?
uid: string | number // OPAQUE unique id, useful for ex. for React keying. Should not be used for anything else.
}
*/

interface HATEOASPendingEngagement<HypermediaType, Action> {
content: HypermediaType // resolved
flow: PendingEngagement<HypermediaType>['flow']
role: PendingEngagement<HypermediaType>['role']
success?: boolean
attention_needed?: PendingEngagement<HypermediaType>['attention_needed']
enhancements?: PendingEngagement<HypermediaType>['enhancements']

ack_action?: Action // the action to dispatch to acknowledge this engagement
uid: PendingEngagement<HypermediaType>['uid'] // useful for tracking (ex. React key) + advanced mass acknowledgment
}

interface HATEOASServer<
HypermediaType, // an advanced Hypermedia format able to contain links and actions
Action,
Expand All @@ -37,12 +53,13 @@ interface HATEOASServer<

// important to separate resource representation from actions feedback
// sync bc we assume the browser awaits dispatches
get_next_pending_engagement(url?: Hyperlink['href']): HATEOASEngagement<HypermediaType> | null
// the consumer must sort out the engagements by flow and priority
get_pending_engagements(url?: Hyperlink['href']): Immutable<Array<HATEOASPendingEngagement<HypermediaType, Action>>>
}

/////////////////////////////////////////////////

export {
type HATEOASEngagement,
type HATEOASPendingEngagement,
type HATEOASServer,
}

0 comments on commit 6e1ff87

Please sign in to comment.